aboutsummaryrefslogtreecommitdiff
path: root/common/hooks/do-pkg
diff options
context:
space:
mode:
authorEnno Boland <gottox@voidlinux.eu>2015-11-17 17:54:41 +0000
committerEnno Boland <gottox@voidlinux.eu>2015-11-18 09:21:33 +0000
commit67757b5708caa5b8694c0420b42ec5a737595f3f (patch)
tree20482fc5e815b7766068faa76a13aefc4d5eb6fa /common/hooks/do-pkg
parentf19bca3bce0fc8d1a22acc6bf013666aba9c9fe1 (diff)
downloadvoid-packages-67757b5708caa5b8694c0420b42ec5a737595f3f.tar
void-packages-67757b5708caa5b8694c0420b42ec5a737595f3f.tar.gz
void-packages-67757b5708caa5b8694c0420b42ec5a737595f3f.tar.bz2
void-packages-67757b5708caa5b8694c0420b42ec5a737595f3f.tar.lz
void-packages-67757b5708caa5b8694c0420b42ec5a737595f3f.tar.xz
void-packages-67757b5708caa5b8694c0420b42ec5a737595f3f.tar.zst
void-packages-67757b5708caa5b8694c0420b42ec5a737595f3f.zip
hooks/do-pkg/00-gen-pkg.sh: enable globbing for conf_files.
Diffstat (limited to 'common/hooks/do-pkg')
-rw-r--r--common/hooks/do-pkg/00-gen-pkg.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/common/hooks/do-pkg/00-gen-pkg.sh b/common/hooks/do-pkg/00-gen-pkg.sh
index 6749b7a9b34..3ace80fedcf 100644
--- a/common/hooks/do-pkg/00-gen-pkg.sh
+++ b/common/hooks/do-pkg/00-gen-pkg.sh
@@ -1,5 +1,18 @@
# This hook generates a XBPS binary package from an installed package in destdir.
+expand_dstdir() {
+ local glob_list= result= glob= file=
+
+ for glob; do
+ glob_list+=" $DESTDIR/$glob"
+ done
+ shopt -s extglob
+ for file in $glob_list; do
+ result+=" ${file#$DESTDIR/}"
+ done
+ shopt -u extglob
+}
+
genpkg() {
local pkgdir="$1" arch="$2" desc="$3" pkgver="$4" binpkg="$5"
local _preserve _deps _shprovides _shrequires _gitrevs _provides _conflicts
@@ -50,7 +63,7 @@ genpkg() {
local _replaces="$(echo $replaces)"
local _reverts="$(echo $reverts)"
local _mutable_files="$(echo $mutable_files)"
- local _conf_files="$(echo $conf_files)"
+ local _conf_files="$(expand_dstdir $conf_files)"
local _alternatives="$(echo $alternatives)"
local _tags="$(echo $tags)"