diff options
author | James An | 2019-04-09 18:18:42 -0400 |
---|---|---|
committer | James An | 2019-04-09 18:18:42 -0400 |
commit | b7848a46c6d176562f5ad98f5462e288da304e93 (patch) | |
tree | 472db397e286f1a03169cd0208c964e4c4186d77 /PKGBUILD | |
download | aur-narg-git.tar.gz |
Initial commit with working PKGBUILD.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cee94c615e28 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: James An <james@jamesan.ca> + +pkgname=narg-git +_pkgname=${pkgname%-git} +pkgver=v1.0.r5.g55b9934 +pkgrel=1 +pkgdesc="Multiarg option parser for C, inspired by python's argparse." +arch=('x86_64' 'i686') +url="https://github.com/anordal/$_pkgname" +license=('GPL') +makedepends=('git' 'meson' 'ninja') +provides=("$_pkgname=$pkgver") +conflicts=("$_pkgname") +options=() +install= +source=("$_pkgname"::"git+https://github.com/anordal/$_pkgname.git") +md5sums=('SKIP') + +pkgver() { + cd "$_pkgname" + ( + set -o pipefail + git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +build() { + mkdir -p "$_pkgname"/build + cd "$_pkgname"/build + + arch-meson --buildtype=release . .. + ninja +} + +check() { + cd "$_pkgname"/build + + ninja test +} + +package() { + cd "$_pkgname"/build + + DESTDIR="$pkgdir" ninja install +} |