diff options
author | Martina Pietruschka | 2015-12-22 16:16:58 +0000 |
---|---|---|
committer | Martina Pietruschka | 2015-12-22 16:16:58 +0000 |
commit | f0a5141227d9a6bbeefb58e64ff3e8f77c9a878f (patch) | |
tree | dd9ee792fcf22c5455bc914366861cfb38a36c98 | |
download | aur-f0a5141227d9a6bbeefb58e64ff3e8f77c9a878f.tar.gz |
init
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 61 | ||||
-rw-r--r-- | openct.rc | 38 | ||||
-rw-r--r-- | udev-sleep.patch | 11 |
4 files changed, 137 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a495991150b7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +# Generated by mksrcinfo v8 +# Tue Dec 22 16:15:29 UTC 2015 +pkgbase = openct-git + pkgdesc = Implements drivers for several smart card readers and PCSC Lite + pkgver = r1044.968da6c + pkgrel = 1 + url = https://github.com/OpenSC/openct/ + arch = armv6h + arch = armv7h + arch = i686 + arch = x86_64 + license = LGPL + makedepends = doxygen + depends = pcsclite + depends = libusb-compat + depends = libtool + options = !libtool + backup = etc/openct.conf + source = openct-git::git+https://github.com/OpenSC/openct.git + source = openct.rc + source = udev-sleep.patch + md5sums = SKIP + md5sums = 000bab3e5a98e49159e8190e2b318c74 + md5sums = 1c8484195d3b8445ebdb9fdc2ee87736 + +pkgname = openct-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cbee58a9b2a0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: MartiMcFly <martimcfly at autorisation de> +# Contributor: Daniel Nagy <danielnagy at gmx de> +# Contributor: Marti Raudsepp <marti@juffo.org> +# Contributor: JKAbrams <JKAbrams@AUR> +# Contributor: kevku <kevku@msn.com> +# Contributor: William Rea <sillywilly@gmail.com> +# Contributor: Lorenzo Nizzi Grifi Gargiolli <lorenzo.nizzi.grifi@gmail.com> + +pkgname=openct-git +pkgver=r1044.968da6c +pkgrel=1 +pkgdesc="Implements drivers for several smart card readers and PCSC Lite" +arch=('armv6h' 'armv7h' 'i686' 'x86_64') +url="https://github.com/OpenSC/openct/" +options=('!libtool') +license="LGPL" +backup=('etc/openct.conf') +depends=('pcsclite' + 'libusb-compat' + 'libtool') +makedepends=('doxygen') +source=("$pkgname::git+https://github.com/OpenSC/openct.git" + 'openct.rc' + 'udev-sleep.patch') +md5sums=('SKIP' + '000bab3e5a98e49159e8190e2b318c74' + '1c8484195d3b8445ebdb9fdc2ee87736') + +pkgver() { + cd "$srcdir/$pkgname" + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git describe --always)" +} + +build() { + cd "$srcdir/$pkgname" + patch -p1 < "$srcdir"/udev-sleep.patch + ./bootstrap + ./configure --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-pcsc \ + --with-bundle=/usr/lib/pcsc/drivers \ + --with-udev=/usr/lib/udev \ + --enable-usb \ + --disable-static + + make +} + +package() { + cd "$srcdir/$pkgname" + # Work around broken makefile + mkdir "$pkgdir"/etc + make DESTDIR="$pkgdir" install + + install -D etc/openct.udev "$pkgdir"/usr/lib/udev/rules.d/95-openct.rules + install -D -m755 "$srcdir"/openct.rc $pkgdir/etc/rc.d/openct + + mkdir -p "$pkgdir"/run/openct +} diff --git a/openct.rc b/openct.rc new file mode 100644 index 000000000000..8f831fddb30c --- /dev/null +++ b/openct.rc @@ -0,0 +1,38 @@ +#!/bin/bash +. /etc/rc.conf +. /etc/rc.d/functions + +DAEMON=/usr/sbin/openct-control +NAME=openct +DESC="Smart Card Terminal Framework" + +case "$1" in + start) + stat_busy "Starting $DESC" + $DAEMON init + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon $NAME + stat_done + fi + ;; + stop) + stat_busy "Stopping $DESC" + $DAEMON shutdown + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon $NAME + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac +exit 0 diff --git a/udev-sleep.patch b/udev-sleep.patch new file mode 100644 index 000000000000..0e604be1f522 --- /dev/null +++ b/udev-sleep.patch @@ -0,0 +1,11 @@ +--- openct-0.6.20/etc/openct.udev.in.orig 2012-06-01 10:50:32.419033188 +0300 ++++ openct-0.6.20/etc/openct.udev.in 2012-06-01 10:50:51.225616679 +0300 +@@ -22,7 +22,7 @@ + # 2010-01-06 removed, as latest udev doesn't know WAIT_FOR_ATTR any more. + + # sleep for 100ms - the wait_for_sysfs might not be enough +-PROGRAM="/bin/sleep 0.1" ++PROGRAM="/usr/bin/sleep 0.1" + + # ccid + ATTR{bInterfaceClass}=="0b", ATTR{bInterfaceSubClass}=="00", ATTR{bInterfaceProtocol}=="00", ATTRS{idVendor}=="?*" RUN+="@udevdir@/openct_usb /dev/$parent" |