2005-05-16 02:09:33 +02:00
|
|
|
# $NetBSD: Makefile,v 1.112 2005/05/16 00:09:33 jlam Exp $
|
1998-08-28 14:25:35 +02:00
|
|
|
|
2002-12-20 19:15:52 +01:00
|
|
|
# Notes to package maintainers:
|
2002-12-12 02:50:47 +01:00
|
|
|
#
|
2002-12-20 19:15:52 +01:00
|
|
|
# To update this package, import from src/usr.sbin/pkg_install.
|
2002-12-12 02:50:47 +01:00
|
|
|
#
|
2002-12-20 19:15:52 +01:00
|
|
|
# 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.
|
2002-12-12 02:50:47 +01:00
|
|
|
|
2002-12-20 19:15:52 +01:00
|
|
|
DISTNAME= pkg_install-${VERSION}
|
1998-08-28 14:25:35 +02:00
|
|
|
CATEGORIES= pkgtools
|
2002-12-20 19:15:52 +01:00
|
|
|
MASTER_SITES= # empty
|
|
|
|
DISTFILES= # empty
|
1998-08-28 14:25:35 +02:00
|
|
|
|
2003-07-18 00:50:55 +02:00
|
|
|
MAINTAINER= tech-pkg@NetBSD.org
|
2003-09-11 09:14:42 +02:00
|
|
|
HOMEPAGE= http://www.pkgsrc.org/
|
2003-12-22 01:23:35 +01:00
|
|
|
COMMENT= Package management and administration tools for pkgsrc
|
1998-08-28 14:25:35 +02:00
|
|
|
|
2002-12-20 19:15:52 +01:00
|
|
|
GNU_CONFIGURE= # defined
|
|
|
|
CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR}
|
2005-02-14 03:30:39 +01:00
|
|
|
CONFIGURE_ARGS+= --with-ftp="\"${FETCH_CMD}"\"
|
|
|
|
CONFIGURE_ARGS+= --with-mtree="\"${MTREE}"\"
|
|
|
|
CONFIGURE_ARGS+= --with-pax="\"${PAX}"\"
|
|
|
|
CONFIGURE_ARGS+= --with-tar="\"${TAR}"\"
|
2005-05-16 02:09:33 +02:00
|
|
|
USE_TOOLS= mtree pax tar
|
2002-12-20 19:15:52 +01:00
|
|
|
|
2003-01-09 14:13:04 +01:00
|
|
|
NO_PKGTOOLS_REQD_CHECK= # defined
|
2002-12-20 19:15:52 +01:00
|
|
|
NO_CHECKSUM= # defined
|
|
|
|
NO_MTREE= # defined
|
2003-01-10 13:01:43 +01:00
|
|
|
PKG_PRESERVE= # defined
|
1998-08-28 14:25:35 +02:00
|
|
|
|
2004-03-13 22:00:19 +01:00
|
|
|
# These are needed to solve a chicken-and-egg problem where pkgsrc uses
|
2004-03-13 20:12:26 +01:00
|
|
|
# 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
|
2004-03-13 22:00:19 +01:00
|
|
|
# pkg_install. We also avoid building digest as that would involve
|
|
|
|
# using the newer pkg_install tools.
|
2004-11-02 01:10:15 +01:00
|
|
|
# We also use the newly built pkg_delete since upgrading from
|
|
|
|
# an older pkg_install might required features of the new program.
|
2004-03-13 20:12:26 +01:00
|
|
|
#
|
|
|
|
USE_NATIVE_GCC= yes
|
2004-03-13 22:00:19 +01:00
|
|
|
USE_DIGEST= no
|
2004-11-02 01:10:15 +01:00
|
|
|
PKG_DELETE= ${WRKSRC}/delete/pkg_delete
|
2004-03-13 20:12:26 +01:00
|
|
|
|
2003-10-11 09:29:29 +02:00
|
|
|
PLIST_SUBST+= MANDIR=${MANDIR}
|
|
|
|
PLIST_SUBST+= PKG_TOOLS_BIN=${PKG_TOOLS_BIN}
|
|
|
|
|
2004-04-09 20:38:12 +02:00
|
|
|
CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
|
|
|
|
|
2004-02-11 12:41:43 +01:00
|
|
|
MAKE_ENV+= MACHINE_ARCH="${MACHINE_ARCH}"
|
|
|
|
MAKE_ENV+= OPSYS="${OPSYS}"
|
2004-01-15 02:40:13 +01:00
|
|
|
|
2001-02-25 04:42:16 +01:00
|
|
|
PKG_DBDIR?= /var/db/pkg
|
2003-09-01 18:27:07 +02:00
|
|
|
PKG_INFO= PKG_DBDIR=${PKG_DBDIR} ${PKG_INFO_CMD}
|
2004-02-09 23:04:12 +01:00
|
|
|
PKG_ADMIN= PKG_DBDIR=${PKG_DBDIR} ${PKG_ADMIN_CMD}
|
1998-08-28 14:25:35 +02:00
|
|
|
|
2004-02-09 05:52:10 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
VERSION!= ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
|
|
|
|
${FILESDIR}/lib/version.h
|
|
|
|
|
2002-12-20 19:15:52 +01:00
|
|
|
do-extract:
|
2005-01-06 06:32:29 +01:00
|
|
|
@${CP} -R ${FILESDIR} ${WRKSRC}
|
2001-10-30 15:12:37 +01:00
|
|
|
|
1999-03-13 04:47:49 +01:00
|
|
|
post-install:
|
2003-08-31 13:06:02 +02:00
|
|
|
if [ ! -f ${PKG_DBDIR}/pkgdb.byfile.db ]; then \
|
|
|
|
if [ ! -d ${PKG_DBDIR} ]; then \
|
|
|
|
${INSTALL_DATA_DIR} ${PKG_DBDIR}; \
|
|
|
|
fi; \
|
2003-08-31 13:55:09 +02:00
|
|
|
${PKG_ADMIN} rebuild; \
|
1999-03-30 14:52:36 +02:00
|
|
|
fi
|
1999-03-13 04:47:49 +01:00
|
|
|
|
2004-12-09 22:29:06 +01:00
|
|
|
# XXX Reverse the order that update does things since
|
|
|
|
# XXX we need pkg_delete built before we can deinstall.
|
|
|
|
# XXX This should probably be the default order for all packages.
|
|
|
|
update:
|
|
|
|
${MAKE}
|
|
|
|
${MAKE} deinstall UPDATE_RUNNING=YES
|
|
|
|
${MAKE} install
|
2005-01-22 02:03:45 +01:00
|
|
|
${MAKE} clean
|
2004-12-09 22:29:06 +01:00
|
|
|
|
2004-08-14 04:33:51 +02:00
|
|
|
.include "../../pkgtools/libnbcompat/inplace.mk"
|
1998-08-28 14:25:35 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|
2003-01-09 14:13:04 +01:00
|
|
|
|
2003-01-11 12:59:35 +01:00
|
|
|
PREFIX:= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
|
2003-01-11 08:54:28 +01:00
|
|
|
.if ${PREFIX} == "/usr"
|
2003-01-11 08:52:15 +01:00
|
|
|
CONFIGURE_ARGS+= --mandir=${PREFIX}/share/man
|
2003-10-11 09:29:29 +02:00
|
|
|
MANDIR= share/
|
2003-01-11 08:52:15 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --mandir=${PREFIX}/man
|
2003-10-11 09:29:29 +02:00
|
|
|
MANDIR= # empty
|
2003-01-11 08:54:28 +01:00
|
|
|
.endif
|