diff options
author | Oliver Eikemeier <eik@FreeBSD.org> | 2004-01-27 17:36:08 +0000 |
---|---|---|
committer | Oliver Eikemeier <eik@FreeBSD.org> | 2004-01-27 17:36:08 +0000 |
commit | 51318f17563f0f8da03e969bafef0c876bae6655 (patch) | |
tree | c5ac5be582ab274490e870beac4e35596a89b59d /sysutils/pkg_install-devel | |
parent | 3b38e588e15f3456c09ae4053e68c9bad93ad76a (diff) | |
download | ports-51318f17563f0f8da03e969bafef0c876bae6655.tar.gz ports-51318f17563f0f8da03e969bafef0c876bae6655.zip |
Notes
Diffstat (limited to 'sysutils/pkg_install-devel')
-rw-r--r-- | sysutils/pkg_install-devel/Makefile | 24 | ||||
-rw-r--r-- | sysutils/pkg_install-devel/pkg-deinstall | 12 | ||||
-rw-r--r-- | sysutils/pkg_install-devel/pkg-descr | 7 | ||||
-rw-r--r-- | sysutils/pkg_install-devel/pkg-install | 40 |
4 files changed, 49 insertions, 34 deletions
diff --git a/sysutils/pkg_install-devel/Makefile b/sysutils/pkg_install-devel/Makefile index 373936a7b589..dfa2e77e8a34 100644 --- a/sysutils/pkg_install-devel/Makefile +++ b/sysutils/pkg_install-devel/Makefile @@ -7,23 +7,28 @@ PORTNAME= pkg_install PORTVERSION= 20040125 +PORTREVISION= 1 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 +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= eik PKGNAMESUFFIX= -devel -DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:sf,FreeBSD,fml MAINTAINER= eik@FreeBSD.org COMMENT= Development version of the FreeBSD 5.x package tools +CONFLICTS= pkg_install-[0-9]* + MANCOMPRESSED= yes MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \ pkg_info.1 pkg_version.1 -PREFIX?= /usr +.if defined(PREFIX) +.if ${PREFIX} == "/usr" +PKGNAMESUFFIX= -base-devel +.endif +.endif + BACKUPDIR?= /var/backups .if !defined(NOCRYPT) && !defined(NO_OPENSSL) @@ -46,6 +51,13 @@ PLIST_SUB+= OPENSSL="@comment " .include <bsd.port.pre.mk> +pre-everything:: + @${ECHO} "=======================================================================================" + @${ECHO} + @${ECHO} "Build ${PKGNAME} with PREFIX=/usr to replace the base package tools" + @${ECHO} + @${ECHO} "=======================================================================================" + .if ${OSVERSION} < 460102 check-already-installed: .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) diff --git a/sysutils/pkg_install-devel/pkg-deinstall b/sysutils/pkg_install-devel/pkg-deinstall index 342e73db4492..08ffba959763 100644 --- a/sysutils/pkg_install-devel/pkg-deinstall +++ b/sysutils/pkg_install-devel/pkg-deinstall @@ -8,7 +8,7 @@ ECHO_CMD=echo RM=/bin/rm BACKUPDIR=/var/backups -PREFIX=${PKG_PREFIX:-/usr} +PREFIX=${PKG_PREFIX:-/usr/local} if [ "${PREFIX}" = "/usr" ]; then MANPREFIX="${PREFIX}/share" else @@ -17,10 +17,12 @@ 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." + if [ "${PREFIX}" = "/usr" ]; then + 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 fi ;; esac diff --git a/sysutils/pkg_install-devel/pkg-descr b/sysutils/pkg_install-devel/pkg-descr index e012708e3130..44c2af261c48 100644 --- a/sysutils/pkg_install-devel/pkg-descr +++ b/sysutils/pkg_install-devel/pkg-descr @@ -4,11 +4,10 @@ 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 +If you want to replace the base system tools, install via: make install PREFIX=/usr/local - -You can revert to the tools from the base system by doing +You can revert to the normal tools simply by uninstalling the +port or restoring them with: cd /usr/src/usr.sbin/pkg_install; make install if you have the sources installed. diff --git a/sysutils/pkg_install-devel/pkg-install b/sysutils/pkg_install-devel/pkg-install index b8c03d1552ae..72ac81eaf581 100644 --- a/sysutils/pkg_install-devel/pkg-install +++ b/sysutils/pkg_install-devel/pkg-install @@ -11,7 +11,7 @@ BACKUPDIR=/var/backups TOOLS="add check create delete info sign update version" -PREFIX=${PKG_PREFIX:-/usr} +PREFIX=${PKG_PREFIX:-/usr/local} if [ "${PREFIX}" = "/usr" ]; then MANPREFIX="${PREFIX}/share" else @@ -20,25 +20,27 @@ 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." + 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 fi ;; esac |