2006-07-19 01:06:41 +02:00
|
|
|
# $NetBSD: Makefile,v 1.128 2006/07/18 23:06:41 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
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@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
|
|
|
|
2005-09-28 22:52:18 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2006-01-06 20:46:26 +01:00
|
|
|
CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR:Q}
|
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}"\"
|
2006-01-06 20:46:26 +01:00
|
|
|
USE_TOOLS+= mtree pax tar
|
2002-12-20 19:15:52 +01:00
|
|
|
|
2005-06-07 18:34:50 +02:00
|
|
|
# The following tools are needed by pkg_view and linkfarm.
|
2005-06-13 19:19:12 +02:00
|
|
|
USE_TOOLS+= chmod cmp cp env find grep ln mkdir rm rmdir \
|
2005-06-07 18:34:50 +02:00
|
|
|
sed sort touch
|
|
|
|
|
2005-11-17 18:05:30 +01:00
|
|
|
SKIP_AUDIT_PACKAGES= yes
|
2006-01-06 20:46:26 +01:00
|
|
|
NO_PKGTOOLS_REQD_CHECK= yes
|
2005-09-28 22:52:18 +02:00
|
|
|
NO_CHECKSUM= yes
|
|
|
|
NO_MTREE= yes
|
2006-01-06 20:46:26 +01:00
|
|
|
PKG_PRESERVE= yes
|
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
|
2006-07-19 01:06:41 +02:00
|
|
|
# pkg_install.
|
2005-11-06 23:15:44 +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
|
2005-11-06 23:15:44 +01:00
|
|
|
PKG_DELETE= ${WRKSRC}/delete/pkg_delete
|
2003-10-11 09:29:29 +02:00
|
|
|
|
2004-04-09 20:38:12 +02:00
|
|
|
CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
|
|
|
|
|
2006-01-06 20:46:26 +01:00
|
|
|
MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH:Q}
|
|
|
|
MAKE_ENV+= OPSYS=${OPSYS:Q}
|
2004-01-15 02:40:13 +01:00
|
|
|
|
2001-02-25 04:42:16 +01:00
|
|
|
PKG_DBDIR?= /var/db/pkg
|
2006-01-06 20:46:26 +01:00
|
|
|
PKG_INFO= PKG_DBDIR=${PKG_DBDIR:Q} ${PKG_INFO_CMD}
|
|
|
|
PKG_ADMIN= PKG_DBDIR=${PKG_DBDIR:Q} ${PKG_ADMIN_CMD}
|
1998-08-28 14:25:35 +02:00
|
|
|
|
2006-01-06 20:46:26 +01:00
|
|
|
PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q}
|
2005-11-06 23:15:44 +01:00
|
|
|
|
2006-03-10 23:38:30 +01:00
|
|
|
DEINSTALL_SRC= # empty
|
2006-03-14 02:14:26 +01:00
|
|
|
INSTALL_SRC= ${PKGDIR}/INSTALL
|
2006-03-10 23:38:30 +01:00
|
|
|
FILES_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q} \
|
|
|
|
PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q} \
|
|
|
|
MKDIR=${MKDIR:Q}
|
|
|
|
|
2004-02-09 05:52:10 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2005-11-06 23:15:44 +01:00
|
|
|
PKG_TOOLS_PREFIX= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
|
2004-02-09 05:52:10 +01:00
|
|
|
VERSION!= ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
|
|
|
|
${FILESDIR}/lib/version.h
|
|
|
|
|
2005-11-06 23:15:44 +01:00
|
|
|
# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
|
|
|
|
# XXX set PKGMANDIR to be other than "share/man".
|
|
|
|
# XXX
|
|
|
|
.if !empty(PKG_TOOLS_PREFIX:M/usr)
|
|
|
|
PKGMANDIR= share/man
|
|
|
|
.endif
|
|
|
|
|
2006-06-09 18:12:08 +02:00
|
|
|
# If ${PKG_TOOLS_PREFIX} doesn't match ${LOCALBASE}, then don't run
|
|
|
|
# check-files since it's likely ${PKG_TOOLS_PREFIX} contains directories
|
|
|
|
# that shouldn't be checked.
|
|
|
|
#
|
|
|
|
.if ${PKG_TOOLS_PREFIX} != ${LOCALBASE}
|
|
|
|
CHECK_FILES_SUPPORTED= no
|
|
|
|
.endif
|
|
|
|
|
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
|
|
|
|
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}
|
2006-06-13 15:57:10 +02:00
|
|
|
${MAKE} deinstall _UPDATE_RUNNING=YES
|
2005-11-06 23:17:53 +01:00
|
|
|
${MAKE} ${UPDATE_TARGET}
|
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
|
|
|
|
2005-11-06 23:15:44 +01:00
|
|
|
PREFIX:= ${PKG_TOOLS_PREFIX}
|