| @@ -1,31 +1,39 @@ | | | @@ -1,31 +1,39 @@ |
1 | # $NetBSD: Makefile,v 1.12 2016/10/28 23:37:53 marino Exp $ | | 1 | # $NetBSD: Makefile,v 1.13 2016/11/14 18:59:12 marino Exp $ |
2 | | | 2 | |
3 | DISTNAME= pkg-1.8.7 | | 3 | DISTNAME= pkg-1.8.7 |
4 | PKGREVISION= 6 | | 4 | PKGREVISION= 6 |
5 | CATEGORIES= pkgtools | | 5 | CATEGORIES= pkgtools |
6 | MASTER_SITES= http://files.etoilebsd.net/pkg/ | | 6 | MASTER_SITES= http://files.etoilebsd.net/pkg/ |
7 | EXTRACT_SUFX= .tar.xz | | 7 | EXTRACT_SUFX= .tar.xz |
8 | | | 8 | |
9 | MAINTAINER= khorben@defora.org | | 9 | MAINTAINER= khorben@defora.org |
10 | HOMEPAGE= https://wiki.freebsd.org/pkgng | | 10 | HOMEPAGE= https://wiki.freebsd.org/pkgng |
11 | COMMENT= Package management tool for FreeBSD | | 11 | COMMENT= Package management tool for FreeBSD |
12 | LICENSE= 2-clause-bsd | | 12 | LICENSE= 2-clause-bsd |
13 | | | 13 | |
| | | 14 | BOOTSTRAP_PKG= yes |
14 | GNU_CONFIGURE= yes | | 15 | GNU_CONFIGURE= yes |
| | | 16 | USE_CWRAPPERS= no |
15 | USE_LANGUAGES= c | | 17 | USE_LANGUAGES= c |
16 | | | 18 | |
17 | CPPFLAGS+= -D_LOCALBASE="\"${PREFIX}\"" | | 19 | CPPFLAGS+= -D_LOCALBASE="\"${PREFIX}\"" |
18 | CPPFLAGS+= -DPORTSDIR="\"${PKG.portsdir}\"" | | 20 | CPPFLAGS+= -DPORTSDIR="\"${PKG.portsdir}\"" |
| | | 21 | CPPFLAGS+= -DDEFAULT_VULNXML_URL="\"http://muscles.dragonflybsd.org/pkgsrc-vuxml/vuln.xml.bz2\"" |
| | | 22 | |
| | | 23 | .if defined(DEBUG_PKGNG) |
| | | 24 | CFLAGS:= ${CFLAGS:N-O2} -ggdb -O0 |
| | | 25 | _STRIPFLAG_INSTALL= # don't strip |
| | | 26 | .endif |
19 | | | 27 | |
20 | AUTO_MKDIRS= yes | | 28 | AUTO_MKDIRS= yes |
21 | | | 29 | |
22 | EGDIR= ${PREFIX}/share/examples/pkg | | 30 | EGDIR= ${PREFIX}/share/examples/pkg |
23 | | | 31 | |
24 | CONF_FILES+= ${EGDIR}/bash_completion.d/_pkg.bash \ | | 32 | CONF_FILES+= ${EGDIR}/bash_completion.d/_pkg.bash \ |
25 | ${PKG_SYSCONFDIR}/bash_completion.d/_pkg.bash | | 33 | ${PKG_SYSCONFDIR}/bash_completion.d/_pkg.bash |
26 | CONF_FILES+= ${EGDIR}/periodic/daily/411.pkg-backup \ | | 34 | CONF_FILES+= ${EGDIR}/periodic/daily/411.pkg-backup \ |
27 | ${PKG_SYSCONFDIR}/periodic/daily/411.pkg-backup | | 35 | ${PKG_SYSCONFDIR}/periodic/daily/411.pkg-backup |
28 | CONF_FILES+= ${EGDIR}/periodic/daily/490.status-pkg-changes \ | | 36 | CONF_FILES+= ${EGDIR}/periodic/daily/490.status-pkg-changes \ |
29 | ${PKG_SYSCONFDIR}/periodic/daily/490.status-pkg-changes | | 37 | ${PKG_SYSCONFDIR}/periodic/daily/490.status-pkg-changes |
30 | CONF_FILES+= ${EGDIR}/periodic/security/410.pkg-audit \ | | 38 | CONF_FILES+= ${EGDIR}/periodic/security/410.pkg-audit \ |
31 | ${PKG_SYSCONFDIR}/periodic/security/410.pkg-audit | | 39 | ${PKG_SYSCONFDIR}/periodic/security/410.pkg-audit |
| @@ -46,40 +54,60 @@ SUBST_STAGE.manpages-prefix= pre-install | | | @@ -46,40 +54,60 @@ SUBST_STAGE.manpages-prefix= pre-install |
46 | SUBST_FILES.manpages-prefix= docs/pkg-install.8 docs/pkg-repo.8 | | 54 | SUBST_FILES.manpages-prefix= docs/pkg-install.8 docs/pkg-repo.8 |
47 | SUBST_FILES.manpages-prefix+= docs/pkg-search.8 docs/pkg-update.8 | | 55 | SUBST_FILES.manpages-prefix+= docs/pkg-search.8 docs/pkg-update.8 |
48 | SUBST_FILES.manpages-prefix+= docs/pkg-upgrade.8 docs/pkg.8 | | 56 | SUBST_FILES.manpages-prefix+= docs/pkg-upgrade.8 docs/pkg.8 |
49 | SUBST_FILES.manpages-prefix+= docs/pkg.conf.5 | | 57 | SUBST_FILES.manpages-prefix+= docs/pkg.conf.5 |
50 | SUBST_SED.manpages-prefix+= -e "s|/usr/local|${PREFIX}|g" | | 58 | SUBST_SED.manpages-prefix+= -e "s|/usr/local|${PREFIX}|g" |
51 | SUBST_MESSAGE.manpages-prefix= Correct the installation prefix in manual pages. | | 59 | SUBST_MESSAGE.manpages-prefix= Correct the installation prefix in manual pages. |
52 | | | 60 | |
53 | SUBST_CLASSES+= pkgconf-prefix | | 61 | SUBST_CLASSES+= pkgconf-prefix |
54 | SUBST_STAGE.pkgconf-prefix= pre-install | | 62 | SUBST_STAGE.pkgconf-prefix= pre-install |
55 | SUBST_FILES.pkgconf-prefix= src/pkg.conf.sample | | 63 | SUBST_FILES.pkgconf-prefix= src/pkg.conf.sample |
56 | SUBST_SED.pkgconf-prefix+= -e "s|/usr/local|${PREFIX}|g" | | 64 | SUBST_SED.pkgconf-prefix+= -e "s|/usr/local|${PREFIX}|g" |
57 | SUBST_MESSAGE.pkgconf-prefix= Correct the installation prefix in pkg.conf(5). | | 65 | SUBST_MESSAGE.pkgconf-prefix= Correct the installation prefix in pkg.conf(5). |
58 | | | 66 | |
59 | SUBST_CLASSES+= portsdir | | 67 | SUBST_CLASSES+= portsdir |
60 | SUBST_STAGE.portsdir= pre-install | | 68 | SUBST_STAGE.portsdir= pre-install |
61 | SUBST_FILES.portsdir= libpkg/pkg_config.c \ | | 69 | SUBST_FILES.portsdir= src/pkg.conf.sample \ |
62 | src/pkg.conf.sample \ | | 70 | docs/pkg-create.8 \ |
63 | docs/pkg-create.8 \ | | 71 | docs/pkg-set.8 \ |
64 | docs/pkg-set.8 \ | | 72 | docs/pkg-repo.8 \ |
65 | docs/pkg-repo.8 \ | | 73 | docs/pkg.conf.5 \ |
66 | docs/pkg.conf.5 \ | | 74 | docs/pkg-version.8 \ |
67 | docs/pkg-version.8 \ | | 75 | docs/pkg.8 |
68 | docs/pkg.8 | | 76 | SUBST_SED.portsdir= -e "s|/usr/ports|${PKG.portsdir}|g" \ |
69 | SUBST_SED.portsdir= -e "s|/usr/ports|${PKG.portsdir}|g" \ | | 77 | -e "s|/var/db/pkg|${PKGNG_DBDIR}|g" \ |
70 | -e "s|/var/db/pkg|${PKG_DBDIR}|g" \ | | 78 | -e "s|/var/cache/pkg|${VARBASE}/cache/pkgng|g" |
71 | -e "s|/var/cache/pkg|${VARBASE}/cache/pkgng|g" | | 79 | SUBST_MESSAGE.portsdir= Correct reference to FreeBSD portsdir. |
72 | SUBST_MESSAGE.portsdir= Correct reference to FreeBSD portsdir. | | 80 | |
| | | 81 | SUBST_CLASSES+= config |
| | | 82 | SUBST_STAGE.config= post-patch |
| | | 83 | SUBST_FILES.config= libpkg/pkg_config.c |
| | | 84 | SUBST_SED.config= -e "s|/usr/ports|${PKG.portsdir}|g" \ |
| | | 85 | -e "s|/var/db/pkg|${PKGNG_DBDIR}|g" \ |
| | | 86 | -e "s|/var/cache/pkg|${VARBASE}/cache/pkgng|g" |
| | | 87 | SUBST_MESSAGE.config= Update pkg(8) defaults. |
| | | 88 | |
| | | 89 | SUBST_CLASSES+= vuxml |
| | | 90 | SUBST_STAGE.vuxml= post-patch |
| | | 91 | SUBST_FILES.vuxml= libpkg/pkg_audit.c |
| | | 92 | SUBST_SED.vuxml= -e "s|https://vuxml.FreeBSD.org/freebsd|http://muscles.dragonflybsd.org/pkgsrc-vuxml/reports|" |
| | | 93 | SUBST_MESSAGE.vuxml= Direct audit reports to Pkgsrc vuxml |
| | | 94 | |
| | | 95 | SUBST_CLASSES+= ldhints |
| | | 96 | SUBST_STAGE.ldhints= post-patch |
| | | 97 | SUBST_FILES.ldhints= libpkg/private/ldconfig.h libpkg/elfhints.c |
| | | 98 | SUBST_SED.ldhints= -e "s|/var/run/ld-elf.so.hints|/var/run/ld.so.hints|" \ |
| | | 99 | -e 's,ifndef __linux__,if defined __FreeBSD__ || defined __DragonFly__,' |
| | | 100 | SUBST_MESSAGE.ldhints= Disable ldconfig hints for NetBSD |
73 | | | 101 | |
74 | .if defined(PACKAGE_BUILDING) # set by Synth which has custom location, so use default path | | 102 | .if defined(PACKAGE_BUILDING) # set by Synth which has custom location, so use default path |
75 | PKG.portsdir?= /usr/pkgsrc | | 103 | PKG.portsdir?= /usr/pkgsrc |
76 | .else | | 104 | .else |
77 | PKG.portsdir?= ${PKGSRCDIR} | | 105 | PKG.portsdir?= ${PKGSRCDIR} |
78 | .endif | | 106 | .endif |
79 | | | 107 | |
80 | # DragonFly SSL libraries are private. pkg(8) is the one exception of a userland | | 108 | # DragonFly SSL libraries are private. pkg(8) is the one exception of a userland |
81 | # program that is allowed to link to them due to bootstrap reasons | | 109 | # program that is allowed to link to them due to bootstrap reasons |
82 | .if exists(/usr/lib/priv/libprivate_ssl.so) | | 110 | .if exists(/usr/lib/priv/libprivate_ssl.so) |
83 | BUILDLINK_PASSTHRU_RPATHDIRS= /lib/priv | | 111 | BUILDLINK_PASSTHRU_RPATHDIRS= /lib/priv |
84 | .endif | | 112 | .endif |
85 | | | 113 | |
| @@ -103,17 +131,24 @@ post-patch: | | | @@ -103,17 +131,24 @@ post-patch: |
103 | .endif | | 131 | .endif |
104 | | | 132 | |
105 | post-install: | | 133 | post-install: |
106 | ${RM} ${DESTDIR}${PREFIX}/sbin/pkg2ng | | 134 | ${RM} ${DESTDIR}${PREFIX}/sbin/pkg2ng |
107 | ${RM} -rf ${DESTDIR}${EGDIR}/periodic | | 135 | ${RM} -rf ${DESTDIR}${EGDIR}/periodic |
108 | ${MV} ${DESTDIR}${PREFIX}/etc/bash_completion.d \ | | 136 | ${MV} ${DESTDIR}${PREFIX}/etc/bash_completion.d \ |
109 | ${DESTDIR}${EGDIR}/ | | 137 | ${DESTDIR}${EGDIR}/ |
110 | ${MV} ${DESTDIR}${PREFIX}/etc/periodic \ | | 138 | ${MV} ${DESTDIR}${PREFIX}/etc/periodic \ |
111 | ${DESTDIR}${EGDIR}/ | | 139 | ${DESTDIR}${EGDIR}/ |
112 | ${MV} ${DESTDIR}${PREFIX}/etc/pkg.conf.sample \ | | 140 | ${MV} ${DESTDIR}${PREFIX}/etc/pkg.conf.sample \ |
113 | ${DESTDIR}${EGDIR}/ | | 141 | ${DESTDIR}${EGDIR}/ |
114 | | | 142 | |
115 | .include "../../mk/bsd.prefs.mk" | | 143 | .include "../../mk/bsd.prefs.mk" |
| | | 144 | |
| | | 145 | .if defined (PKG_DBDIR) |
| | | 146 | PKGNG_DBDIR?= ${PKG_DBDIR} |
| | | 147 | .else |
| | | 148 | PKGNG_DBDIR?= /var/db/pkgng |
| | | 149 | .endif |
| | | 150 | |
116 | .if ${OPSYS} != "FreeBSD" && ${OPSYS} != "DragonFly" && ${OPSYS} != "NetBSD" | | 151 | .if ${OPSYS} != "FreeBSD" && ${OPSYS} != "DragonFly" && ${OPSYS} != "NetBSD" |
117 | .include "../../archivers/libarchive/buildlink3.mk" | | 152 | .include "../../archivers/libarchive/buildlink3.mk" |
118 | .endif | | 153 | .endif |
119 | .include "../../mk/bsd.pkg.mk" | | 154 | .include "../../mk/bsd.pkg.mk" |