diff options
author | Victor A. Santos | 2015-09-22 22:01:33 -0300 |
---|---|---|
committer | Victor A. Santos | 2015-09-22 22:01:33 -0300 |
commit | 3c77d6b7a6bef1d5e6b799c00fdf2243a1d564f8 (patch) | |
tree | 01ec09759429c395fb3d036ed76e3ece5bdc5997 /PKGBUILD | |
download | aur-3c77d6b7a6bef1d5e6b799c00fdf2243a1d564f8.tar.gz |
submiting first release
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bdb8c11736b6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Victor A. Santos <victoraur.santos@gmail.com> +pkgname=waf-git +pkgver=r1436.f9f5e85 +pkgrel=1 +pkgdesc="General-purpose build system modelled after Scons" +arch=('any') +url="http://waf.io" +license=('GPL3') +depends=('python') +makedepends=('python' 'perl') +conflicts=('waf') +provides=('waf') +source=("$pkgname::git+https://github.com/waf-project/waf.git") +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname}" + + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/${pkgname}" + + python3 ./waf-light \ + configure --prefix=/usr \ + build --make-waf --tools='compat,compat15,ocaml,go,cython,scala,erlang,cuda,gcj,boost,pep8,eclipse' +} + +package() { + cd "$srcdir/${pkgname}" + + install -Dm755 waf "$pkgdir/usr/bin/waf" + + local wafversion=$(./waf-light --version | perl -p -e 's/waf ([0-9.]+) .*/$1/g') + local wafrevision=$(grep -aPom1 '(?<=^REVISION=")[[:xdigit:]]*(?="$)' "$pkgdir/usr/bin/waf") + local waflib="$pkgdir/usr/lib/waf3-$wafversion-$wafrevision" + + install -dm755 "$waflib" + unzip -d "$waflib" zip/waflib.zip + + # compile all python sources for once to be used after installation. + python -m compileall "$waflib" +} |