summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorMichael Zuo <muh.muhten@gmail.com>2016-02-01 17:32:27 -0500
committerTimo Teräs <timo.teras@iki.fi>2016-02-22 14:04:52 +0200
commit251dce53e1d19d00f2cbc4d3385b2a28b73e7bb9 (patch)
treebcc5c1df5d88b9cfb7d5f0a440cdc1f95fa119f5 /abuild.in
parent578ab740adb03486801856886b261aa48a1d9c30 (diff)
downloadabuild-251dce53e1d19d00f2cbc4d3385b2a28b73e7bb9.tar.gz
abuild-251dce53e1d19d00f2cbc4d3385b2a28b73e7bb9.tar.bz2
abuild-251dce53e1d19d00f2cbc4d3385b2a28b73e7bb9.tar.xz
abuild-251dce53e1d19d00f2cbc4d3385b2a28b73e7bb9.zip
abuild: use standard-issue prepare by default
A majority of APKBUILDs currently use exactly the prepare() provided by newapkbuild verbatim, even for packages where no patches exist, which has created the expectation that patches listed as sources are applied by default. This rev simply adds that default prepare() to abuild (and exposes it as default_prepare), with no configurability. If needed, default behaviour can be overridden by providing explicitly prepare().
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index cc3d0c0..7405f74 100644
--- a/abuild.in
+++ b/abuild.in
@@ -528,8 +528,21 @@ getpkgver() {
fi
}
+default_prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "$i"
+ patch -p1 -i "$srcdir/$i" || return 1
+ ;;
+ esac
+ done
+}
+
prepare() {
- :
+ default_prepare
}
build() {