1#!/usr/bin/ksh
2TEMPDIR=$1
3BUILD=`pwd`
4. build/aix/pkginfo
5
6package=$PKG
7name=$NAME
8vrmf=$VERSION
9descr="$VENDOR $NAME for $ARCH"
10umask 022
11INFO=$BUILD/build/aix/.info
12mkdir -p $INFO
13
14template=${INFO}/${PKG}.${NAME}.${vrmf}.template
15>$template
16
17cd ${TEMPDIR}
18rm -rf .info lpp_name tmp
19# get the directory sizes in blocks
20for d in etc opt var
21do
22        set `du -s $d/${NAME}`
23        let sz$d=$1+1
24done
25set `du -s usr/share/man`
26szman=$1+1
27
28files=./httpd-root
29cd ${TEMPDIR}/..
30find ${files} -type d -exec chmod og+rx {} \;
31chmod -R go+r ${files}
32chown -R 0:0 ${files}
33
34cat - <<EOF >>$template
35Package Name: ${package}.${NAME}
36Package VRMF: ${vrmf}.0
37Update: N
38Fileset
39  Fileset Name: ${package}.${NAME}.rte
40  Fileset VRMF: ${vrmf}.0
41  Fileset Description: ${descr}
42  USRLIBLPPFiles
43  EOUSRLIBLPPFiles
44  Bosboot required: N
45  License agreement acceptance required: N
46  Include license files in this package: N
47  Requisites:
48        Upsize: /usr/share/man ${szman};
49        Upsize: /etc/${NAME} $szetc;
50        Upsize: /opt/${NAME} $szopt;
51        Upsize: /var/${NAME} $szvar;
52  USRFiles
53EOF
54
55find ${files} | sed -e s#^${files}## | sed -e "/^$/d" >>$template
56
57cat - <<EOF >>$template
58  EOUSRFiles
59  ROOT Part: N
60  ROOTFiles
61  EOROOTFiles
62  Relocatable: N
63EOFileset
64EOF
65
66cp ${template} ${BUILD}/build/aix
67
68# use mkinstallp to create the fileset. result is in ${TEMPDIR}/tmp
69mkinstallp -d ${TEMPDIR} -T ${template}
70
71cp ${TEMPDIR}/tmp/$PKG.$NAME.$VERSION.0.bff ${BUILD}/build/aix
72cd $BUILD/build/aix
73rm -f $PKG.$NAME.$VERSION.$ARCH.I
74mv $PKG.$NAME.$VERSION.0.bff $PKG.$NAME.$VERSION.$ARCH.I
75rm .toc
76inutoc .
77installp -d . -ap ${PKG}.${NAME}
78installp -d . -L
79