desktop/waf/PKGBUILD
2017-05-10 20:49:44 +02:00

43 lines
1.2 KiB
Bash

pkgname=waf
pkgver=1.9.11
pkgrel=1
pkgdesc='General-purpose build system modelled after Scons'
url='http://waf.io/'
arch=('any')
license=('BSD')
depends=('python3')
makedepends=('unzip')
provides=('python3-waf')
options=('!emptydirs')
source=("https://github.com/waf-project/waf/archive/waf-$pkgver.tar.gz")
sha256sums=('54791b3fe5a0a5e340946802736be892807894eb20f0680f56920c5935c634cf')
prepare() {
cd "$pkgname-$pkgname-$pkgver"
# Extracting license
head -n 30 waf-light | tail -n 25 > LICENSE
# Python 3 fix
sed -i '0,/env python/s//python3/' waf-light
}
build() {
cd "$pkgname-$pkgname-$pkgver"
./waf-light \
configure --prefix=/usr \
build --make-waf --tools='compat,compat15,ocaml,go,cython,scala,erlang,cuda,gcj,boost,pep8,eclipse'
}
package() {
cd "$pkgname-$pkgname-$pkgver"
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
# compile all python sources for once to be used after installation.
python3 -m compileall "$waflib"
}