blob: cee94c615e28503dda15c50b649c4928fed20b53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
}
|