summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChocobo12024-09-29 05:01:47 +0800
committerChocobo12024-09-29 05:05:39 +0800
commit892c52b7a21d2a8b8c80b9edd645ef877ef03d75 (patch)
tree3044dea7a5a90ecd2fef1f712f4d338f43894de3 /PKGBUILD
downloadaur-libvarlink-git.tar.gz
newpkg: libvarlink-git 23.r10.ga1a34ce-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6721670c242f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=libvarlink-git
+pkgver=23.r10.ga1a34ce
+pkgrel=1
+pkgdesc="Varlink C library and command line tool"
+arch=('i686' 'x86_64')
+url="https://varlink.org/"
+license=('Apache-2.0')
+depends=('gcc-libs')
+makedepends=('git' 'meson')
+provides=("libvarlink=$pkgver")
+conflicts=('libvarlink')
+source=("git+https://github.com/varlink/libvarlink.git")
+sha256sums=('SKIP')
+
+
+pkgver() {
+ cd "libvarlink"
+
+ _tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1)
+ _rev=$(git rev-list --count $_tag..HEAD)
+ _hash=$(git rev-parse --short HEAD)
+ printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
+}
+
+build() {
+ cd "libvarlink"
+
+ meson setup \
+ --buildtype=plain \
+ --prefix="/usr" \
+ --sbindir="bin" \
+ "_build"
+ meson compile -C "_build"
+}
+
+check() {
+ cd "libvarlink"
+
+ #meson test -C "_build"
+}
+
+package() {
+ cd "libvarlink"
+
+ meson install -C "_build" --destdir "$pkgdir"
+}