diff options
author | XZS | 2016-06-13 22:16:55 +0200 |
---|---|---|
committer | XZS | 2016-06-13 22:23:47 +0200 |
commit | bdfcc95872cd46acc7995cddde124d92a4b90e05 (patch) | |
tree | c7fa03725ef4945d2dcfcf16ed5d2993083b7b60 | |
parent | beba2008ec1ecb25cd0ea7d220e731bf0131cbc6 (diff) | |
download | aur-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-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 9 insertions, 6 deletions
@@ -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 @@ -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: |