summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-08-07 01:19:26 +0700
committerShulhan <ms@kilabit.info>2022-08-07 01:19:26 +0700
commit2b15b6b72e3cb46e6ff9a1c8aa406916bb60c9d0 (patch)
tree36709517152cad8baca2313d15abd01f2da53baa
parent2c0f8a1c9c4ef245fb88b5b0ccd393ec874ad3e3 (diff)
downloadgotp-2b15b6b72e3cb46e6ff9a1c8aa406916bb60c9d0.tar.xz
_AUR: add package build for Arch Linux
This package build the gotp based on the latest tag and commit.
-rw-r--r--_AUR/.SRCINFO14
-rw-r--r--_AUR/.gitignore4
-rw-r--r--_AUR/Makefile7
-rw-r--r--_AUR/PKGBUILD41
4 files changed, 66 insertions, 0 deletions
diff --git a/_AUR/.SRCINFO b/_AUR/.SRCINFO
new file mode 100644
index 0000000..d6a9a23
--- /dev/null
+++ b/_AUR/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = gotp-git
+ pkgdesc = A command line interface to manage and generate Time-based One Time Password (TOTP)
+ pkgver = 0.2.0.r5.gdbfed69
+ pkgrel = 1
+ url = https://git.sr.ht/~shulhan/gotp
+ arch = x86_64
+ license = GPL3
+ makedepends = go
+ makedepends = git
+ provides = awwan
+ source = gotp-git::git+https://git.sr.ht/~shulhan/gotp
+ md5sums = SKIP
+
+pkgname = gotp-git
diff --git a/_AUR/.gitignore b/_AUR/.gitignore
new file mode 100644
index 0000000..400b9a3
--- /dev/null
+++ b/_AUR/.gitignore
@@ -0,0 +1,4 @@
+*.tar.zst
+gotp-git
+pkg
+src
diff --git a/_AUR/Makefile b/_AUR/Makefile
new file mode 100644
index 0000000..1fda06c
--- /dev/null
+++ b/_AUR/Makefile
@@ -0,0 +1,7 @@
+.PHONY: all release
+
+all:
+ makepkg -s
+
+release:
+ makepkg --printsrcinfo > .SRCINFO
diff --git a/_AUR/PKGBUILD b/_AUR/PKGBUILD
new file mode 100644
index 0000000..cbddaa4
--- /dev/null
+++ b/_AUR/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: shulhan <ms@kilabit.info>
+
+pkgname=gotp-git
+pkgver=0.2.0.r5.gdbfed69
+pkgrel=1
+
+pkgdesc="A command line interface to manage and generate Time-based One Time Password (TOTP)"
+arch=(x86_64)
+url='https://git.sr.ht/~shulhan/gotp'
+license=('GPL3')
+
+makedepends=(
+ 'go'
+ 'git'
+)
+
+provides=('awwan')
+
+source=(
+ "$pkgname::git+https://git.sr.ht/~shulhan/gotp"
+ #"$pkgname::git+file:///home/ms/go/src/git.sr.ht/~shulhan/gotp"
+)
+md5sums=(
+ 'SKIP'
+)
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$pkgname"
+ make
+}
+
+package() {
+ cd "$pkgname"
+ install -Dm755 _bin/gotp $pkgdir/usr/bin/gotp
+ install -Dm755 COPYING $pkgdir/usr/share/licenses/gotp/COPYING
+}