xbps-src: added support for the "tags" variable and require xbps>=0.37.

This commit is contained in:
Juan RP 2014-06-06 20:51:47 +02:00
parent b308d7cfac
commit 1b4e6ecaac
3 changed files with 9 additions and 6 deletions

View file

@ -3,7 +3,7 @@
## VARIABLES ## VARIABLES
unset -v noarch nonfree conf_files mutable_files preserve triggers unset -v noarch nonfree conf_files mutable_files preserve triggers
unset -v depends run_depends replaces provides conflicts unset -v depends run_depends replaces provides conflicts tags
# hooks/post-install/03-strip-and-debug-pkgs # hooks/post-install/03-strip-and-debug-pkgs
unset -v nostrip nostrip_files unset -v nostrip nostrip_files

View file

@ -1,7 +1,9 @@
# This hook generates a XBPS binary package from an installed package in destdir. # This hook generates a XBPS binary package from an installed package in destdir.
genpkg() { genpkg() {
local pkgdir="$1" arch="$2" desc="$3" pkgver="$4" binpkg="$5" _deps= f= local pkgdir="$1" arch="$2" desc="$3" pkgver="$4" binpkg="$5"
local _preserve _deps _shprovides _shrequires _gitrevs _provides _conflicts
local _replaces _mutable_files _conf_files f
if [ ! -d "${PKGDESTDIR}" ]; then if [ ! -d "${PKGDESTDIR}" ]; then
msg_warn "$pkgver: cannot find pkg destdir... skipping!\n" msg_warn "$pkgver: cannot find pkg destdir... skipping!\n"
@ -94,7 +96,7 @@ genpkg() {
--desc "${desc}" \ --desc "${desc}" \
--built-with "xbps-src-${XBPS_SRC_VERSION}" \ --built-with "xbps-src-${XBPS_SRC_VERSION}" \
--build-options "${PKG_BUILD_OPTIONS}" \ --build-options "${PKG_BUILD_OPTIONS}" \
--pkgver "${pkgver}" --quiet \ --pkgver "${pkgver}" --tags "${tags}" --quiet \
--source-revisions "${_gitrevs}" \ --source-revisions "${_gitrevs}" \
--shlib-provides "${_shprovides}" \ --shlib-provides "${_shprovides}" \
--shlib-requires "${_shrequires}" \ --shlib-requires "${_shrequires}" \
@ -135,6 +137,7 @@ hook() {
# Generate -dbg pkg. # Generate -dbg pkg.
if [ -d "${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/${pkgname}-dbg-${version}" ]; then if [ -d "${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/${pkgname}-dbg-${version}" ]; then
source ${XBPS_COMMONDIR}/environment/setup-subpkg/subpkg.sh
repo=$XBPS_REPOSITORY/debug repo=$XBPS_REPOSITORY/debug
_pkgver=${pkgname}-dbg-${version}_${revision} _pkgver=${pkgname}-dbg-${version}_${revision}
_desc="${short_desc} (debug files)" _desc="${short_desc} (debug files)"
@ -147,7 +150,7 @@ hook() {
return return
fi fi
if [ -d "${XBPS_DESTDIR}/${pkgname}-32bit-${version}" ]; then if [ -d "${XBPS_DESTDIR}/${pkgname}-32bit-${version}" ]; then
unset conf_files provides replaces preserve source ${XBPS_COMMONDIR}/environment/setup-subpkg/subpkg.sh
if [ -n "$nonfree" ]; then if [ -n "$nonfree" ]; then
repo=$XBPS_REPOSITORY/multilib/nonfree repo=$XBPS_REPOSITORY/multilib/nonfree
else else

View file

@ -299,8 +299,8 @@ read_pkg() {
setup_pkg $XBPS_TARGET_PKG $XBPS_CROSS_BUILD setup_pkg $XBPS_TARGET_PKG $XBPS_CROSS_BUILD
} }
# Requires xbps>=0.35 # Requires xbps>=0.37
readonly XBPS_VERSION_REQ="0.35" readonly XBPS_VERSION_REQ="0.37"
readonly XBPS_VERSION=$(xbps-uhelper -V|awk '{print $2}') readonly XBPS_VERSION=$(xbps-uhelper -V|awk '{print $2}')
readonly XBPS_SRC_VERSION="113" readonly XBPS_SRC_VERSION="113"