*** It includes DB functionality on different platforms. *** *** It includes a new pkg_add -u switch (and -r is old -u). *** *** This package can be registered as a package. *** This is a custom pkg_install: 1) configures for more db versions. 2) integrates a new package upgrade routine where it overwrites instead of pkg_delete'ing first (see pkg_add man page) 3) pkg_add -r is the replace mechanism -- it is the old -u switch 4) pkg_add -u is the new overwriting upgrade option 5) currently the part to delete files no longer included after upgrade is disabled (for now for testing)
95 lines
2.8 KiB
Makefile
95 lines
2.8 KiB
Makefile
# $NetBSD: Makefile,v 1.1.1.1 2004/04/02 05:57:35 jeremy-c-reed Exp $
|
|
|
|
# Notes to package maintainers:
|
|
#
|
|
# To update this package, import from src/usr.sbin/pkg_install.
|
|
#
|
|
# Updating this package does not automatically necessitate bumping
|
|
# PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical
|
|
# change in the pkg_* tools that pkgsrc relies on for proper operation.
|
|
|
|
DISTNAME= pkg_install-${VERSION}
|
|
CATEGORIES= pkgtools
|
|
MASTER_SITES= # empty
|
|
DISTFILES= # empty
|
|
|
|
MAINTAINER= tech-pkg@NetBSD.org
|
|
HOMEPAGE= http://www.pkgsrc.org/
|
|
COMMENT= Package management and administration tools for pkgsrc
|
|
|
|
GNU_CONFIGURE= # defined
|
|
CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR}
|
|
CONFIGURE_ARGS+= --with-ftp=${FETCH_CMD}
|
|
CONFIGURE_ARGS+= --with-mtree=${MTREE}
|
|
CONFIGURE_ARGS+= --with-pax=${PAX}
|
|
CONFIGURE_ARGS+= --with-tar=${TAR}
|
|
|
|
NO_PKGTOOLS_REQD_CHECK= # defined
|
|
NO_BUILDLINK= # defined
|
|
NO_CHECKSUM= # defined
|
|
NO_MTREE= # defined
|
|
# Removing this package would break pkgsrc, so allow this package to
|
|
# reinstall over itself.
|
|
# XXX need to figure out a way not to have multiple pkg entries for old ones.
|
|
FORCE_PKG_REGISTER= # defined
|
|
PKG_PRESERVE= # defined
|
|
|
|
# These are needed to solve a chicken-and-egg problem where pkgsrc uses
|
|
# newer features of pkg_install, but older NetBSD installations won't
|
|
# support them. In this case, we explicitly use the native GCC
|
|
# compiler to avoid problems with depending on pkgsrc GCC for building
|
|
# pkg_install. We also avoid building digest as that would involve
|
|
# using the newer pkg_install tools.
|
|
#
|
|
USE_NATIVE_GCC= yes
|
|
USE_DIGEST= no
|
|
|
|
PLIST_SUBST+= MANDIR=${MANDIR}
|
|
PLIST_SUBST+= PKG_TOOLS_BIN=${PKG_TOOLS_BIN}
|
|
|
|
LIBNBCOMPAT_FILESDIR= ${.CURDIR}/../../pkgtools/libnbcompat/files
|
|
LIBNBCOMPAT_SRCDIR= ${WRKDIR}/libnbcompat
|
|
|
|
CFLAGS+= -I${LIBNBCOMPAT_SRCDIR}
|
|
LDFLAGS+= -L${LIBNBCOMPAT_SRCDIR}
|
|
LIBS+= -lnbcompat
|
|
|
|
MAKE_ENV+= MACHINE_ARCH="${MACHINE_ARCH}"
|
|
MAKE_ENV+= OPSYS="${OPSYS}"
|
|
|
|
MAKE_DIRS+= ${PKG_DBDIR}
|
|
|
|
PKG_DBDIR?= /var/db/pkg
|
|
PKG_INFO= PKG_DBDIR=${PKG_DBDIR} ${PKG_INFO_CMD}
|
|
PKG_ADMIN= PKG_DBDIR=${PKG_DBDIR} ${PKG_ADMIN_CMD}
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
VERSION!= ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
|
|
${FILESDIR}/lib/version.h
|
|
|
|
do-extract:
|
|
@${CP} -Rp ${LIBNBCOMPAT_FILESDIR} ${LIBNBCOMPAT_SRCDIR}
|
|
@${CP} -Rp ${FILESDIR} ${WRKSRC}
|
|
|
|
pre-configure:
|
|
cd ${LIBNBCOMPAT_SRCDIR} && ${SETENV} \
|
|
CC="${CC}" CPPFLAGS="${CPPFLAGS:M*}" ./configure && \
|
|
${MAKE_PROGRAM}
|
|
|
|
post-install:
|
|
if [ ! -f ${PKG_DBDIR}/pkgdb.byfile.db ]; then \
|
|
${PKG_ADMIN} rebuild; \
|
|
fi
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|
|
|
|
PREFIX:= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
|
|
.if ${PREFIX} == "/usr"
|
|
# XXX This should be fixed to use _MAN_DIR
|
|
CONFIGURE_ARGS+= --mandir=${PREFIX}/share/man
|
|
MANDIR= share/
|
|
.else
|
|
CONFIGURE_ARGS+= --mandir=${PREFIX}/man
|
|
MANDIR= # empty
|
|
.endif
|