summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraig2020-10-23 17:35:29 +0200
committeraig2020-10-23 17:35:29 +0200
commit80032389da224d38b127d16d9dfe5491ee82a144 (patch)
tree08c303d529fd31ab11784847d9f1b9fd34e5c311
parentd899b3436471db9f17f7a72df05c824e609f796c (diff)
downloadaur-80032389da224d38b127d16d9dfe5491ee82a144.tar.gz
Fix udev rules file
-rw-r--r--.SRCINFO8
-rw-r--r--03-udev-rules.patch9
-rw-r--r--04-udev-rules-automake.patch15
-rw-r--r--PKGBUILD21
4 files changed, 40 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fef2591760a..a84f0c3c22a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = libnfc-nci-lpcusbsio
- pkgdesc = Linux NFC stack for NCI based NXP NFC Controllers (PN7150, PN7120). lpcusbsio USB tml.
+ pkgdesc = Linux NFC stack for NCI based NXP NFC Controllers (PN7150, PN7120). For USB transport.
pkgver = 2.4.1
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/NXPNFCLinux/linux_libnfc-nci/
arch = x86_64
license = APACHE
@@ -17,10 +17,12 @@ pkgbase = libnfc-nci-lpcusbsio
source = 01-fix-tml-linker-errors.patch
source = 02-fix-llcp-linker-errors.patch
source = 03-udev-rules.patch
+ source = 04-udev-rules-automake.patch
sha256sums = SKIP
sha256sums = c9992a8449de8ece0324cbf180a24f8bcab82cb7f51832d3d80958c0968a7575
sha256sums = c6ece172b50e1d1070a979fbafa2e9ee7f7f7b92d583fa38f8ea433123a9ef4d
- sha256sums = 0a44a4a1c0e429b6415332ededfc36111d6832a98c0717a996c8f862ba623e77
+ sha256sums = 7aca0dfecb6bb9455a82b46a52dc653f1143493839585429876da31c1e8356a4
+ sha256sums = 8d12d95b11edf634fca2f0289b58a063bc2a6be12ec5fbc2c9b06c63e676f46d
pkgname = libnfc-nci-lpcusbsio
diff --git a/03-udev-rules.patch b/03-udev-rules.patch
index a14bfc3d328..4673dcbd665 100644
--- a/03-udev-rules.patch
+++ b/03-udev-rules.patch
@@ -1,8 +1,8 @@
diff --git a/src/halimpl/pn54x/tml/lpcusbsio/97-lpcusbsio-hid.rules b/src/halimpl/pn54x/tml/lpcusbsio/97-lpcusbsio-hid.rules
-index bf3c8db..04f24a7 100644
+index bf3c8db..f8a0827 100644
--- a/src/halimpl/pn54x/tml/lpcusbsio/97-lpcusbsio-hid.rules
+++ b/src/halimpl/pn54x/tml/lpcusbsio/97-lpcusbsio-hid.rules
-@@ -1,21 +1,5 @@
+@@ -1,21 +1,2 @@
-# This is a sample udev file for HIDAPI devices which changes the permissions
-# to 0666 (world readable/writable) for a specified device on Linux systems.
-
@@ -24,7 +24,4 @@ index bf3c8db..04f24a7 100644
-# grained permission setting. For example, it might be sufficient to just
-# set the group or user owner for specific devices (for example the plugdev
-# group on some systems).
-+KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", TAG+="uaccess"
-+KERNEL=="hidraw*", ATTRS{busnum}=="2", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", TAG+="uaccess"
-+KERNEL=="hidraw*", ATTRS{busnum}=="3", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", TAG+="uaccess"
-+KERNEL=="hidraw*", ATTRS{busnum}=="4", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", TAG+="uaccess"
++SUBSYSTEM=="hidraw", KERNEL=="hidraw*", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0088", TAG+="uaccess"
diff --git a/04-udev-rules-automake.patch b/04-udev-rules-automake.patch
new file mode 100644
index 00000000000..ad287fa75a3
--- /dev/null
+++ b/04-udev-rules-automake.patch
@@ -0,0 +1,15 @@
+diff --git a/Makefile.am b/Makefile.am
+index 3561d93..56b93d2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -39,8 +39,8 @@ endif
+ if LPCUSBSIO
+ AM_LDFLAGS += `pkg-config libudev --libs`
+
+-udevrules_DATA = src/halimpl/pn54x/tml/lpcusbsio/97-lpcusbsio-hid.rules
+-udevrulesdir = /etc/udev/rules.d
++udevrules_DATA = src/halimpl/pn54x/tml/lpcusbsio/60-lpcusbsio-hid.rules
++udevrulesdir = /usr/lib/udev/rules.d
+ endif
+
+ LIBNFC_NCI_INCLUDE := \
diff --git a/PKGBUILD b/PKGBUILD
index 62dfbc492b2..38c449cc072 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgname=libnfc-nci-lpcusbsio
pkgver=2.4.1
-pkgrel=3
-pkgdesc="Linux NFC stack for NCI based NXP NFC Controllers (PN7150, PN7120). lpcusbsio USB tml."
+pkgrel=4
+pkgdesc="Linux NFC stack for NCI based NXP NFC Controllers (PN7150, PN7120). For USB transport."
arch=('x86_64')
url="https://github.com/NXPNFCLinux/linux_libnfc-nci/"
license=('APACHE')
@@ -14,17 +14,22 @@ conflicts=('libnfc-nci-i2c' 'libnfc-nci-alt')
source=("git+https://github.com/NXPNFCLinux/linux_libnfc-nci#commit=2aff6448cf6a86897d3d1bacb0a0943a594aa9ce"
"01-fix-tml-linker-errors.patch"
"02-fix-llcp-linker-errors.patch"
- "03-udev-rules.patch")
+ "03-udev-rules.patch"
+ "04-udev-rules-automake.patch")
sha256sums=('SKIP'
'c9992a8449de8ece0324cbf180a24f8bcab82cb7f51832d3d80958c0968a7575'
'c6ece172b50e1d1070a979fbafa2e9ee7f7f7b92d583fa38f8ea433123a9ef4d'
- '0a44a4a1c0e429b6415332ededfc36111d6832a98c0717a996c8f862ba623e77')
+ '7aca0dfecb6bb9455a82b46a52dc653f1143493839585429876da31c1e8356a4'
+ '8d12d95b11edf634fca2f0289b58a063bc2a6be12ec5fbc2c9b06c63e676f46d')
prepare() {
cd "$srcdir/linux_libnfc-nci"
patch -p1 -i "$srcdir/01-fix-tml-linker-errors.patch"
patch -p1 -i "$srcdir/02-fix-llcp-linker-errors.patch"
patch -p1 -i "$srcdir/03-udev-rules.patch"
+ patch -p1 -i "$srcdir/04-udev-rules-automake.patch"
+ mv $srcdir/linux_libnfc-nci/src/halimpl/pn54x/tml/lpcusbsio/97-lpcusbsio-hid.rules \
+ $srcdir/linux_libnfc-nci/src/halimpl/pn54x/tml/lpcusbsio/60-lpcusbsio-hid.rules
}
build() {
@@ -40,3 +45,11 @@ package() {
make DESTDIR="$pkgdir/" install
rm -rf $pkgdir/usr/sbin
}
+
+post_install() {
+ udevadm control --reload
+}
+
+post_remove() {
+ udevadm control --reload
+}