1#
2#
3
4PKGADD_PKG="@PKGADD_PKG@"
5PKGADD_NAME="@PACKAGE@-@VERSION@ - @PKGADD_NAME@"
6PKGADD_VENDOR="@PKGADD_VENDOR@"
7PKGADD_ARCH="@host_cpu@"
8PKGADD_DESC="@PACKAGE@-@VERSION@ - @PKGADD_NAME@"
9PKGADD_CLASSES=none
10PKGADD_BASEDIR=/
11
12PKGADD_FILE=${PKGADD_PKG}-@PACKAGE@-@VERSION@-@host@.pkg
13
14package:
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}
39