summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Maunier2018-01-04 14:23:16 +0100
committerFlorian Maunier2018-01-04 14:23:16 +0100
commitd28ce8cec07f80774c63b3d486969a55985ba15b (patch)
treece06a21002ec5dbe38f5cd37ab256f9b5462702e
downloadaur-libu2f-server-git.tar.gz
feat(package): Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD54
2 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ba887c26bd3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = libu2f-server-git
+ pkgdesc = Yubico Universal 2nd Factor (U2F) Server C Library - git checkout
+ pkgver = 1.0.1.r50.g7485f4e
+ pkgrel = 1
+ url = https://github.com/Yubico/libu2f-server
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = check
+ makedepends = git
+ makedepends = gengetopt
+ depends = openssl
+ depends = json-c
+ provides = libu2f-server
+ conflicts = libu2f-server
+ source = git://github.com/Yubico/libu2f-server.git
+ sha256sums = SKIP
+
+pkgname = libu2f-server-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c2a44ac6ca6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Florian Maunier <fmaunier@gmail.com>
+
+pkgname=libu2f-server-git
+pkgver=1.0.1.r50.g7485f4e
+pkgrel=1
+pkgdesc="Yubico Universal 2nd Factor (U2F) Server C Library - git checkout"
+arch=('i686' 'x86_64')
+url='https://github.com/Yubico/libu2f-server'
+license=('BSD')
+depends=('openssl' 'json-c')
+makedepends=('check' 'git' 'gengetopt')
+provides=('libu2f-server')
+conflicts=('libu2f-server')
+source=('git://github.com/Yubico/libu2f-server.git')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd libu2f-server/
+
+ if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
+ printf '%s.r%s.g%s' \
+ "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG})" \
+ "$(git rev-list --count ${GITTAG}..)" \
+ "$(git log -1 --format='%h')"
+ else
+ printf '0.r%s.g%s' \
+ "$(git rev-list --count master)" \
+ "$(git log -1 --format='%h')"
+ fi
+}
+
+build() {
+ cd libu2f-server/
+
+ autoreconf -fi
+ ./configure \
+ --prefix=/usr
+
+ make
+}
+
+check() {
+ cd libu2f-server/
+
+ make check
+}
+
+package() {
+ cd libu2f-server/
+
+ make DESTDIR="${pkgdir}/" install
+
+ install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}