summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-01-26 00:07:11 +0000
committereik <eik@FreeBSD.org>2004-01-26 00:07:11 +0000
commit6209ae80d7d7eb5c9d0ece1bfda52ec671c4bbb0 (patch)
treee0dbe0625944c18661532c94baa2810476eae64e /sysutils
parentbd53ccae54282e69bda0ac5d144bc30c20ddd47d (diff)
downloadFreeBSD-ports-6209ae80d7d7eb5c9d0ece1bfda52ec671c4bbb0.zip
FreeBSD-ports-6209ae80d7d7eb5c9d0ece1bfda52ec671c4bbb0.tar.gz
Development version of the FreeBSD 5.x pkg_install suite of tools
to test new features PR: 56961, 56989 and 57029
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/pkg_install-devel/Makefile87
-rw-r--r--sysutils/pkg_install-devel/distinfo2
-rw-r--r--sysutils/pkg_install-devel/files/Makefile.inc4
-rw-r--r--sysutils/pkg_install-devel/pkg-deinstall26
-rw-r--r--sysutils/pkg_install-devel/pkg-descr18
-rw-r--r--sysutils/pkg_install-devel/pkg-install44
-rw-r--r--sysutils/pkg_install-devel/pkg-plist7
8 files changed, 189 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 9222594..c74e271 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -262,6 +262,7 @@
SUBDIR += pipemeter
SUBDIR += pkg_cutleaves
SUBDIR += pkg_install
+ SUBDIR += pkg_install-devel
SUBDIR += pkg_remove
SUBDIR += pkg_tree
SUBDIR += pkill
diff --git a/sysutils/pkg_install-devel/Makefile b/sysutils/pkg_install-devel/Makefile
new file mode 100644
index 0000000..373936a
--- /dev/null
+++ b/sysutils/pkg_install-devel/Makefile
@@ -0,0 +1,87 @@
+# New ports collection makefile for: pkg_install
+# Date created: 25 Jan 2004
+# Whom: Oliver Eikemeier
+#
+# $FreeBSD$
+#
+
+PORTNAME= pkg_install
+PORTVERSION= 20040125
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:sf/} \
+ ${MASTER_SITE_LOCAL:S/$/:FreeBSD/} \
+ ftp://ftp.fillmore-labs.com/pub/%SUBDIR%/:fml
+MASTER_SITE_SUBDIR= portaudit/:sf eik/:FreeBSD FreeBSD/distfiles/:fml
+PKGNAMESUFFIX= -devel
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:sf,FreeBSD,fml
+
+MAINTAINER= eik@FreeBSD.org
+COMMENT= Development version of the FreeBSD 5.x package tools
+
+MANCOMPRESSED= yes
+
+MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \
+ pkg_info.1 pkg_version.1
+
+PREFIX?= /usr
+BACKUPDIR?= /var/backups
+
+.if !defined(NOCRYPT) && !defined(NO_OPENSSL)
+USE_OPENSSL= yes
+.if exists(/usr/lib/libcrypto.so)
+USE_OPENSSL_BASE= yes
+.else
+.if ${PREFIX} = "/usr"
+.error
+.else
+USE_OPENSSL_PORT= yes
+.endif
+.endif
+MAN1+= pkg_check.1 pkg_sign.1
+PLIST_SUB+= OPENSSL=""
+.else
+MAKE_ARGS= -DNO_OPENSSL
+PLIST_SUB+= OPENSSL="@comment "
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 460102
+check-already-installed:
+.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
+ @if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \
+ ${ECHO_CMD} "===> ${PKGNAME} is already installed - perhaps an older version?"; \
+ ${ECHO_CMD} " If so, you may wish to \`\`make deinstall'' and install"; \
+ ${ECHO_CMD} " this port again by \`\`make reinstall'' to upgrade it properly."; \
+ ${ECHO_CMD} " If you really wish to overwrite the old port of ${PKGNAME}"; \
+ ${ECHO_CMD} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \
+ ${ECHO_CMD} " in your environment or the \"make install\" command line."; \
+ exit 1; \
+ fi
+.else
+ @${DO_NADA}
+.endif
+.endif
+
+pre-configure:
+ @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
+ -e 's,%%MANPREFIX%%,${MANPREFIX},g' \
+ ${FILESDIR}/Makefile.inc > ${WRKDIR}/Makefile.inc
+
+# __FBSDID is undefied for old FreeBSD versions
+.if ${OSVERSION} < 440001 || ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500024 )
+post-patch:
+ @${FIND} ${WRKSRC} -name '*.c' \
+ | ${XARGS} ${PERL} -pi.orig -e 's/__FBSDID\(("[^"]*")\)/static const char rcsid[] = $$1/'
+.endif
+
+test: build
+ @(cd ${BUILD_WRKSRC}/version && ${SH} test-pkg_version.sh)
+
+# Call pkg-install in `do-install:' instead of `pre-install:' because it might
+# deinstall pkg_info, which is fatal during `check-already-installed:'.
+do-install:
+ ${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/pkg_install-devel/distinfo b/sysutils/pkg_install-devel/distinfo
new file mode 100644
index 0000000..1c0d1e0
--- /dev/null
+++ b/sysutils/pkg_install-devel/distinfo
@@ -0,0 +1,2 @@
+MD5 (pkg_install-20040125.tar.gz) = 644307b71fe6f4c1b604bbcb88d86050
+SIZE (pkg_install-20040125.tar.gz) = 84942
diff --git a/sysutils/pkg_install-devel/files/Makefile.inc b/sysutils/pkg_install-devel/files/Makefile.inc
new file mode 100644
index 0000000..3f26aca
--- /dev/null
+++ b/sysutils/pkg_install-devel/files/Makefile.inc
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+BINDIR=%%PREFIX%%/sbin
+MANDIR=%%MANPREFIX%%/man/man
diff --git a/sysutils/pkg_install-devel/pkg-deinstall b/sysutils/pkg_install-devel/pkg-deinstall
new file mode 100644
index 0000000..342e73d
--- /dev/null
+++ b/sysutils/pkg_install-devel/pkg-deinstall
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PAX=/bin/pax
+ECHO_CMD=echo
+RM=/bin/rm
+BACKUPDIR=/var/backups
+
+PREFIX=${PKG_PREFIX:-/usr}
+if [ "${PREFIX}" = "/usr" ]; then
+ MANPREFIX="${PREFIX}/share"
+else
+ MANPREFIX="${PREFIX}"
+fi
+
+case $2 in
+POST-DEINSTALL)
+ if [ -e "${BACKUPDIR}/pkg_install.tgz" ]; then
+ ${PAX} -r -pe -z -f "${BACKUPDIR}/pkg_install.tgz"
+ ${RM} "${BACKUPDIR}/pkg_install.tgz"
+ ${ECHO_CMD} "===> Base pkg_install restored."
+ fi
+ ;;
+esac
diff --git a/sysutils/pkg_install-devel/pkg-descr b/sysutils/pkg_install-devel/pkg-descr
new file mode 100644
index 0000000..e012708
--- /dev/null
+++ b/sysutils/pkg_install-devel/pkg-descr
@@ -0,0 +1,18 @@
+Development version of the FreeBSD 5.x pkg_install suite of tools
+
+This version fixes some bugs of the -CURRENT tools. You should
+only install it it you have problems with the current version
+or want to test the new features.
+
+*** CAUTION ***: This packages replaces your base system tools.
+If you do not want this, install the port with
+ make install PREFIX=/usr/local
+
+You can revert to the tools from the base system by doing
+ cd /usr/src/usr.sbin/pkg_install; make install
+if you have the sources installed.
+
+WWW: http://cvs.sf.net/viewcvs.py/portaudit/pkg_install/
+
+-- Oliver Eikemeier
+eik@FreeBSD.org
diff --git a/sysutils/pkg_install-devel/pkg-install b/sysutils/pkg_install-devel/pkg-install
new file mode 100644
index 0000000..b8c03d1
--- /dev/null
+++ b/sysutils/pkg_install-devel/pkg-install
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PAX=/bin/pax
+ECHO_CMD=echo
+MKDIR="/bin/mkdir -p"
+RM=/bin/rm
+BACKUPDIR=/var/backups
+
+TOOLS="add check create delete info sign update version"
+
+PREFIX=${PKG_PREFIX:-/usr}
+if [ "${PREFIX}" = "/usr" ]; then
+ MANPREFIX="${PREFIX}/share"
+else
+ MANPREFIX="${PREFIX}"
+fi
+
+case $2 in
+PRE-INSTALL)
+ if [ -e "${BACKUPDIR}/pkg_install.tgz" ]; then
+ ${ECHO_CMD} "===> Please remove \`\`${BACKUPDIR}/pkg_install.tgz'' manually."
+ exit 1
+ fi
+ if [ "${PREFIX}" = "/usr" ]; then
+ files=""
+ for tool in ${TOOLS}; do
+ if [ -e "${PREFIX}/sbin/pkg_${tool}" ]; then
+ files="${files} ${PREFIX}/sbin/pkg_${tool}"
+ fi
+ if [ -e "${MANPREFIX}/man/man1/pkg_${tool}.1.gz" ]; then
+ files="${files} ${MANPREFIX}/man/man1/pkg_${tool}.1.gz"
+ ${RM} -f "${MANPREFIX}/man/cat1/pkg_${tool}.1.gz"
+ fi
+ done
+ ${MKDIR} ${BACKUPDIR}
+ ${PAX} -w -z -f "${BACKUPDIR}/pkg_install.tgz" ${files}
+ ${RM} -f ${files}
+ ${ECHO_CMD} "===> Base pkg_install saved."
+ fi
+ ;;
+esac
diff --git a/sysutils/pkg_install-devel/pkg-plist b/sysutils/pkg_install-devel/pkg-plist
new file mode 100644
index 0000000..565e68c
--- /dev/null
+++ b/sysutils/pkg_install-devel/pkg-plist
@@ -0,0 +1,7 @@
+sbin/pkg_add
+%%OPENSSL%%sbin/pkg_check
+sbin/pkg_create
+sbin/pkg_delete
+sbin/pkg_info
+%%OPENSSL%%sbin/pkg_sign
+sbin/pkg_version
OpenPOWER on IntegriCloud