1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00

Move pkg_tarup from misc to sysutils, where the port should dwell.

Approved by:	portmgr
Repocopied by:	joe
This commit is contained in:
Akinori MUSHA 2002-02-01 05:13:11 +00:00
parent 4c1b3a9e45
commit b1bbf5a81a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=54095
9 changed files with 2 additions and 140 deletions

View File

@ -168,7 +168,6 @@
SUBDIR += peq
SUBDIR += pg
SUBDIR += pinfo
SUBDIR += pkg_tarup
SUBDIR += pl-sms
SUBDIR += porteasy
SUBDIR += projectionlib

View File

@ -1,29 +0,0 @@
# New ports collection makefile for: pkg_tarup
# Date created: 21 Sep 2000
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#
PORTNAME= pkg_tarup
PORTVERSION= 1.2
PORTREVISION= 3
CATEGORIES= misc
MASTER_SITES= http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/pkgtools/pkg_tarup/files/
DISTNAME= ${PORTNAME}\?rev=${PORTVERSION}\&content-type=text%2fplain
EXTRACT_SUFX= # empty
EXTRACT_ONLY= # empty
MAINTAINER= knu@FreeBSD.org
NO_WRKSUBDIR= yes
NO_BUILD= yes
do-extract:
${MKDIR} ${WRKSRC}
${CP} ${DISTDIR}/${DISTNAME} ${WRKSRC}/${PORTNAME}
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/sbin/${PORTNAME}
.include <bsd.port.mk>

View File

@ -1 +0,0 @@
MD5 (pkg_tarup?rev=1.2&content-type=text%2fplain) = 48d0cf4c993994938671f62157f79a28

View File

@ -1,95 +0,0 @@
--- pkg_tarup.orig Thu Aug 23 14:16:01 2001
+++ pkg_tarup Thu Aug 23 14:18:58 2001
@@ -7,21 +7,28 @@
#
PKG_DBDIR=${PKG_DBDIR:-/var/db/pkg}
-PKGREPOSITORY=${PKGREPOSITORY:-/tmp}
PKG_SUFX=${PKG_SUFX:-tgz}
+PKG_INFO_CMD=/usr/sbin/pkg_info
+PKG_CREATE_CMD=/usr/sbin/pkg_create
+
+# A package file can be very big beyond /tmp's capacity
+PKGREPOSITORY=${PKGREPOSITORY:-${TMPDIR:-/var/tmp}}
PKG="$1"
-rPKG="`pkg_info -e \"$PKG\"`"
-if [ "$PKG" = "" -o "$rPKG" = "" -o -f "${PKG_DBDIR}/${rPKG}" ]
+if [ "$PKG" = "" ]
then
- echo Usage: $0 installed_pkg
+ echo Usage: $0 installed_package
exit 1
fi
-PKG=$rPKG
-echo "Taring up $PKG"
+if ! $PKG_INFO_CMD -e "$PKG"
+then
+ echo $PKG is not installed.
+ exit 1
+fi
+echo "Taring up $PKG"
check_and_add() {
opt="$1"
@@ -40,10 +47,10 @@
check_and_add -c ${PKG_DBDIR}/${PKG}/+COMMENT
check_and_add -d ${PKG_DBDIR}/${PKG}/+DESC
-check_and_add -b ${PKG_DBDIR}/${PKG}/+BUILD_VERSION
-check_and_add -B ${PKG_DBDIR}/${PKG}/+BUILD_INFO
+#check_and_add -b ${PKG_DBDIR}/${PKG}/+BUILD_VERSION
+#check_and_add -B ${PKG_DBDIR}/${PKG}/+BUILD_INFO
check_and_add -s ${PKG_DBDIR}/${PKG}/+SIZE_PKG
-check_and_add -S ${PKG_DBDIR}/${PKG}/+SIZE_ALL
+#check_and_add -S ${PKG_DBDIR}/${PKG}/+SIZE_ALL
check_and_add -i ${PKG_DBDIR}/${PKG}/+INSTALL
check_and_add -k ${PKG_DBDIR}/${PKG}/+DEINSTALL
check_and_add -r ${PKG_DBDIR}/${PKG}/+REQUIRE
@@ -54,7 +61,8 @@
sed -n \
-e '/^@comment MD5:/d' \
-e '/^@cwd \.$/,$d' \
- -e '/\$NetBSD/,$p' \
+ -e '/^@srcdir /d' \
+ -e 'p' \
<${PKG_DBDIR}/${PKG}/+CONTENTS >$PLIST
# Duplicate first @cwd (work around pkg_create "feature" ...)
@@ -64,9 +72,9 @@
sed \
-e "/`cat ${PLIST}.1 | sed 's,/,\\\\/,g'`/r${PLIST}.1" \
<${PLIST} >${PLIST}.2
- mv ${PLIST}.2 ${PLIST}
+ /bin/mv ${PLIST}.2 ${PLIST}
fi
-rm ${PLIST}.1
+/bin/rm ${PLIST}.1
# echo -----
# cat $PLIST
@@ -76,17 +84,15 @@
# Just for kicks ...
# pkg_admin check "${PKG}"
-pkg_create \
+$PKG_CREATE_CMD \
${PKG_ARGS} \
-v \
-f ${PLIST} \
- -l \
- -p "`pkg_info -qp ${PKG} | head -1 | awk '{ print $2 }'`" \
- -P "`pkg_info -qf ${PKG} | grep ^@pkgdep | awk '{ print $2 }'`" \
- -C "`pkg_info -qf ${PKG} | grep ^@pkgcfl | awk '{ print $2 }'`" \
+ -p "`$PKG_INFO_CMD -qp ${PKG} | head -1 | awk '{ print $2 }'`" \
+ -P "`$PKG_INFO_CMD -qf ${PKG} | grep ^@pkgdep | awk '{ print $2 }'`" \
${PKGREPOSITORY}/${PKG}.${PKG_SUFX}
-rm -f ${PLIST}
+/bin/rm -f ${PLIST}
exit 0

View File

@ -1 +0,0 @@
Generates binary package from installed package

View File

@ -1,11 +0,0 @@
Script to tar up an already installed package.
The Script has still a problem, as the MTREE file is removed after
a pkg_add/make install. As leaving the MTREE file will lead to a
~10% increase in space needed for /var/db/pkg which I'm not sure
we should do, esp. as the files are almost always the same again.
(On my notebook with ~250 installed pkgs, the size increasement
would be from 8.8MB to 10MB).
Author: Hubert Feyrer <hubert@feyrer.de>
WWW: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/pkgtools/pkg_tarup/

View File

@ -1 +0,0 @@
sbin/pkg_tarup

View File

@ -128,6 +128,7 @@
SUBDIR += personality
SUBDIR += pib
SUBDIR += pkg_remove
SUBDIR += pkg_tarup
SUBDIR += pkg_tree
SUBDIR += portupgrade
SUBDIR += prips

View File

@ -8,7 +8,7 @@
PORTNAME= pkg_tarup
PORTVERSION= 1.2
PORTREVISION= 3
CATEGORIES= misc
CATEGORIES= sysutils
MASTER_SITES= http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/pkgtools/pkg_tarup/files/
DISTNAME= ${PORTNAME}\?rev=${PORTVERSION}\&content-type=text%2fplain
EXTRACT_SUFX= # empty