diff options
author | Aleksandar Trifunovic | 2018-06-14 23:35:12 +0200 |
---|---|---|
committer | Aleksandar Trifunovic | 2018-06-14 23:35:12 +0200 |
commit | fb715c39fa10a971957b2c01e9147d96b75e666c (patch) | |
tree | 23349a9230f9f314cd0b6466d33ebdf252b10c89 | |
download | aur-fb715c39fa10a971957b2c01e9147d96b75e666c.tar.gz |
init at v6.7.2
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 51 |
2 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..88cc695d374c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = or-tools + pkgdesc = Google's Operations Research tools + pkgver = 6.7.2 + pkgrel = 1 + url = https://github.com/google/or-tools + arch = x86_64 + arch = i686 + license = Apache + makedepends = cmake + depends = gcc-libs + conflicts = python-or-tools + source = https://github.com/google/or-tools/archive/v6.7.2.tar.gz + sha256sums = d025a95f78b5fc5eaa4da5f395f23d11c23cf7dbd5069f1f627f002de87b86b9 + +pkgname = or-tools + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..29ccb7a0f086 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Aleksandar Trifunović <akstrfn at gmail dot com> + +pkgname=or-tools +pkgver=6.7.2 +pkgrel=1 +pkgdesc="Google's Operations Research tools" +arch=('x86_64' 'i686') +url="https://github.com/google/or-tools" +license=('Apache') +depends=(gcc-libs) +makedepends=('cmake') +source=("https://github.com/google/or-tools/archive/v${pkgver}.tar.gz") +sha256sums=('d025a95f78b5fc5eaa4da5f395f23d11c23cf7dbd5069f1f627f002de87b86b9') +conflicts=('python-or-tools') # because it copies libortools.so to usr/lib + +build() { + cd "$pkgname-$pkgver" + cmake -H. -Bbuild \ + -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ + -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ + -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_PYTHON=OFF \ + + cmake --build build +} + +check() { + cd "$pkgname-$pkgver" + cmake --build build -- test +} + +package() { + cmake --build "$pkgname-$pkgver/build" -- DESTDIR="$pkgdir" install + install -d -m 755 "$pkgdir/usr/share/examples" + cp -a "$pkgname-$pkgver/examples/cpp" "$pkgdir/usr/share/examples/cpp" + rm "$pkgdir"/usr/share/examples/cpp/{BUILD,CMakeLists.txt} + + # TODO: work with upstream to clean this (cmake is still experimental) + cd "$pkgdir/usr/" + rm -rf bin share/man share/pkgconfig + rm lib/*.a + rm lib/libortools_examples.so + rm lib/libz* + rm -rf lib/pkgconfig + rm -rf lib/cmake/{Cbc,gflags,glog,protobuf,ZLIB} + rm -rf include/{cbc,gflags,glog,google} + rm -rf include/*.h +} |