2016-01-25 03:13:45 +08:00
|
|
|
# contribution from Arch https://aur4.archlinux.org/packages/waf/
|
2014-01-07 05:24:29 +08:00
|
|
|
|
|
|
|
pkgname=waf
|
2016-10-11 02:07:58 +08:00
|
|
|
pkgver=1.9.5
|
2014-01-07 05:24:29 +08:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='General-purpose build system modelled after Scons'
|
2016-01-25 03:13:45 +08:00
|
|
|
url='http://waf.io/'
|
|
|
|
arch=('any')
|
2014-01-07 05:24:29 +08:00
|
|
|
license=('BSD')
|
|
|
|
depends=('python3')
|
2016-01-25 03:13:45 +08:00
|
|
|
makedepends=('unzip')
|
2014-01-07 05:24:29 +08:00
|
|
|
provides=('python3-waf')
|
|
|
|
options=('!emptydirs')
|
2016-01-25 03:13:45 +08:00
|
|
|
source=("https://github.com/waf-project/waf/archive/waf-$pkgver.tar.gz")
|
2016-10-11 02:07:58 +08:00
|
|
|
sha256sums=('24234eec8c2c861bdcbe2a57c092787511db40cf25ce2bdb09bb7bd33eb4a172')
|
2014-01-07 05:24:29 +08:00
|
|
|
|
|
|
|
prepare() {
|
2016-01-25 03:13:45 +08:00
|
|
|
cd "$pkgname-$pkgname-$pkgver"
|
2014-01-07 05:24:29 +08:00
|
|
|
|
|
|
|
# Extracting license
|
2016-01-25 03:13:45 +08:00
|
|
|
head -n 30 waf-light | tail -n 25 > LICENSE
|
2014-01-07 05:24:29 +08:00
|
|
|
# Python 3 fix
|
2016-01-25 03:13:45 +08:00
|
|
|
sed -i '0,/env python/s//python3/' waf-light
|
2014-01-07 05:24:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2016-01-25 03:13:45 +08:00
|
|
|
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'
|
2014-01-07 05:24:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2016-01-25 03:13:45 +08:00
|
|
|
cd "$pkgname-$pkgname-$pkgver"
|
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
2014-01-07 05:24:29 +08:00
|
|
|
install -Dm755 waf "$pkgdir/usr/bin/waf"
|
|
|
|
|
2016-01-25 03:13:45 +08:00
|
|
|
local waflib="$pkgdir/usr/lib/waf3-$pkgver-$(grep -aPom1 '(?<=^REVISION=")[[:xdigit:]]*(?="$)' "$pkgdir/usr/bin/waf")"
|
|
|
|
install -dm755 "$waflib"
|
|
|
|
unzip -d "$waflib" zip/waflib.zip
|
2014-01-07 05:24:29 +08:00
|
|
|
|
2016-01-25 03:13:45 +08:00
|
|
|
# compile all python sources for once to be used after installation.
|
|
|
|
python3 -m compileall "$waflib"
|
2016-03-12 06:44:39 +08:00
|
|
|
}
|