summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse2015-06-28 23:34:47 +0200
committerChristian Hesse2015-06-28 23:34:47 +0200
commit5be9bbcd3a12191d0f8ae7db8ae2976f5083fb1b (patch)
tree254286b7da526149545a8f845a1ba78dd44c5f29
downloadaur-5be9bbcd3a12191d0f8ae7db8ae2976f5083fb1b.tar.gz
initial import of yubikey-personalization-git 1.17.1.r0.g717a772-1
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD49
-rw-r--r--yubikey-personalization.install15
3 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..1cab381ba89
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = yubikey-personalization-git
+ pkgdesc = Yubico YubiKey Personalization library and tool - git checkout
+ pkgver = 1.17.1.r0.g717a772
+ pkgrel = 1
+ url = https://github.com/Yubico/yubikey-personalization
+ install = yubikey-personalization.install
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ depends = libusb
+ depends = yubico-c-client
+ provides = ykpers
+ provides = yubikey-personalization
+ conflicts = ykpers
+ conflicts = yubikey-personalization
+ source = git://github.com/Yubico/yubikey-personalization.git
+ sha256sums = SKIP
+
+pkgname = yubikey-personalization-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..09c947e661a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+
+pkgname=yubikey-personalization-git
+pkgver=1.17.1.r0.g717a772
+pkgrel=1
+pkgdesc='Yubico YubiKey Personalization library and tool - git checkout'
+arch=('i686' 'x86_64')
+url='https://github.com/Yubico/yubikey-personalization'
+license=('BSD')
+depends=('libusb' 'yubico-c-client')
+makedepends=('git')
+provides=('ykpers' 'yubikey-personalization')
+conflicts=('ykpers' 'yubikey-personalization')
+install=yubikey-personalization.install
+source=('git://github.com/Yubico/yubikey-personalization.git')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd yubikey-personalization/
+
+ if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
+ echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
+ else
+ echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
+ fi
+}
+
+build() {
+ cd yubikey-personalization/
+
+ autoreconf -fi
+ ./configure --prefix=/usr --with-udevrulesdir=/usr/lib/udev/rules.d/
+ make
+}
+
+check() {
+ cd yubikey-personalization/
+
+ make check
+}
+
+package() {
+ cd yubikey-personalization/
+
+ install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/yubikey-personalization/COPYING"
+ install -D -m0644 README "${pkgdir}/usr/share/doc/yubikey-personalization/README"
+ make DESTDIR="${pkgdir}/" install
+}
+
diff --git a/yubikey-personalization.install b/yubikey-personalization.install
new file mode 100644
index 00000000000..2dba3586e41
--- /dev/null
+++ b/yubikey-personalization.install
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+post_upgrade() {
+ if systemctl -q is-active systemd-udevd; then
+ udevadm control --reload-rules
+ fi
+}
+
+post_install() {
+ post_upgrade
+}
+
+post_remove() {
+ post_upgrade
+}