mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-11 04:24:36 +08:00
54 lines
1.4 KiB
Bash
54 lines
1.4 KiB
Bash
|
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
|
||
|
# Contributions from Arch: https://www.archlinux.org/packages/community/any/waf/
|
||
|
|
||
|
pkgname=waf
|
||
|
pkgver=1.7.14
|
||
|
pkgrel=1
|
||
|
pkgdesc='General-purpose build system modelled after Scons'
|
||
|
url='http://code.google.com/p/waf/'
|
||
|
arch=('x86_64')
|
||
|
license=('BSD')
|
||
|
depends=('python3')
|
||
|
makedepends=('setconf')
|
||
|
provides=('python3-waf')
|
||
|
options=('!emptydirs')
|
||
|
source=("http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.bz2")
|
||
|
sha256sums=('843e9f716d99b54c3b00e1b6cae7c754f0a608b7ae253a42b602cfe73561b6ce')
|
||
|
|
||
|
prepare() {
|
||
|
cd "$pkgname-$pkgver"
|
||
|
|
||
|
# Extracting license
|
||
|
head -n 30 waf | tail -n 25 > LICENSE
|
||
|
# Python 3 fix
|
||
|
sed -i '0,/env python/s//python3/' waf
|
||
|
}
|
||
|
|
||
|
build() {
|
||
|
cd "$pkgname-$pkgver"
|
||
|
|
||
|
./waf-light configure --prefix=/usr
|
||
|
./waf-light --make-waf
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
cd "$pkgname-$pkgver"
|
||
|
|
||
|
./waf-light install -f --destdir="$pkgdir" \
|
||
|
--tools='compat,compat15,ocaml,go,cython,scala,erlang,cuda,gcj,boost,pep8,eclipse'
|
||
|
|
||
|
install -Dm755 waf "$pkgdir/usr/bin/waf"
|
||
|
|
||
|
# Force the generation of .waf.admin files
|
||
|
cd demos/c
|
||
|
"$pkgdir/usr/bin/waf" configure build >& /dev/null
|
||
|
cd ../..
|
||
|
|
||
|
# Fix weird directory placement (FS#38216, FS#38300)
|
||
|
mkdir -p "$pkgdir/usr/lib/waf"
|
||
|
mv "$pkgdir/usr/bin/.waf-$pkgver-"* "$pkgdir/usr/lib/waf/"
|
||
|
setconf "$pkgdir/usr/bin/waf" base '"/usr/lib/waf"'
|
||
|
|
||
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||
|
}
|