summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 36910a7261988de3ab62281c5d7cb470a0c5a068 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Maintainer: Frederick Zhang <frederick888@tsundere.moe>
pkgname=ifdnfc-git
pkgver=r64.0e48e8e
pkgrel=2
pkgdesc="PC/SC IFD Handler based on libnfc"
arch=('x86_64')
url="https://github.com/nfc-tools/ifdnfc"
license=('GPL3')
source=(
    "ifdnfc::git+https://github.com/nfc-tools/ifdnfc.git"
    "fix-pcsc-lib-path.patch"
)
sha256sums=(
    'SKIP'
    '9ac432e7f32f20e312ff7f42e0cf052c3d0ffa2cf4fa6412bc3be51279fe2c9e'
)
provides=('ifdnfc')
conflicts=('ifdnfc')
depends=('libnfc' 'pcsclite')
backup=('etc/reader.conf.d/ifdnfc')

pkgver() {
    cd "$srcdir/ifdnfc"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "$srcdir/ifdnfc"
    patch --forward --strip=1 --input="${srcdir}/fix-pcsc-lib-path.patch"
}

build() {
    cd "$srcdir/ifdnfc"
    autoreconf -vis
    ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
    make
}

package() {
    cd "$srcdir/ifdnfc"
    make DESTDIR="$pkgdir/" install
    install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}