diff options
author | hubertf <hubertf> | 2003-05-28 14:53:42 +0000 |
---|---|---|
committer | hubertf <hubertf> | 2003-05-28 14:53:42 +0000 |
commit | a8f6b093779c50385d938d66c1339ce39c51e638 (patch) | |
tree | 5053ef99ab96fe8e3cc171dd07732124cebceaee /pkgtools | |
parent | c8fa2344c318929030e445c4f378ab858c404a57 (diff) | |
download | pkgsrc-a8f6b093779c50385d938d66c1339ce39c51e638.tar.gz |
Update pkg_tarup to 1.4. Changes:
- Add pkg_tarup_all to tarup a pkg plus all it's dependencies.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_tarup/Makefile | 12 | ||||
-rw-r--r-- | pkgtools/pkg_tarup/PLIST | 3 | ||||
-rw-r--r-- | pkgtools/pkg_tarup/files/pkg_tarup_all | 35 |
3 files changed, 45 insertions, 5 deletions
diff --git a/pkgtools/pkg_tarup/Makefile b/pkgtools/pkg_tarup/Makefile index ba76519920d..ac7b0c87dcf 100644 --- a/pkgtools/pkg_tarup/Makefile +++ b/pkgtools/pkg_tarup/Makefile @@ -1,13 +1,13 @@ -# $NetBSD: Makefile,v 1.11 2003/03/29 12:42:10 jmmv Exp $ +# $NetBSD: Makefile,v 1.12 2003/05/28 14:53:42 hubertf Exp $ -DISTNAME= pkg_tarup-1.3 +DISTNAME= pkg_tarup-1.4 WRKSRC= ${WRKDIR} CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty MAINTAINER= hubertf@netbsd.org -COMMENT= Generates binary package from installed pkg +COMMENT= Generates binary package(s) from installed pkg(s) EXTRACT_ONLY= # empty NO_CHECKSUM= yes @@ -31,9 +31,13 @@ SCRIPT_SUBST_SED= ${SCRIPT_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} do-configure: ${SED} ${SCRIPT_SUBST_SED} \ < ${FILESDIR}/pkg_tarup \ - > ${WRKSRC}/pkg_tarup \ + > ${WRKSRC}/pkg_tarup + ${SED} ${SCRIPT_SUBST_SED} \ + < ${FILESDIR}/pkg_tarup_all \ + > ${WRKSRC}/pkg_tarup_all do-install: ${INSTALL_SCRIPT} ${WRKSRC}/pkg_tarup ${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/pkg_tarup_all ${PREFIX}/bin .include "../../mk/bsd.pkg.mk" diff --git a/pkgtools/pkg_tarup/PLIST b/pkgtools/pkg_tarup/PLIST index b458a9ac611..add334b1432 100644 --- a/pkgtools/pkg_tarup/PLIST +++ b/pkgtools/pkg_tarup/PLIST @@ -1,2 +1,3 @@ -@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:31:32 zuntum Exp $ +@comment $NetBSD: PLIST,v 1.2 2003/05/28 14:53:43 hubertf Exp $ bin/pkg_tarup +bin/pkg_tarup_all diff --git a/pkgtools/pkg_tarup/files/pkg_tarup_all b/pkgtools/pkg_tarup/files/pkg_tarup_all new file mode 100644 index 00000000000..d44ef3e572d --- /dev/null +++ b/pkgtools/pkg_tarup/files/pkg_tarup_all @@ -0,0 +1,35 @@ +#! @SH@ +# +# $Id: pkg_tarup_all,v 1.1 2003/05/28 14:53:43 hubertf Exp $ +# +# Tar up installed package plus dependencies +# +# (c) Copyright 2003 Hubert Feyrer <hubert@feyrer.de> +# + +PREFIX=${PREFIX:-@PREFIX@} + +PATH=/sbin:/usr/sbin:/bin:/usr/bin:${PREFIX}/sbin:${PREFIX}/bin:@PKG_TOOLS_BIN@ +export PATH + +AWK=${AWK:-@AWK@} +ECHO=${ECHO:-@ECHO@} +HEAD=${HEAD:-@HEAD@} +ID=${ID:-@ID@} +SU=${SU:-@SU@} +PKG_INFO=${PKG_INFO:-@PKG_INFO@} + +if [ `${ID} -u` != 0 ]; then + ${ECHO} "Becoming root@`/bin/hostname` to create binary packages" + ${ECHO} -n "`${ECHO} ${SU} | ${AWK} '{ print $$1 }'` ";\ + exec ${SU} root -c "$0 $@" +fi + +# 1. dependencies +pkg_info -qf "$1" \ +| grep @pkgdep \ +| ${AWK} '{print $2}' \ +| xargs -n 1 ${PREFIX}/bin/pkg_tarup + +# 2. the pkg itself +${PREFIX}/bin/pkg_tarup "$1" |