1 # Maintainer: Bruno Pagani <archange@archlinux.org>
2 # Contributor: Christoph Hoopmann <choopm at 0pointer.org>
3 # Contributor: Pascal E. <archlinux at hardfalcon dot net>
4 # Contributor: Andrej Gelenberg <andrej.gelenberg at udo dot edu>
9 pkgdesc="Platform independent Near Field Communication (NFC) library"
11 url="http://nfc-tools.org/"
13 depends=(libusb-compat pcsclite)
15 optdepends=('acsccid: acr122_pcsc support')
16 source=(https://github.com/nfc-tools/libnfc/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2)
17 sha256sums=('6d9ad31c86408711f0a60f05b1933101c7497683c2e0d8917d1611a3feba3dd5')
21 sed -i "s|MODE=\"0664\", GROUP=\"plugdev\"|TAG+=\"uaccess\"|g" ${pkgname}-${pkgver}/contrib/udev/93-pn53x.rules
22 mv ${pkgname}-${pkgver}/contrib/udev/{93,70}-pn53x.rules
26 cmake -B build -S ${pkgname}-${pkgver} \
27 -DCMAKE_INSTALL_PREFIX=/usr \
28 -DLIBNFC_DRIVER_PCSC=ON \
29 -DLIBNFC_DRIVER_ACR122_PCSC=ON \
30 -DLIBNFC_DRIVER_ACR122_USB=ON \
31 -DLIBNFC_DRIVER_PN532_I2C=ON \
32 -DLIBNFC_DRIVER_PN532_SPI=ON \
33 -DLIBNFC_DRIVER_PN532_UART=ON \
34 -DLIBNFC_DRIVER_PN53X_USB=ON \
40 make -C build DESTDIR="${pkgdir}" install
41 cd ${pkgname}-${pkgver}
42 install -Dm644 libnfc.conf.sample -t "${pkgdir}"/etc/nfc/
43 install -Dm644 contrib/udev/70-pn53x.rules -t "${pkgdir}"/usr/lib/udev/rules.d/
44 install -Dm644 contrib/linux/blacklist-libnfc.conf -t "${pkgdir}"/usr/lib/modprobe.d/