summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Viallon2019-10-24 21:36:50 +0200
committerAntoine Viallon2019-10-24 21:40:08 +0200
commit514d4abf4e390e397bdac24cde5b54078b9806d6 (patch)
tree7c43e953dd0e5257f90d0f66292b0fec2dd65328
downloadaur-514d4abf4e390e397bdac24cde5b54078b9806d6.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD47
-rw-r--r--acr122bug.patch20
3 files changed, 90 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fd6b85229862
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = libnfc-no_alternate_usb-git
+ pkgdesc = Platform independent Near Field Communication (NFC) library
+ pkgver = 1.7.1.r223.gf8b2852
+ pkgrel = 1
+ url = http://nfc-tools.org/
+ arch = i686
+ arch = x86_64
+ license = LGPL3
+ makedepends = doxygen
+ makedepends = zip
+ makedepends = git
+ depends = pcsclite
+ depends = libusb-compat
+ provides = libnfc=1.7.1.r223.gf8b2852
+ conflicts = libnfc
+ conflicts = libnfc-svn
+ conflicts = libnfc-git
+ replaces = libnfc-svn
+ source = git+https://github.com/nfc-tools/libnfc.git
+ sha256sums = SKIP
+
+pkgname = libnfc-no_alternate_usb-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3bbc4610e3c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Antoine Viallon <antoine.viallon@gmail.com>
+# Contributor: “0xReki” <mail@0xreki.de>
+# Contributor: hardfalcon <?>
+_pkgname=libnfc
+pkgname="${_pkgname}-no_alternate_usb-git"
+pkgver=1.7.1.r223.gf8b2852
+pkgrel=1
+pkgdesc='Platform independent Near Field Communication (NFC) library'
+arch=('i686' 'x86_64')
+url="http://nfc-tools.org/"
+license=('LGPL3')
+depends=('pcsclite' 'libusb-compat')
+makedepends=('doxygen' 'zip' 'git')
+provides=("libnfc=${pkgver}")
+conflicts=(libnfc libnfc-svn libnfc-git)
+replaces=(libnfc-svn)
+source=("git+https://github.com/nfc-tools/libnfc.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ git describe --long | sed 's/^'"${_pkgname}-"'//' | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd ${srcdir}/${_pkgname}
+ #Hotfixing Bug
+ if [ ! -e README-Windows.txt ]; then
+ ln -s README-Windows.{md,txt}
+ fi
+ ls
+ patch -p1 < ../../acr122bug.patch
+ ./make_release.sh
+ #autoreconf -vis
+ ./configure --prefix /usr --enable-doc --sysconfdir=/etc
+
+}
+
+build() {
+ cd ${srcdir}/${_pkgname}
+ make
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/acr122bug.patch b/acr122bug.patch
new file mode 100644
index 000000000000..956c599a090d
--- /dev/null
+++ b/acr122bug.patch
@@ -0,0 +1,20 @@
+diff --git a/libnfc/drivers/acr122_usb.c b/libnfc/drivers/acr122_usb.c
+index a6392e8..16eddef 100644
+--- a/libnfc/drivers/acr122_usb.c
++++ b/libnfc/drivers/acr122_usb.c
+@@ -427,13 +427,13 @@ acr122_usb_open(const nfc_context *context, const nfc_connstring connstring)
+ goto free_mem;
+ }
+
+- res = usb_set_altinterface(data.pudh, 0);
++ /*res = usb_set_altinterface(data.pudh, 0);
+ if (res < 0) {
+ log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to set alternate setting on USB interface (%s)", _usb_strerror(res));
+ usb_close(data.pudh);
+ // we failed to use the specified device
+ goto free_mem;
+- }
++ }*/
+
+ // Allocate memory for the device info and specification, fill it and return the info
+ pnd = nfc_device_new(context, connstring);