Annotation of pkgsrc/pkgtools/pkg_install/Makefile, Revision 1.123
1.123 ! jlam 1: # $NetBSD: Makefile,v 1.122 2006/01/06 19:46:26 rillig Exp $
1.4 hubertf 2:
1.58 schmonz 3: # Notes to package maintainers:
1.57 hubertf 4: #
1.58 schmonz 5: # To update this package, import from src/usr.sbin/pkg_install.
1.57 hubertf 6: #
1.58 schmonz 7: # Updating this package does not automatically necessitate bumping
8: # PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical
9: # change in the pkg_* tools that pkgsrc relies on for proper operation.
1.57 hubertf 10:
1.58 schmonz 11: DISTNAME= pkg_install-${VERSION}
1.1 agc 12: CATEGORIES= pkgtools
1.58 schmonz 13: MASTER_SITES= # empty
14: DISTFILES= # empty
1.1 agc 15:
1.123 ! jlam 16: MAINTAINER= pkgsrc-users@NetBSD.org
1.82 reed 17: HOMEPAGE= http://www.pkgsrc.org/
1.90 grant 18: COMMENT= Package management and administration tools for pkgsrc
1.60 schmonz 19:
1.115 rillig 20: GNU_CONFIGURE= yes
1.122 rillig 21: CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR:Q}
1.110 uebayasi 22: CONFIGURE_ARGS+= --with-ftp="\"${FETCH_CMD}"\"
23: CONFIGURE_ARGS+= --with-mtree="\"${MTREE}"\"
24: CONFIGURE_ARGS+= --with-pax="\"${PAX}"\"
25: CONFIGURE_ARGS+= --with-tar="\"${TAR}"\"
1.122 rillig 26: USE_TOOLS+= mtree pax tar
1.58 schmonz 27:
1.113 jlam 28: # The following tools are needed by pkg_view and linkfarm.
1.114 jlam 29: USE_TOOLS+= chmod cmp cp env find grep ln mkdir rm rmdir \
1.113 jlam 30: sed sort touch
31:
1.121 erh 32: SKIP_AUDIT_PACKAGES= yes
1.122 rillig 33: NO_PKGTOOLS_REQD_CHECK= yes
1.115 rillig 34: NO_CHECKSUM= yes
35: NO_MTREE= yes
1.122 rillig 36: PKG_PRESERVE= yes
1.117 jlam 37: INSTALL_FILE= ${PKG_DB_TMPDIR}/+INSTALL
1.122 rillig 38: INSTALL_SCRIPTS_ENV+= PKG_PREFIX=${PREFIX:Q}
1.1 agc 39:
1.97 jlam 40: # These are needed to solve a chicken-and-egg problem where pkgsrc uses
1.96 jlam 41: # newer features of pkg_install, but older NetBSD installations won't
42: # support them. In this case, we explicitly use the native GCC
43: # compiler to avoid problems with depending on pkgsrc GCC for building
1.97 jlam 44: # pkg_install. We also avoid building digest as that would involve
45: # using the newer pkg_install tools.
1.117 jlam 46: #
47: # We also use the newly built pkg_delete since upgrading from an older
48: # pkg_install might required features of the new program.
1.96 jlam 49: #
50: USE_NATIVE_GCC= yes
1.97 jlam 51: USE_DIGEST= no
1.117 jlam 52: PKG_DELETE= ${WRKSRC}/delete/pkg_delete
1.89 grant 53:
1.100 tv 54: CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
55:
1.122 rillig 56: MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH:Q}
57: MAKE_ENV+= OPSYS=${OPSYS:Q}
1.91 grant 58:
1.92 jlam 59: PKG_DBDIR?= /var/db/pkg
1.122 rillig 60: PKG_INFO= PKG_DBDIR=${PKG_DBDIR:Q} ${PKG_INFO_CMD}
61: PKG_ADMIN= PKG_DBDIR=${PKG_DBDIR:Q} ${PKG_ADMIN_CMD}
1.92 jlam 62:
1.122 rillig 63: PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q}
1.117 jlam 64:
1.92 jlam 65: .include "../../mk/bsd.prefs.mk"
66:
1.117 jlam 67: PKG_TOOLS_PREFIX= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
1.58 schmonz 68: VERSION!= ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
69: ${FILESDIR}/lib/version.h
1.78 jlam 70:
1.117 jlam 71: # XXX This breaks for those who set their own LOCALBASE to "/usr" and also
72: # XXX set PKGMANDIR to be other than "share/man".
73: # XXX
74: .if !empty(PKG_TOOLS_PREFIX:M/usr)
75: PKGMANDIR= share/man
76: .endif
77:
1.58 schmonz 78: do-extract:
1.107 tv 79: @${CP} -R ${FILESDIR} ${WRKSRC}
1.12 hubertf 80:
1.117 jlam 81: post-build:
82: ${SED} -e "s|@PKG_DBDIR@|${PKG_DBDIR}|g" \
1.120 jlam 83: -e "s|@PKG_TOOLS_BIN@|${PKG_TOOLS_BIN}|g" \
1.117 jlam 84: -e "s|@MKDIR@|${MKDIR}|g" \
85: ${PKGDIR}/INSTALL > ${INSTALL_FILE}
86: ${CHMOD} +x ${INSTALL_FILE}
87:
88: pre-install-script:
89: cd ${PKG_DB_TMPDIR} && ${SETENV} ${INSTALL_SCRIPTS_ENV} \
90: ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
91:
92: post-install-script:
93: cd ${PKG_DB_TMPDIR} && ${SETENV} ${INSTALL_SCRIPTS_ENV} \
94: ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
1.1 agc 95:
1.106 erh 96: # XXX Reverse the order that update does things since
97: # XXX we need pkg_delete built before we can deinstall.
98: # XXX This should probably be the default order for all packages.
99: update:
100: ${MAKE}
101: ${MAKE} deinstall UPDATE_RUNNING=YES
1.118 jlam 102: ${MAKE} ${UPDATE_TARGET}
1.108 jklos 103: ${MAKE} clean
1.106 erh 104:
1.103 jlam 105: .include "../../pkgtools/libnbcompat/inplace.mk"
1.1 agc 106: .include "../../mk/bsd.pkg.mk"
1.65 schmonz 107:
1.117 jlam 108: PREFIX:= ${PKG_TOOLS_PREFIX}
CVSweb <webmaster@jp.NetBSD.org>