diff options
author | Filipe Verri | 2017-08-14 15:12:29 -0300 |
---|---|---|
committer | Filipe Verri | 2017-08-14 15:12:29 -0300 |
commit | 49788cde3e2c5bedc75dc93f951637f8951d08cd (patch) | |
tree | e67eaaf68ba734a01aebed50aae76ebe24c1cd81 | |
download | aur-49788cde3e2c5bedc75dc93f951637f8951d08cd.tar.gz |
First working commit.
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 71 |
2 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..04a8662b1d72 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = build2-toolchain + pkgdesc = Open source, cross-platform toolchain for building and packaging C++ code + pkgver = 0.6.0 + pkgrel = 1 + url = https://build2.org/ + arch = i686 + arch = x86_64 + license = MIT + makedepends = gcc>=4.8 + depends = gcc-libs + source = https://download.build2.org/0.6.0/build2-toolchain-0.6.0.tar.gz + sha256sums = 7c1749abdd145254fadfe3684567767a785e3f78b094a5850d2c3d152e32a264 + +pkgname = build2-toolchain + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e9ebabc206cb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Filipe Verri <filipeverri@gmail.com> + +pkgname=build2-toolchain +pkgver=0.6.0 +pkgrel=1 +pkgdesc="Open source, cross-platform toolchain for building and packaging C++ code" +arch=(i686 x86_64) +url="https://build2.org/" +license=('MIT') +depends=('gcc-libs') +makedepends=('gcc>=4.8') +source=("https://download.build2.org/$pkgver/$pkgname-$pkgver.tar.gz") +sha256sums=('7c1749abdd145254fadfe3684567767a785e3f78b094a5850d2c3d152e32a264') + +build() { + cd "$pkgname-$pkgver" + + cd build2 + ./bootstrap.sh g++ + + build2/b-boot config.cxx=g++ config.bin.lib=static + mv build2/b build2/b-boot +} + +package() { + cd "$pkgname-$pkgver" + + build2/build2/b-boot configure \ + config.cxx=g++ \ + config.bin.suffix=-stage \ + config.bin.lib=static \ + config.install.root="$pkgdir/usr" \ + config.install.data_root=/tmp/build2-stage + + build2/build2/b-boot install + + export PATH="$pkgdir/usr/bin:$PATH" + + build2/build2/b-boot configure \ + config.cxx=g++ \ + config.cc.coptions=-O3 \ + config.bin.lib=static \ + config.install.root="$pkgdir/usr" + + cd .. + mkdir build2-toolchain-final + cd build2-toolchain-final + + bpkg-stage create \ + cc \ + config.cxx=g++ \ + config.cc.coptions=-O3 \ + config.bin.lib=static \ + config.install.root="$pkgdir/usr" + + bpkg-stage add https://pkg.cppget.org/1/alpha + bpkg-stage --trust-yes fetch + bpkg-stage build --yes build2 bpkg + bpkg-stage install build2 bpkg + + cd .. + cd "$pkgname-$pkgver" + b uninstall + + # Fix path + sed -i "s/$(echo $pkgdir | sed s/\\//./g)//" "$pkgdir/usr/lib/pkgconfig/libbutl.static.pc" + + # License + mkdir -p $pkgdir/usr/share/licenses/build2-toolchain/ + cp $pkgdir/usr/share/doc/build2/LICENSE $pkgdir/usr/share/licenses/build2-toolchain/ +} |