summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-06-13 22:16:55 +0200
committerXZS2016-06-13 22:23:47 +0200
commitbdfcc95872cd46acc7995cddde124d92a4b90e05 (patch)
treec7fa03725ef4945d2dcfcf16ed5d2993083b7b60
parentbeba2008ec1ecb25cd0ea7d220e731bf0131cbc6 (diff)
downloadaur-bdfcc95872cd46acc7995cddde124d92a4b90e05.tar.gz
provide version-independent library directory
With a central waflib directory common to all waf versions, packages that install tools into this directory no longer need to be rebuild whenever waf is updated. The changing directory is however kept as a symbolic link for the waf program itself to use to not mess with patching the code itself which is probably more difficult to maintain.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 9 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 56d087f01e9b..12c9f1fee020 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = waf
pkgdesc = General-purpose build system modelled after Scons
pkgver = 1.8.20
- pkgrel = 1
+ pkgrel = 2
url = http://waf.io/
arch = any
license = BSD
diff --git a/PKGBUILD b/PKGBUILD
index 58a0e3a181ec..30e32b53f91e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=waf
pkgver=1.8.20
-pkgrel=1
+pkgrel=2
pkgdesc='General-purpose build system modelled after Scons'
url='http://waf.io/'
arch=('any')
@@ -38,12 +38,15 @@ package() {
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm755 waf "$pkgdir/usr/bin/waf"
- local waflib="$pkgdir/usr/lib/waf3-$pkgver-$(grep -aPom1 '(?<=^REVISION=")[[:xdigit:]]*(?="$)' "$pkgdir/usr/bin/waf")"
- install -dm755 "$waflib"
- unzip -d "$waflib" zip/waflib.zip
+ local revision="waf3-$pkgver-$(grep -aPom1 '(?<=^REVISION=")[[:xdigit:]]*(?="$)' "$pkgdir/usr/bin/waf")"
+ local libdir="$pkgdir/usr/lib"
+ local wafdir="$libdir/waf"
+ install -dm755 "$libdir"/{waf,"$revision"}
+ ln -s ../waf "$libdir/$revision/waflib"
+ bsdtar -xf zip/waflib.zip -s '/^waflib.//' -C "$wafdir"
# compile all python sources for once to be used after installation.
- python -OOm compileall "$waflib"
+ python -OOm compileall "$wafdir"
}
# vim:set ts=2 sw=2 et: