Last active
November 26, 2015 18:32
-
-
Save delcypher/a929b1d289270a04040c to your computer and use it in GitHub Desktop.
PKGBUILD (Arch Linux build script) for fork of Z3 that supports installing java, python and Z3 bindings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: d.woffinden | |
# Contributor: Dan Liew <[email protected]> | |
pkgbase=('z3-git') | |
pkgname=('z3-git' 'z3py-git' 'z3-sharp-git' 'z3-java-git') | |
pkgver=4.4.1.r308.g9e28819 | |
pkgrel=1 | |
pkgdesc="Z3 is a high-performance theorem prover being developed at Microsoft Research" | |
arch=('i686' 'x86_64') | |
url="https://github.com/delcypher/z3-1.git" | |
license=('MIT') | |
depends=('gcc-libs') | |
makedepends=('git' 'python3' 'mono' 'jre7-openjdk-headless') | |
conflicts=('z3-bin' 'z3-codeplex') | |
provides=('z3') | |
source=("$pkgbase"::"git+$url#branch=mono_dotnet_bindings") | |
# Because the sources are not static, skip Git checksum: | |
md5sums=('SKIP') | |
pkgver() { | |
cd "$pkgname" | |
git describe --long | sed 's/z3-//;s/-/.r/;s/-/./' | |
} | |
build() { | |
cd "$srcdir/$pkgbase" | |
python3 scripts/mk_make.py \ | |
--prefix=/usr \ | |
--java | |
cd "$srcdir/$pkgbase/build" | |
make | |
# Create staged install for consumption in package_*() functions | |
mkdir staged | |
make DESTDIR=`realpath staged` install | |
} | |
package_z3-git() { | |
cd "$srcdir/$pkgbase/build" | |
install -d "$pkgdir"/usr/{bin,include,lib} | |
cp -a staged/usr/bin/* $pkgdir/usr/bin/ | |
cp -a staged/usr/lib/libz3.so $pkgdir/usr/lib/ | |
cp -a staged/usr/include/*.h $pkgdir/usr/include/ | |
cd "$srcdir/$pkgname" | |
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
} | |
package_z3py-git() { | |
depends=("z3-git=$pkgver-$pkgrel" 'python3') | |
pkgdesc="Python bindings to Z3 SMT solver" | |
cd "$srcdir/$pkgbase/build" | |
install -d "$pkgdir"/usr/lib/python3.5/ | |
cp -ar staged/usr/lib/python3.5/site-packages "$pkgdir"/usr/lib/python3.5/ | |
} | |
package_z3-sharp-git() { | |
depends=("z3-git=$pkgver-$pkgrel" 'mono') | |
pkgdesc="C# bindings to Z3 SMT solver" | |
cd "$srcdir/$pkgbase/build" | |
install -d "$pkgdir"/usr/lib/ | |
install -d "$pkgdir"/usr/lib/pkgconfig | |
cp -ar staged/usr/lib/mono "$pkgdir"/usr/lib | |
cp -ar staged/usr/lib/pkgconfig/* "$pkgdir"/usr/lib/pkgconfig/ | |
} | |
package_z3-java-git() { | |
depends=("z3-git=$pkgver-$pkgrel" 'jre7-openjdk-headless') | |
pkgdesc="Java bindings to Z3 SMT solver" | |
cd "$srcdir/$pkgbase/build" | |
install -d "$pkgdir"/usr/lib/ | |
cp -a staged/usr/lib/libz3java.so "$pkgdir"/usr/lib | |
cp -a staged/usr/lib/com.microsoft.z3.jar "$pkgdir"/usr/lib | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment