archrelease: copy trunk to community-any
[ArchLinux/community.git] / libnfc / trunk / PKGBUILD
blob2b8f4309e6969cadd0b847f3137cae243f3e49c2
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>
6 pkgname=libnfc
7 pkgver=1.8.0
8 pkgrel=2
9 pkgdesc="Platform independent Near Field Communication (NFC) library"
10 arch=(x86_64)
11 url="http://nfc-tools.org/"
12 license=(LGPL3)
13 depends=(libusb-compat pcsclite)
14 makedepends=(cmake)
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')
19 prepare() {
20   # Use uaccess 
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
25 build() {
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 \
35     -Wno-dev
36   make -C build
39 package() {
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/