aboutsummaryrefslogtreecommitdiff
path: root/common/hooks
diff options
context:
space:
mode:
authorEnno Boland <gottox@voidlinux.eu>2015-12-03 09:04:16 +0000
committerEnno Boland <g@s01.de>2019-02-15 12:19:44 +0000
commit6eb37e35b20ff7a22bf3902015460a83c5b33734 (patch)
tree23218bf58d81e4f7f62e4f861d77f89cad563aad /common/hooks
parente9769c21715cc91c2a802c6d542ff75b04d42e1e (diff)
downloadvoid-packages-6eb37e35b20ff7a22bf3902015460a83c5b33734.tar
void-packages-6eb37e35b20ff7a22bf3902015460a83c5b33734.tar.gz
void-packages-6eb37e35b20ff7a22bf3902015460a83c5b33734.tar.bz2
void-packages-6eb37e35b20ff7a22bf3902015460a83c5b33734.tar.lz
void-packages-6eb37e35b20ff7a22bf3902015460a83c5b33734.tar.xz
void-packages-6eb37e35b20ff7a22bf3902015460a83c5b33734.tar.zst
void-packages-6eb37e35b20ff7a22bf3902015460a83c5b33734.zip
common: merge only_for_archs and noarch=yes into one.
* noarch=yes is replaced with archs=noarch * only_for_archs= is renamed to archs= * archs= allows the use of wildcards and negations; first matching rule applies: * archs="*-musl" will build the pkg only for musl-libcs * archs="~*-musl" will build the pkg only on non-musl-libc * archs="x86_64-musl ~*-musl" will build for x86_64-musl and any non-musl arch. * archs= defaults to "*"
Diffstat (limited to 'common/hooks')
-rw-r--r--common/hooks/do-pkg/00-gen-pkg.sh4
-rw-r--r--common/hooks/post-install/06-strip-and-debug-pkgs.sh2
-rw-r--r--common/hooks/post-pkg/00-register-pkg.sh4
-rw-r--r--common/hooks/pre-pkg/04-generate-runtime-deps.sh2
-rw-r--r--common/hooks/pre-pkg/05-prepare-32bit.sh2
-rw-r--r--common/hooks/pre-pkg/06-shlib-provides.sh2
6 files changed, 8 insertions, 8 deletions
diff --git a/common/hooks/do-pkg/00-gen-pkg.sh b/common/hooks/do-pkg/00-gen-pkg.sh
index 75d47d36496..2b1d3ad02e7 100644
--- a/common/hooks/do-pkg/00-gen-pkg.sh
+++ b/common/hooks/do-pkg/00-gen-pkg.sh
@@ -97,14 +97,14 @@ hook() {
local arch= binpkg= repo= _pkgver= _desc= _pkgn= _pkgv= _provides= \
_replaces= _reverts= f= found_dbg_subpkg=
- if [ -n "$noarch" ]; then
+ if [ "${archs// /}" = "noarch" ]; then
arch=noarch
elif [ -n "$XBPS_TARGET_MACHINE" ]; then
arch=$XBPS_TARGET_MACHINE
else
arch=$XBPS_MACHINE
fi
- if [ -z "$noarch" -a -z "$XBPS_CROSS_BUILD" -a -n "$XBPS_ARCH" -a "$XBPS_ARCH" != "$XBPS_TARGET_MACHINE" ]; then
+ if [ "${archs// /}" != "noarch" -a -z "$XBPS_CROSS_BUILD" -a -n "$XBPS_ARCH" -a "$XBPS_ARCH" != "$XBPS_TARGET_MACHINE" ]; then
arch=${XBPS_ARCH}
fi
diff --git a/common/hooks/post-install/06-strip-and-debug-pkgs.sh b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
index bd4cdbd6122..4a703c8007f 100644
--- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh
+++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
@@ -59,7 +59,7 @@ create_debug_pkg() {
hook() {
local fname= x= f= _soname= STRIPCMD=
- if [ -n "$nostrip" -o -n "$noarch" ]; then
+ if [ -n "$nostrip" -o "${archs// /}" = "noarch" ]; then
return 0
fi
diff --git a/common/hooks/post-pkg/00-register-pkg.sh b/common/hooks/post-pkg/00-register-pkg.sh
index 98e1a2f5c69..5dc28c999c9 100644
--- a/common/hooks/post-pkg/00-register-pkg.sh
+++ b/common/hooks/post-pkg/00-register-pkg.sh
@@ -13,14 +13,14 @@ registerpkg() {
hook() {
local arch= binpkg= pkgdir=
- if [ -n "$noarch" ]; then
+ if [ "${archs// /}" = "noarch" ]; then
arch=noarch
elif [ -n "$XBPS_TARGET_MACHINE" ]; then
arch=$XBPS_TARGET_MACHINE
else
arch=$XBPS_MACHINE
fi
- if [ -z "$noarch" -a -z "$XBPS_CROSS_BUILD" -a -n "$XBPS_ARCH" -a "$XBPS_ARCH" != "$XBPS_TARGET_MACHINE" ]; then
+ if [ "${archs// /}" != "noarch" -a -z "$XBPS_CROSS_BUILD" -a -n "$XBPS_ARCH" -a "$XBPS_ARCH" != "$XBPS_TARGET_MACHINE" ]; then
arch=${XBPS_ARCH}
fi
if [ -n "$repository" ]; then
diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index b5307ff8226..498d8289342 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -56,7 +56,7 @@ hook() {
mapshlibs=$XBPS_COMMONDIR/shlibs
- if [ -n "$noarch" -o -n "$noverifyrdeps" ]; then
+ if [ "${archs// /}" = "noarch" -o -n "$noverifyrdeps" ]; then
store_pkgdestdir_rundeps
return 0
fi
diff --git a/common/hooks/pre-pkg/05-prepare-32bit.sh b/common/hooks/pre-pkg/05-prepare-32bit.sh
index 1b6a5ae2161..8440b3d36a8 100644
--- a/common/hooks/pre-pkg/05-prepare-32bit.sh
+++ b/common/hooks/pre-pkg/05-prepare-32bit.sh
@@ -21,7 +21,7 @@ hook() {
return
fi
# Ignore noarch pkgs.
- if [ -n "$noarch" ]; then
+ if [ "${archs// /}" = "noarch" ]; then
return
fi
if [ -z "$lib32mode" ]; then
diff --git a/common/hooks/pre-pkg/06-shlib-provides.sh b/common/hooks/pre-pkg/06-shlib-provides.sh
index 66bb03ac058..480d614097b 100644
--- a/common/hooks/pre-pkg/06-shlib-provides.sh
+++ b/common/hooks/pre-pkg/06-shlib-provides.sh
@@ -45,7 +45,7 @@ collect_sonames() {
hook() {
local _destdir32=${XBPS_DESTDIR}/${pkgname}-32bit-${version}
- if [ -z "$shlib_provides" -a -n "$noarch" -o -n "$noshlibprovides" ]; then
+ if [ -z "$shlib_provides" -a "${archs// /}" = "noarch" -o -n "$noshlibprovides" ]; then
return 0
fi