diff options
author | Onur Kader | 2021-12-13 18:37:42 +0300 |
---|---|---|
committer | Onur Kader | 2021-12-13 18:37:42 +0300 |
commit | 70c55e8f8a0102e9982a3c9498f58f2a7581d0b3 (patch) | |
tree | a0647650e50eaee54a7ea05517db011d785cd3f5 | |
download | aur-70c55e8f8a0102e9982a3c9498f58f2a7581d0b3.tar.gz |
scnlib-git: Add a simple PKGBUILD, might be wrong
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 37 |
2 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b1050d0ad842 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = scnlib-git + pkgdesc = A formatted input library, think {fmt} but in the other direction. 'scanf' for modern C++ + pkgver = r361.815782b + pkgrel = 1 + url = https://github.com/eliaskosunen/scnlib + arch = x86_64 + license = Apache + makedepends = git + makedepends = cmake + provides = scnlib + options = !strip + source = scnlib-git::git+https://github.com/eliaskosunen/scnlib.git + md5sums = SKIP + +pkgname = scnlib-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bbc91c3a4725 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Onur Kader <onurorkunkader1999@gmail.com> +pkgname=scnlib-git +pkgver=r361.815782b +pkgrel=1 +pkgdesc="A formatted input library, think {fmt} but in the other direction. 'scanf' for modern C++" +arch=("x86_64") +url="https://github.com/eliaskosunen/scnlib" +license=("Apache") +makedepends=("git" "cmake") +provides=("${pkgname%-git}") +source=("${pkgname}::git+https://github.com/eliaskosunen/scnlib.git") +md5sums=("SKIP") +options=(!strip) + +pkgver() { + cd "$srcdir/$pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/$pkgname" + mkdir build + cd build + cmake -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON .. + cmake --build . +} + +check() { + cd "$srcdir/$pkgname/build" + cmake --build . --target test +} + +package() { + cd "$srcdir/$pkgname/build" + DESTDIR="$pkgdir/" cmake --build . --target install +} + |