lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | # |
| 2 | # |
| 3 | |
| 4 | PKGADD_PKG="@PKGADD_PKG@" |
| 5 | PKGADD_NAME="@PACKAGE@-@VERSION@ - @PKGADD_NAME@" |
| 6 | PKGADD_VENDOR="@PKGADD_VENDOR@" |
| 7 | PKGADD_ARCH="@host_cpu@" |
| 8 | PKGADD_DESC="@PACKAGE@-@VERSION@ - @PKGADD_NAME@" |
| 9 | PKGADD_CLASSES=none |
| 10 | PKGADD_BASEDIR=/ |
| 11 | |
| 12 | PKGADD_FILE=${PKGADD_PKG}-@PACKAGE@-@VERSION@-@host@.pkg |
| 13 | |
| 14 | package: |
| 15 | if [ ! -f release ]; then echo 0 > release; fi |
| 16 | if [ `find root -newer release -print|wc -l` -gt 0 ]; then expr `cat release` + 1 > release; fi |
| 17 | echo PKG=${PKGADD_PKG} > pkginfo |
| 18 | echo NAME=${PKGADD_NAME} >> pkginfo |
| 19 | echo VENDOR=${PKGADD_VENDOR} >> pkginfo |
| 20 | echo ARCH=${PKGADD_ARCH} >> pkginfo |
| 21 | echo DESC=${PKGADD_DESC} >> pkginfo |
| 22 | echo CLASSES=${PKGADD_CLASSES} >> pkginfo |
| 23 | echo BASEDIR=${PKGADD_BASEDIR} >> pkginfo |
| 24 | echo CATEGORY=application >> pkginfo |
| 25 | echo VERSION=`cat ./release` >> pkginfo |
| 26 | echo > prototype |
| 27 | for subdir in opt var etc usr; \ |
| 28 | do if [ -d root/$$subdir ]; then \ |
| 29 | pkgproto root/$$subdir=$$subdir >> prototype;\ |
| 30 | fi; done |
| 31 | for file in pkginfo preinstall postinstall copyright; \ |
| 32 | do if [ -f $$file ]; then \ |
| 33 | echo "i $$file=$$file" >> prototype; \ |
| 34 | fi; done |
| 35 | rm -rf ./tmp |
| 36 | mkdir ./tmp |
| 37 | pkgmk -o -d ./tmp |
| 38 | pkgtrans -so ./tmp ${top_srcdir}/../${PKGADD_FILE} ${PKGADD_PKG} |