summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-07-02 11:01:04 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-02 11:10:04 +0200
commit8c12f9f61e19759e47dced9674f902376f1f7c28 (patch)
tree1301b89483c0ef08dacf4efd4e08e34904ed8580 /abuild.in
parentd1b6da646eb90a16aa1e4553b33725144298a5ff (diff)
downloadabuild-8c12f9f61e19759e47dced9674f902376f1f7c28.tar.gz
abuild-8c12f9f61e19759e47dced9674f902376f1f7c28.tar.bz2
abuild-8c12f9f61e19759e47dced9674f902376f1f7c28.tar.xz
abuild-8c12f9f61e19759e47dced9674f902376f1f7c28.zip
abuild: automatically replace the config.sub with our version
introduce post_unpack that by default will search for config.sub and config.guess and replace those if found. we ship our own version of those files
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in21
1 files changed, 20 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index cc3abad..e35aa58 100755
--- a/abuild.in
+++ b/abuild.in
@@ -494,6 +494,24 @@ unpack() {
default_unpack
}
+default_post_unpack() {
+ local i
+ options_has "!configsub" && return 0
+ for i in "$srcdir"/*/configure; do
+ [ -x "$i" ] || continue
+ find "${i%/configure}" -name config.sub -o -name config.guess \
+ | while read f; do
+ msg "Replacing ${f##*/}"
+ cp "$datadir"/${f##*/} "$f" || return 1
+ done
+ break
+ done
+}
+
+post_unpack() {
+ default_post_unpack
+}
+
# cleanup source and package dir
clean() {
msg "Cleaning temporary build dirs..."
@@ -1177,7 +1195,8 @@ build_abuildrepo() {
if ! apk_up2date || [ -n "$force" ]; then
logcmd "building $pkgname"
sanitycheck && builddeps && clean && fetch && unpack \
- && prepare && mkusers && rootpkg || return 1
+ && post_unpack && prepare && mkusers && rootpkg \
+ || return 1
fi
update_abuildrepo_index
}