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