From 01a913ae61889b6ba8b7ad7773cb0cfd270a4fde Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Sun, 3 Aug 2003 21:44:33 +0000 Subject: [PATCH] Add pkg_install, a snapshot of the -CURRENT package installation framework for use with older versions of FreeBSD. PR: 54478 Submitted by: Oliver Eikemeier --- ports-mgmt/pkg_install/Makefile | 51 +++++++++++++++++++ ports-mgmt/pkg_install/distinfo | 1 + ports-mgmt/pkg_install/files/Makefile.inc | 4 ++ .../pkg_install/files/patch-lib_Makefile | 20 ++++++++ ports-mgmt/pkg_install/pkg-descr | 9 ++++ ports-mgmt/pkg_install/pkg-plist | 7 +++ sysutils/Makefile | 1 + sysutils/pkg_install/Makefile | 51 +++++++++++++++++++ sysutils/pkg_install/distinfo | 1 + sysutils/pkg_install/files/Makefile.inc | 4 ++ sysutils/pkg_install/files/patch-lib_Makefile | 20 ++++++++ sysutils/pkg_install/pkg-descr | 9 ++++ sysutils/pkg_install/pkg-plist | 7 +++ 13 files changed, 185 insertions(+) create mode 100644 ports-mgmt/pkg_install/Makefile create mode 100644 ports-mgmt/pkg_install/distinfo create mode 100644 ports-mgmt/pkg_install/files/Makefile.inc create mode 100644 ports-mgmt/pkg_install/files/patch-lib_Makefile create mode 100644 ports-mgmt/pkg_install/pkg-descr create mode 100644 ports-mgmt/pkg_install/pkg-plist create mode 100644 sysutils/pkg_install/Makefile create mode 100644 sysutils/pkg_install/distinfo create mode 100644 sysutils/pkg_install/files/Makefile.inc create mode 100644 sysutils/pkg_install/files/patch-lib_Makefile create mode 100644 sysutils/pkg_install/pkg-descr create mode 100644 sysutils/pkg_install/pkg-plist diff --git a/ports-mgmt/pkg_install/Makefile b/ports-mgmt/pkg_install/Makefile new file mode 100644 index 000000000000..4346c9a1c6e7 --- /dev/null +++ b/ports-mgmt/pkg_install/Makefile @@ -0,0 +1,51 @@ +# New ports collection makefile for: pkg_install +# Date created: 14 Jul 2003 +# Whom: Oliver Eikemeier +# +# $FreeBSD$ +# + +PORTNAME= pkg_install +PORTVERSION= 20030714 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= marcus + +MAINTAINER= portmgr@freebsd.org +COMMENT= FreeBSD 5.x version of the package tools for older system releases + +USE_BZIP2= yes +USE_OPENSSL= yes +MANCOMPRESSED= yes + +MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \ + pkg_info.1 pkg_sign.1 pkg_version.1 +MLINKS= pkg_sign.1 pkg_check.1 + +MAKE_ARGS= -DNOOBJ + +.include + +.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 + +.include diff --git a/ports-mgmt/pkg_install/distinfo b/ports-mgmt/pkg_install/distinfo new file mode 100644 index 000000000000..1be684082316 --- /dev/null +++ b/ports-mgmt/pkg_install/distinfo @@ -0,0 +1 @@ +MD5 (pkg_install-20030714.tar.bz2) = dd98b0275c6bb1e31089e67ea18f22b6 diff --git a/ports-mgmt/pkg_install/files/Makefile.inc b/ports-mgmt/pkg_install/files/Makefile.inc new file mode 100644 index 000000000000..3f26acacff36 --- /dev/null +++ b/ports-mgmt/pkg_install/files/Makefile.inc @@ -0,0 +1,4 @@ +# $FreeBSD$ + +BINDIR=%%PREFIX%%/sbin +MANDIR=%%MANPREFIX%%/man/man diff --git a/ports-mgmt/pkg_install/files/patch-lib_Makefile b/ports-mgmt/pkg_install/files/patch-lib_Makefile new file mode 100644 index 000000000000..ebe850a59b53 --- /dev/null +++ b/ports-mgmt/pkg_install/files/patch-lib_Makefile @@ -0,0 +1,20 @@ +--- lib/Makefile.orig Fri Jul 25 12:08:43 2003 ++++ lib/Makefile Fri Jul 25 12:08:45 2003 +@@ -1,12 +1,16 @@ + # $FreeBSD: /tmp/pcvs/ports/ports-mgmt/pkg_install/files/patch-lib_Makefile,v 1.1 2003-08-03 21:44:33 marcus Exp $ + + LIB= install +-INTERNALLIB= YES + SRCS= file.c msg.c plist.c str.c exec.c global.c pen.c match.c \ + deps.c version.c pkgwrap.c url.c ++NOPROFILE= yes ++NOPIC= yes + + CFLAGS+= ${DEBUG} + + WARNS?= 2 ++ ++install: ++ @echo -n + + .include diff --git a/ports-mgmt/pkg_install/pkg-descr b/ports-mgmt/pkg_install/pkg-descr new file mode 100644 index 000000000000..f8a20749e7ee --- /dev/null +++ b/ports-mgmt/pkg_install/pkg-descr @@ -0,0 +1,9 @@ +FreeBSD 5.x version of the pkg_install suite of tools for doing +maintainance of software packages. + +This is mainly useful on FreeBSD systems <= 4.6. + +WWW: http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/ + +-- Oliver Eikemeier +eikemeier@fillmore-labs.com diff --git a/ports-mgmt/pkg_install/pkg-plist b/ports-mgmt/pkg_install/pkg-plist new file mode 100644 index 000000000000..15d5f185a1dd --- /dev/null +++ b/ports-mgmt/pkg_install/pkg-plist @@ -0,0 +1,7 @@ +sbin/pkg_add +sbin/pkg_check +sbin/pkg_create +sbin/pkg_delete +sbin/pkg_info +sbin/pkg_sign +sbin/pkg_version diff --git a/sysutils/Makefile b/sysutils/Makefile index 071821866a8a..32e576409467 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -208,6 +208,7 @@ SUBDIR += perf SUBDIR += personality SUBDIR += pib + SUBDIR += pkg_install SUBDIR += pkg_remove SUBDIR += pkg_tree SUBDIR += pkill diff --git a/sysutils/pkg_install/Makefile b/sysutils/pkg_install/Makefile new file mode 100644 index 000000000000..4346c9a1c6e7 --- /dev/null +++ b/sysutils/pkg_install/Makefile @@ -0,0 +1,51 @@ +# New ports collection makefile for: pkg_install +# Date created: 14 Jul 2003 +# Whom: Oliver Eikemeier +# +# $FreeBSD$ +# + +PORTNAME= pkg_install +PORTVERSION= 20030714 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= marcus + +MAINTAINER= portmgr@freebsd.org +COMMENT= FreeBSD 5.x version of the package tools for older system releases + +USE_BZIP2= yes +USE_OPENSSL= yes +MANCOMPRESSED= yes + +MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \ + pkg_info.1 pkg_sign.1 pkg_version.1 +MLINKS= pkg_sign.1 pkg_check.1 + +MAKE_ARGS= -DNOOBJ + +.include + +.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 + +.include diff --git a/sysutils/pkg_install/distinfo b/sysutils/pkg_install/distinfo new file mode 100644 index 000000000000..1be684082316 --- /dev/null +++ b/sysutils/pkg_install/distinfo @@ -0,0 +1 @@ +MD5 (pkg_install-20030714.tar.bz2) = dd98b0275c6bb1e31089e67ea18f22b6 diff --git a/sysutils/pkg_install/files/Makefile.inc b/sysutils/pkg_install/files/Makefile.inc new file mode 100644 index 000000000000..3f26acacff36 --- /dev/null +++ b/sysutils/pkg_install/files/Makefile.inc @@ -0,0 +1,4 @@ +# $FreeBSD$ + +BINDIR=%%PREFIX%%/sbin +MANDIR=%%MANPREFIX%%/man/man diff --git a/sysutils/pkg_install/files/patch-lib_Makefile b/sysutils/pkg_install/files/patch-lib_Makefile new file mode 100644 index 000000000000..af4bc047c4f8 --- /dev/null +++ b/sysutils/pkg_install/files/patch-lib_Makefile @@ -0,0 +1,20 @@ +--- lib/Makefile.orig Fri Jul 25 12:08:43 2003 ++++ lib/Makefile Fri Jul 25 12:08:45 2003 +@@ -1,12 +1,16 @@ + # $FreeBSD: /tmp/pcvs/ports/sysutils/pkg_install/files/Attic/patch-lib_Makefile,v 1.1 2003-08-03 21:44:33 marcus Exp $ + + LIB= install +-INTERNALLIB= YES + SRCS= file.c msg.c plist.c str.c exec.c global.c pen.c match.c \ + deps.c version.c pkgwrap.c url.c ++NOPROFILE= yes ++NOPIC= yes + + CFLAGS+= ${DEBUG} + + WARNS?= 2 ++ ++install: ++ @echo -n + + .include diff --git a/sysutils/pkg_install/pkg-descr b/sysutils/pkg_install/pkg-descr new file mode 100644 index 000000000000..f8a20749e7ee --- /dev/null +++ b/sysutils/pkg_install/pkg-descr @@ -0,0 +1,9 @@ +FreeBSD 5.x version of the pkg_install suite of tools for doing +maintainance of software packages. + +This is mainly useful on FreeBSD systems <= 4.6. + +WWW: http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/ + +-- Oliver Eikemeier +eikemeier@fillmore-labs.com diff --git a/sysutils/pkg_install/pkg-plist b/sysutils/pkg_install/pkg-plist new file mode 100644 index 000000000000..15d5f185a1dd --- /dev/null +++ b/sysutils/pkg_install/pkg-plist @@ -0,0 +1,7 @@ +sbin/pkg_add +sbin/pkg_check +sbin/pkg_create +sbin/pkg_delete +sbin/pkg_info +sbin/pkg_sign +sbin/pkg_version