diff options
author | XZS | 2016-06-15 17:24:17 +0200 |
---|---|---|
committer | XZS | 2016-06-15 18:37:06 +0200 |
commit | 92dc4aee2937f3e6c63cca9e79e5a6970ddde95f (patch) | |
tree | 723a287b39dfd68cf08f0020222a23d4de404da9 | |
parent | 1293aeb8ba43a4288fcb19ffbb8fbf9ec33f3f69 (diff) | |
download | aur-92dc4aee2937f3e6c63cca9e79e5a6970ddde95f.tar.gz |
strip library packed into binary
The library is already installed unpacked into the file system, so there
is no need to keep it duplicated as an archive concatenated to the
binary.
Developers may be used to simply copying the installed binary into their
projects to distribute it. They now need to build a custom binary
manually, which is the recommended way to do anyways, because included
tools can be individually chosen. While it was formerly necessary to
retrieve waf's own wscript to do so, this file is now also distributed,
along with a guideline to ease migration.
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | building-waf.md | 14 |
3 files changed, 31 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = waf pkgdesc = General-purpose build system modelled after Scons pkgver = 1.8.21 - pkgrel = 2 + pkgrel = 3 url = http://waf.io/ arch = any license = BSD @@ -10,10 +10,13 @@ pkgbase = waf provides = python-waf source = https://waf.io/waf-1.8.21.tar.bz2 source = wafdir.patch + source = building-waf.md md5sums = 14245fc1c3efc262cdec5f5b5a5010e7 md5sums = ff472805caa81e02cb15bcf87031f722 + md5sums = 93fd94b3dc4616c35e9bf13adc63b23c sha256sums = b14db0532c1ba9e89ae3aea53cb4b5c769b751952f1fc194dc1e306ac03794e2 sha256sums = 432fb8e21fe31047e16ac068b761961f1a3965785e570bf54aca1c4c07d253f4 + sha256sums = 3103524b61ac3f3af9bb71f1ac8fcb836a1e67e2bfcf59150f08dbf70a595675 pkgname = waf @@ -4,7 +4,7 @@ pkgname=waf pkgver=1.8.21 -pkgrel=2 +pkgrel=3 pkgdesc='General-purpose build system modelled after Scons' url='http://waf.io/' arch=('any') @@ -13,11 +13,14 @@ depends=('python') makedepends=('unzip') provides=('python-waf') source=("https://waf.io/${pkgname}-${pkgver}.tar.bz2" - 'wafdir.patch') + 'wafdir.patch' + 'building-waf.md') md5sums=('14245fc1c3efc262cdec5f5b5a5010e7' - 'ff472805caa81e02cb15bcf87031f722') + 'ff472805caa81e02cb15bcf87031f722' + '93fd94b3dc4616c35e9bf13adc63b23c') sha256sums=('b14db0532c1ba9e89ae3aea53cb4b5c769b751952f1fc194dc1e306ac03794e2' - '432fb8e21fe31047e16ac068b761961f1a3965785e570bf54aca1c4c07d253f4') + '432fb8e21fe31047e16ac068b761961f1a3965785e570bf54aca1c4c07d253f4' + '3103524b61ac3f3af9bb71f1ac8fcb836a1e67e2bfcf59150f08dbf70a595675') prepare() { cd "$pkgname-$pkgver" @@ -36,12 +39,18 @@ build() { ./waf-light \ configure --prefix=/usr \ build --make-waf --tools='compat,compat15,ocaml,go,cython,scala,erlang,cuda,gcj,boost,pep8,eclipse' + + # Strip packed library from binary. The plain files are installed separately. + sed -i '/^#==>$/,/^#<==$/d' waf } package() { + install -Dm644 -t "$pkgdir/usr/doc/$pkgname" building-waf.md + cd "$pkgname-$pkgver" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm755 waf "$pkgdir/usr/bin/waf" + install -Dm644 wscript "$pkgdir/usr/share/$pkgname/wscript" # Place waf library and tools. local wafdir="$pkgdir/usr/lib/waf" diff --git a/building-waf.md b/building-waf.md new file mode 100644 index 000000000000..3cbe1a0e22f7 --- /dev/null +++ b/building-waf.md @@ -0,0 +1,14 @@ +# Building a custom waf binary + +Waf is primarily intended to be distributed with the project using it. The Arch Linux package makes waf usable directly, but also brings all files necessary to compose a custom binary for your project. To do so, create a temporary directory, link all the necessary resources together and build it. + +cd $(mktemp -d) +ln -s /usr/share/waf/wscript . +ln -s /usr/bin/waf waf-light +ln -s /usr/lib/waf/waflib . +mkdir zip +waf configure build --make-waf --tools='' + +The last line allows you to choose tools to include. + +After this process, there should be a `waf` binary ready in the current working directory. |