mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
pkgname=waf
|
|
pkgver=2.0.11
|
|
pkgrel=1
|
|
pkgdesc='General-purpose build system modelled after Scons'
|
|
url='https://waf.io/'
|
|
arch=('x86_64')
|
|
license=('BSD')
|
|
depends=('python3')
|
|
makedepends=('unzip')
|
|
provides=('python3-waf')
|
|
options=('!emptydirs')
|
|
source=("https://waf.io/${pkgname}-${pkgver}.tar.bz2")
|
|
sha256sums=('e41359d1bab5210f8db7e29b9fbf4ff75e77cc08b5ec14ffd30fbb3a79b4f98f')
|
|
|
|
prepare() {
|
|
cd "$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-$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-$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"
|
|
}
|