diff options
author | Alberto Santini | 2018-08-13 14:30:35 +0200 |
---|---|---|
committer | Alberto Santini | 2018-08-13 14:30:35 +0200 |
commit | 34f103661fc7bf9d20a8579e560254290e3f7c04 (patch) | |
tree | 703ae8efb61596f4236a63476d67a519ed610abd | |
download | aur-34f103661fc7bf9d20a8579e560254290e3f7c04.tar.gz |
Added library AS
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 56 |
2 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d164d6df28a3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = as-git + pkgdesc = Header-only C++ library with utilities for Operational Research projects. + pkgver = r53.1ebb0e3 + pkgrel = 1 + url = https://github.com/alberto-santini/as + arch = x86_64 + license = GPL3 + depends = cplex + depends = boost + depends = boost-libs + depends = discorde-git + depends = exactcolors-git + depends = cimg + depends = pmc-git + optdepends = doxygen: To build the documentation + optdepends = graphviz: To build the documentation + source = git+https://github.com/alberto-santini/as.git + sha256sums = SKIP + +pkgname = as-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8686f132dc4c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Mantainer: Alberto Santini <alberto dot santini at upf dot edu> + +pkgname='as-git' +pkgdesc='Header-only C++ library with utilities for Operational Research projects.' + +pkgver=r53.1ebb0e3 +pkgrel=1 + +arch=('x86_64') +url='https://github.com/alberto-santini/as' +license=('GPL3') +depends=('cplex' 'boost' 'boost-libs' 'discorde-git' 'exactcolors-git' 'cimg' 'pmc-git') +optdepends=('doxygen: To build the documentation' 'graphviz: To build the documentation') +ckeckdepends=('gtest') +source=("git+https://github.com/alberto-santini/as.git") +sha256sums=('SKIP') + +_doc_built=0 + +pkgver() { + cd "$srcdir/as" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +prepare() { + cd "$srcdir/as" + + if (pacman -Qi doxygen >/dev/null && pacman -Qi graphvix >/dev/null); then + doxygen Doxyfile + _doc_built=1 + fi +} + +check() { + cd "$srcdir/as" + mkdir -p build + cd build + + cmake .. + make + + ./as_test +} + +package() { + install -dm755 "$pkgdir/usr/include/as" + install -m644 "$srcdir/as/src/"*.h "$pkgdir/usr/include/as" + + if [[ "$_doc_build" = "1" ]]; then + install -dm755 "$pkgdir/usr/share/doc/as" + cp -R "$srcdir/as/doc/"* "$pkgdir/usr/share/doc/as" + fi +}
\ No newline at end of file |