[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg

File: [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg / Makefile (download)

Revision 1.28, Mon Sep 21 03:03:55 2020 UTC (5 months, 1 week ago) by khorben
Branch: MAIN
CVS Tags: pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, HEAD
Changes since 1.27: +2 -3 lines

pkg: update to version

Changes from pkg to
- Sort fts traversal in repo creation
- Fix floating pint exception when packaging packages with weird elf files
- More test cases for config merge
- Fix running the testsuite on linux and osx
- Fix pkg version regarding flavors
- Add support for creating packages with a hash in their names
- Accept DT_SONAME anywhere in .dynamic
- make pkg version -r imply -R
- Some fixes for the progression display
- Rename some variables in security periodic scripts.
- Parse FreeBSD OS version and forbid to install too new packages

Changes from pkg to
- Lots of fixes/improvements on periodic scripts
- Fix typo in the .pc file
- Only check for origin if the strings contains / in pkg version
- Support flags when exporting the metalog
- Ignore flags when installing as a user
- fix again using pattern as package arch
- recognize armv7
- add %q to pkg_printf(3) and pkg-query(8) to print altabi
- add an extra line when printing pkg-messages to improve readability
- stop considering nfs as dangerous and if a corruption happens on nfs drive
  by a message the user to the highly possible reason of the corruption so
  he can fix
- zsh completion imrpovements

Changes from pkg to
- pkg clean is now happy if the cache dir non existing
- 410.pkg-audit now uses anticongestion on freebsd 12
- fix pkg install -r foo if foo is a disabled repository
- fix elf handling on non FreeBSD
- fix support for platforms without AT_SYMLINK_NOFOLLOW
- fix dropping privileges on Linux
- fix build with recent libbsd
- fix duplicate pkg registration overwriting the existing pkg
- better ABI name on linux
- lots of changes in internal API to use fd when possible
- removed option: pkg repo -L

Changes from pkg 1.10
- Use dep_formula in the solver
- Cache pw result to avoid over reloading nssswitch.conf
- Remove pkg2ng and support for pkg_ databases

# $NetBSD: Makefile,v 1.28 2020/09/21 03:03:55 khorben Exp $

CATEGORIES=	pkgtools
MASTER_SITES=	http://files.etoilebsd.net/pkg/

MAINTAINER=	khorben@defora.org
HOMEPAGE=	https://wiki.freebsd.org/pkgng
COMMENT=	Package management tool for FreeBSD
LICENSE=	2-clause-bsd


LDFLAGS+=	-pthread
CPPFLAGS+=	-DPORTSDIR="\"${PKG.portsdir}\""
CPPFLAGS+=	-DDEFAULT_VULNXML_URL="\"http://muscles.dragonflybsd.org/pkgsrc-vuxml/vuln.xml.bz2\""

.if defined(DEBUG_PKGNG)
CFLAGS:=		${CFLAGS:N-O2} -ggdb -O0
_STRIPFLAG_INSTALL=	# don't strip


EGDIR=		${PREFIX}/share/examples/pkg

CONF_FILES+=	${EGDIR}/bash_completion.d/_pkg.bash \
CONF_FILES+=	${EGDIR}/periodic/daily/411.pkg-backup \
CONF_FILES+=	${EGDIR}/periodic/daily/490.status-pkg-changes \
CONF_FILES+=	${EGDIR}/periodic/security/410.pkg-audit \
CONF_FILES+=	${EGDIR}/periodic/security/460.pkg-checksum \
CONF_FILES+=	${EGDIR}/periodic/weekly/400.status-pkg \
CONF_FILES+=	${EGDIR}/pkg.conf.sample \

OWN_DIRS=	${PKG_SYSCONFDIR}/bash_completion.d \
		${PKG_SYSCONFDIR}/periodic/daily \
		${PKG_SYSCONFDIR}/periodic/security \

SUBST_CLASSES+=			manpages-prefix
SUBST_STAGE.manpages-prefix=	pre-install
SUBST_FILES.manpages-prefix=	docs/pkg-install.8 docs/pkg-repo.8
SUBST_FILES.manpages-prefix+=	docs/pkg-search.8 docs/pkg-update.8
SUBST_FILES.manpages-prefix+=	docs/pkg-upgrade.8 docs/pkg.8
SUBST_FILES.manpages-prefix+=	docs/pkg.conf.5
SUBST_SED.manpages-prefix+=	-e "s|/usr/local|${PREFIX}|g"
SUBST_MESSAGE.manpages-prefix=	Correct the installation prefix in manual pages.

SUBST_CLASSES+=			pkgconf-prefix
SUBST_STAGE.pkgconf-prefix=	pre-install
SUBST_FILES.pkgconf-prefix=	src/pkg.conf.sample
SUBST_SED.pkgconf-prefix+=	-e "s|/usr/local|${PREFIX}|g"
SUBST_MESSAGE.pkgconf-prefix=	Correct the installation prefix in pkg.conf(5).

SUBST_CLASSES+=		portsdir
SUBST_STAGE.portsdir=	pre-install
SUBST_FILES.portsdir=	src/pkg.conf.sample \
			docs/pkg-create.8 \
			docs/pkg-set.8 \
			docs/pkg-repo.8 \
			docs/pkg.conf.5 \
			docs/pkg-version.8 \
SUBST_SED.portsdir=	-e "s|/usr/ports|${PKG.portsdir}|g" \
			-e "s|/var/db/pkg|${PKGNG_DBDIR}|g" \
			-e "s|/var/cache/pkg|${VARBASE}/cache/pkgng|g"
SUBST_MESSAGE.portsdir=	Correct reference to FreeBSD portsdir.

SUBST_STAGE.config=	pre-configure
SUBST_FILES.config=	libpkg/pkg_config.c
SUBST_SED.config=	-e "s|/usr/ports|${PKG.portsdir}|g" \
			-e "s|/var/db/pkg|${PKGNG_DBDIR}|g" \
			-e "s|/var/cache/pkg|${VARBASE}/cache/pkgng|g"
SUBST_MESSAGE.config=	Update pkg(8) defaults.

SUBST_STAGE.vuxml=	pre-configure
SUBST_FILES.vuxml=	libpkg/pkg_audit.c
SUBST_SED.vuxml=	-e "s|https://vuxml.FreeBSD.org/freebsd|http://muscles.dragonflybsd.org/pkgsrc-vuxml/reports|"
SUBST_MESSAGE.vuxml=	Direct audit reports to Pkgsrc vuxml

# Install manpages under ${PKGMANDIR}.

.if defined(PACKAGE_BUILDING) # set by Synth which has custom location, so use default path
PKG.portsdir?=	/usr/pkgsrc
PKG.portsdir?=	${PKGSRCDIR}

# DragonFly SSL libraries are private.  pkg(8) is the one exception of a userland
# program that is allowed to link to them due to bootstrap reasons
.if exists(/usr/lib/priv/libprivate_ssl.so)

# DragonFly SSL libraries are private.
.if exists(/usr/lib/priv/libprivate_ssl.so)
	${SED} -i.bak \
		-e 's|lssl|lprivate_ssl|' \
		-e 's|lcrypto|lprivate_crypto|' \
		-e 's|la_rpath = |la_rpath = -R/lib/priv |' \
		${WRKSRC}/libpkg/Makefile.in \
		${WRKSRC}/src/Makefile.in \
	${SED} -i.bak \
		-e '/OS_CFLAGS=/ s|SOURCE|SOURCE -I/usr/include/priv|' \
		-e '/OS_LDFLAGS=/ s|=|="-L/usr/lib/priv -R/lib/priv"|' \

	${RM} -rf ${DESTDIR}${EGDIR}/periodic
	${MV} ${DESTDIR}${PREFIX}/etc/bash_completion.d \
	${MV} ${DESTDIR}${PREFIX}/etc/periodic \
	${MV} ${DESTDIR}${PREFIX}/etc/pkg.conf.sample \

.include "../../mk/bsd.prefs.mk"

.if defined (PKG_DBDIR)
PKGNG_DBDIR?=	${PREFIX}/pkgng-db

.if ${OPSYS} == "NetBSD"
BUILDLINK_TRANSFORM+=	rm:-Wl,--enable-new-dtags

.if ${OPSYS} != "FreeBSD" && ${OPSYS} != "DragonFly" && ${OPSYS} != "NetBSD"
.include "../../archivers/libarchive/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"