Annotation of pkgsrc/pkgtools/pkg_install/Makefile, Revision 1.114
1.114 ! jlam 1: # $NetBSD: Makefile,v 1.113 2005/06/07 16:34:50 jlam 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.73 grant 16: MAINTAINER= tech-pkg@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.58 schmonz 20: GNU_CONFIGURE= # defined
21: CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR}
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.112 jlam 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.65 schmonz 32: NO_PKGTOOLS_REQD_CHECK= # defined
1.58 schmonz 33: NO_CHECKSUM= # defined
34: NO_MTREE= # defined
1.66 agc 35: PKG_PRESERVE= # defined
1.1 agc 36:
1.97 jlam 37: # These are needed to solve a chicken-and-egg problem where pkgsrc uses
1.96 jlam 38: # newer features of pkg_install, but older NetBSD installations won't
39: # support them. In this case, we explicitly use the native GCC
40: # compiler to avoid problems with depending on pkgsrc GCC for building
1.97 jlam 41: # pkg_install. We also avoid building digest as that would involve
42: # using the newer pkg_install tools.
1.105 erh 43: # We also use the newly built pkg_delete since upgrading from
44: # an older pkg_install might required features of the new program.
1.96 jlam 45: #
46: USE_NATIVE_GCC= yes
1.97 jlam 47: USE_DIGEST= no
1.105 erh 48: PKG_DELETE= ${WRKSRC}/delete/pkg_delete
1.96 jlam 49:
1.89 grant 50: PLIST_SUBST+= MANDIR=${MANDIR}
51: PLIST_SUBST+= PKG_TOOLS_BIN=${PKG_TOOLS_BIN}
52:
1.100 tv 53: CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
54:
1.95 grant 55: MAKE_ENV+= MACHINE_ARCH="${MACHINE_ARCH}"
56: MAKE_ENV+= OPSYS="${OPSYS}"
1.91 grant 57:
1.92 jlam 58: PKG_DBDIR?= /var/db/pkg
59: PKG_INFO= PKG_DBDIR=${PKG_DBDIR} ${PKG_INFO_CMD}
1.94 jlam 60: PKG_ADMIN= PKG_DBDIR=${PKG_DBDIR} ${PKG_ADMIN_CMD}
1.92 jlam 61:
62: .include "../../mk/bsd.prefs.mk"
63:
1.58 schmonz 64: VERSION!= ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
65: ${FILESDIR}/lib/version.h
1.78 jlam 66:
1.58 schmonz 67: do-extract:
1.107 tv 68: @${CP} -R ${FILESDIR} ${WRKSRC}
1.12 hubertf 69:
70: post-install:
1.75 jlam 71: if [ ! -f ${PKG_DBDIR}/pkgdb.byfile.db ]; then \
72: if [ ! -d ${PKG_DBDIR} ]; then \
73: ${INSTALL_DATA_DIR} ${PKG_DBDIR}; \
74: fi; \
1.77 jlam 75: ${PKG_ADMIN} rebuild; \
1.15 hubertf 76: fi
1.1 agc 77:
1.106 erh 78: # XXX Reverse the order that update does things since
79: # XXX we need pkg_delete built before we can deinstall.
80: # XXX This should probably be the default order for all packages.
81: update:
82: ${MAKE}
83: ${MAKE} deinstall UPDATE_RUNNING=YES
84: ${MAKE} install
1.108 jklos 85: ${MAKE} clean
1.106 erh 86:
1.103 jlam 87: .include "../../pkgtools/libnbcompat/inplace.mk"
1.1 agc 88: .include "../../mk/bsd.pkg.mk"
1.65 schmonz 89:
1.69 wiz 90: PREFIX:= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
1.68 schmonz 91: .if ${PREFIX} == "/usr"
1.67 schmonz 92: CONFIGURE_ARGS+= --mandir=${PREFIX}/share/man
1.89 grant 93: MANDIR= share/
1.67 schmonz 94: .else
95: CONFIGURE_ARGS+= --mandir=${PREFIX}/man
1.89 grant 96: MANDIR= # empty
1.68 schmonz 97: .endif
CVSweb <webmaster@jp.NetBSD.org>