freebsd-ports/ports-mgmt/pkg/Makefile

140 lines
3.9 KiB
Makefile
Raw Normal View History

# $FreeBSD$
PORTNAME= pkg
DISTVERSION= 1.0.12
PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= LOCAL/portmgr \
http://files.etoilebsd.net/pkg/ \
http://mirror.shatow.net/freebsd/${PORTNAME}/
MAINTAINER= portmgr@FreeBSD.org
COMMENT= New generation package manager
LICENSE= BSD
- update to 1.0-beta9 - changes: * query -f has been replaced by query -F when querying a package (file) for consistency with pkg info * fix autoremove recursion * pkg set -o oldorigin:neworigin allow the user to modify the origin of a packages (useful for MOVED) * several fixes on powerpc * pkg query evaluation expression now accept != * pkg2ng is now able to migrate a local database without needed the ports tree * speed up pkg check by only loading the informations needed for the operation it will do * code cleanup in the library * fix uname/gname lookup when creating packages * new periodic script for pkg audit * new keyword shlib, pkgng is able to load information about the needed shlibs for a package (disable by default) * pkg info act as pkg info -a by default * new install timestamp in the package database, available using pkg query "%t" * pkg updating can now take a port name as argument to only show related UPDATING informations) * -q (quiet) for install, delete, upgrade, update and autoremove * new ABI detection string Concerning the new ABI, to be able to determine which package can be installed on which destination, pkgng couldn't rely on the simple: os version/machine, because some arches have incompatible ABIs. Can compute on its own the ABI, the string is the followin: OSNAME:OSMAJORVERSION:OSARCH:OSCLASS(:...) ... means the arch specific extensions. which means on: * amd64: freebsd:9:x86:64 * i386: freebsd:9:x86 * arm: freebsd:9:arm:eb:oabi:softvp etc Be careful all the packages (.txz) files have to be rebuilt!!! When binary upgradeing from pkg beta8, on amd64 do the following: UNAME_m=freebsd:9:x86:64 pkg install -f pkg on i386 UNAME_m=freebsd:9:x86:32 pkg install -f pkg Bonus when run on a chroot/jail where ABI is different from the host, pkgng will dynamically determine the destination ABI. Feature safe: yes
2012-03-30 09:34:00 +02:00
USE_XZ= yes
MAKE_JOBS_SAFE= yes
# Disable CCACHE support because of the chicken/egg problem pkg should always
# With no dependency at all
NO_CCACHE= yes
USE_LDCONFIG= yes
MANCOMPRESSED= yes
MAKE_ENV+= WITHOUT_PROFILE=yes __MAKE_CONF=/dev/null SRCCONF=/dev/null \
PORTREVISION=${PORTREVISION}
USE_STAGE= yes
# Use a submake as 'deinstall install' needs to reevaluate PKG_CMD
# so that pkg-static is used from the wrkdir
USE_SUBMAKE= yes
MAN8= pkg.8 \
pkg-add.8 \
pkg-autoremove.8 \
pkg-audit.8 \
pkg-backup.8 \
pkg-check.8 \
pkg-clean.8 \
pkg-create.8 \
pkg-delete.8 \
pkg-fetch.8 \
pkg-info.8 \
pkg-install.8 \
pkg-query.8 \
pkg-register.8 \
pkg-repo.8 \
pkg-rquery.8 \
pkg-search.8 \
pkg-set.8 \
pkg-shell.8 \
2012-03-30 15:33:19 +02:00
pkg-shlib.8 \
pkg-stats.8 \
pkg-update.8 \
pkg-updating.8 \
pkg-upgrade.8 \
pkg-version.8 \
pkg-which.8
MAN5= pkg.conf.5
MLINKS= pkg-delete.8 pkg-remove.8 \
pkg.8 pkg-static.8
.include <bsd.port.pre.mk>
.if defined(WITH_PKGNG)
The pkg developement team is proud to announce the new 1.1.0 beta1 release of pkg. Here is the list of new features that happened in pkg 1.1: - new simpler and more reliable solver - shared libraries are now always tracked - ssh:// is supported as a protocol to distribute packages (needs pkg 1.1+ on the server hosting the packages) - multirepository is no longer considered experimental and works by default. - incremental update of the catalog (only if the repository was created by pkg 1.1+) - simplification of the public API - stabilisation of the public API (we will now try to keep it stable and if change are needed there will be deprecation time before removal of some old functions) - new experimental pkg convert (can convert from and to legacy pkg database) pkg2ng now uses pkg convert (still recommanded to use pkg2ng) - new pkg lock/unlock to prevent any manipulation of a given package (no upgrade,delete,etc) - improved UI (now you can see the progress of an upgrade what is left to be done) - new pkg annotation to allow one to add annotations (free form key/value) to a package) - pkg audit is now able to directly parse the vuxml native format and not only the compact version - pkg -vv now shows all available options and their current settings - pkg -vvv now shows a description of all the available options - pkg info now automatically considers the query as globbing if * is in the requested pattern - new hook plugin interface (allows users to create hooks that get called at anytime during and upgrade/installation/deletion of a package) - new cmd plugin interface (allows users to create new sub command available for pkg) - pkg register can now register a port installation in the legacy database format - repository can be defined in simple yaml files Internal: - massive usage of hash tables (uthash), which simplifies a lot of the code, and improves performances - lots of optimisation in plist and manifest parsing - lots of optimisation in loading packages (mmap used when possible) - lots of cleanup in memory usage - regression test framework is now ready (using atf) regression test are slowly being added and populated. To use this new version: Ports users (or in building factories: poudriere/tinderbox): Add WITH_PKGNG=devel to your make.conf pkg set -o ports-mgmt/pkg:ports-mgmt/pkg-devel Binary package users, if the remote repository is providing pkg 1.1: pkg set -o ports-mgmt/pkg:ports-mgmt/pkg-devel pkg upgrade Note that pkg 1.1 can use a repository created for pkg 1.0 and vis versa. Huge thanks to all the people that have contributed to the pkg developement: - may that be by code - documentation - bug report - feedback - ideas List of people who contributed code: Baptiste Daroussin, Matthew Seaman, Bryan Drewery, Vsevolod Stakhov, Marin Atanasov Nikolov, Alexandre Perrin, Romain Tartière, Julien Laffaye, Glen Barber, John Marino, Alex Kozlov, Roman Naumann, Sofian Brabez, Alberto Villa, Will Andrews, Eitan Adler, Dan McGregor, namor, niamtokik, Arthur Gautier, Garrett Cooper, Andrew Turner, Jeremy Chadwick, Hajimu UMEMOTO, Mark Lokowich, Eygene Ryabinkin, Pietro Cerutti, Rolf Grossmann, Ed Schouten, Dimitry Andric, David Forsythe, Stefan Grundmann, Craig Rodrigues, Antoine Brodin, Andrey Zonov, Joel Dahl Stats between 1.0 and 1.1: 287 files changed, 63418 insertions(+), 18763 deletions(-) 1198 commits
2013-05-30 17:17:29 +02:00
.if ${WITH_PKGNG} == devel
IGNORE= WITH_PKGNG is defined to 'devel', this version is the stable one
.endif
.if exists(${LOCALBASE}/sbin/pkg_info) || exists(/usr/sbin/pkg_info)
NB_OLDPKGS!= pkg_info 2>/dev/null | wc -l
.if exists(${PKG_BIN})
NB_NEWPKGS!= ${PKG_INFO} -aq | wc -l
.else
NB_NEWPKGS= 0
.endif
# Only show the pre-everything notice if they have not already
# converted any packages
.if ${NB_OLDPKGS} > 0 && ${NB_NEWPKGS} == 0
pre-everything::
@${ECHO_CMD} "You are about to convert your system to pkgng while you have ports/packages"; \
${ECHO_CMD} "installed with the old pkg_install tools."; \
${ECHO_CMD} ""; \
${ECHO_CMD} "You can choose to: "; \
${ECHO_CMD} "- keep pkg_install as the package management system by adding this line to /etc/make.conf:"; \
${ECHO_CMD} ""; \
${ECHO_CMD} " WITHOUT_PKGNG=yes" ; \
${ECHO_CMD} ""; \
${ECHO_CMD} "- switch to pkgng:"; \
${ECHO_CMD} " 1) Add WITHOUT_PKGNG to /etc/make.conf"; \
${ECHO_CMD} " 2) Install ports-mgmt/pkg"; \
${ECHO_CMD} " 3) Convert your package database by running pkg2ng"; \
${ECHO_CMD} " 4) Remove WITHOUT_PKGNG from /etc/make.conf"; \
${ECHO_CMD} ""; \
exit 1
.endif
.endif
.endif
#define PKG_DEPENDS to nothing to avoid infinite loop looking for pkg :)
.if defined(WITH_PKGNG)
PKG_DEPENDS=
.undef INSTALLS_DEPENDS
.if !exists(${LOCALBASE}/sbin/pkg)
PKG_BIN= ${WRKSRC}/pkg-static/pkg-static
.endif
.endif
.if ${OSVERSION} < 800505
IGNORE= not supported on 7.x or early 8.0
.endif
PERIODIC_DAILY= 400.status-pkg 411.pkg-backup 490.status-pkg-changes
PERIODIC_SECURITY= 410.pkg-audit 460.pkg-checksum
PERIODIC_ALL= ${PERIODIC_DAILY} ${PERIODIC_SECURITY}
post-install:
.for periodic in ${PERIODIC_ALL}
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/scripts/periodic/${periodic}
.endfor
- update to 1.0-beta9 - changes: * query -f has been replaced by query -F when querying a package (file) for consistency with pkg info * fix autoremove recursion * pkg set -o oldorigin:neworigin allow the user to modify the origin of a packages (useful for MOVED) * several fixes on powerpc * pkg query evaluation expression now accept != * pkg2ng is now able to migrate a local database without needed the ports tree * speed up pkg check by only loading the informations needed for the operation it will do * code cleanup in the library * fix uname/gname lookup when creating packages * new periodic script for pkg audit * new keyword shlib, pkgng is able to load information about the needed shlibs for a package (disable by default) * pkg info act as pkg info -a by default * new install timestamp in the package database, available using pkg query "%t" * pkg updating can now take a port name as argument to only show related UPDATING informations) * -q (quiet) for install, delete, upgrade, update and autoremove * new ABI detection string Concerning the new ABI, to be able to determine which package can be installed on which destination, pkgng couldn't rely on the simple: os version/machine, because some arches have incompatible ABIs. Can compute on its own the ABI, the string is the followin: OSNAME:OSMAJORVERSION:OSARCH:OSCLASS(:...) ... means the arch specific extensions. which means on: * amd64: freebsd:9:x86:64 * i386: freebsd:9:x86 * arm: freebsd:9:arm:eb:oabi:softvp etc Be careful all the packages (.txz) files have to be rebuilt!!! When binary upgradeing from pkg beta8, on amd64 do the following: UNAME_m=freebsd:9:x86:64 pkg install -f pkg on i386 UNAME_m=freebsd:9:x86:32 pkg install -f pkg Bonus when run on a chroot/jail where ABI is different from the host, pkgng will dynamically determine the destination ABI. Feature safe: yes
2012-03-30 09:34:00 +02:00
@${MKDIR} ${PREFIX}/etc/periodic/security
@${MKDIR} ${PREFIX}/etc/periodic/daily
.for periodic in ${PERIODIC_DAILY}
@${INSTALL_SCRIPT} ${WRKSRC}/scripts/periodic/${periodic} ${PREFIX}/etc/periodic/daily
.endfor
.for periodic in ${PERIODIC_SECURITY}
@${INSTALL_SCRIPT} ${WRKSRC}/scripts/periodic/${periodic} ${PREFIX}/etc/periodic/security
.endfor
@${INSTALL_SCRIPT} ${WRKSRC}/ports/pkg2ng ${PREFIX}/sbin
@${INSTALL_SCRIPT} ${WRKSRC}/ports/pkg2ng ${PREFIX}/sbin
@${INSTALL_DATA} ${WRKSRC}/pkg/pkg.conf.sample ${PREFIX}/etc
@${INSTALL_DATA} ${WRKSRC}/libpkg/pkg.pc ${PREFIX}/libdata/pkgconfig/
@${MKDIR} ${PREFIX}/share/zsh/site-functions
@${INSTALL_DATA} ${WRKSRC}/scripts/zsh/_pkg ${PREFIX}/share/zsh/site-functions/
@${MKDIR} ${PREFIX}/etc/bash_completion.d
@${INSTALL_DATA} ${WRKSRC}/scripts/bash/_pkg.bash ${PREFIX}/etc/bash_completion.d/
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>