aboutsummaryrefslogtreecommitdiffstats
path: root/main/pcsc-lite/APKBUILD
blob: 9d5676641041b500c1ed15236438df245cc0cc6a (plain) (blame)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=pcsc-lite
pkgver=1.8.18
pkgrel=1
pkgdesc="Middleware to access a smart card using SCard API (PC/SC)"
url="http://pcsclite.alioth.debian.org/pcsclite.html"
arch="all"
license="Custom"
depends=""
depends_dev="eudev-dev"
makedepends="$depends_dev perl libcap-ng-utils"
install="pcsc-lite.pre-install pcsc-lite.pre-upgrade"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://alioth.debian.org/frs/download.php/file/4179/pcsc-lite-1.8.18.tar.bz2
	pcscd.initd
	musl-stacksize.patch"

builddir="$srcdir"/pcsc-lite-$pkgver

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-libusb \
		--enable-libudev \
		--disable-maintainer-mode \
		--disable-silent-rules \
		--without-systemdsystemunitdir \
		--enable-ipcdir=/run/pcscd \
		--enable-usbdropdir=/usr/lib/pcsc/drivers \
		--disable-polkit \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
        install -D -m755 "$srcdir"/pcscd.initd \
		"$pkgdir"/etc/init.d/pcscd || return 1
	mkdir -p "$pkgdir"/usr/lib/pcsc/drivers

	# fix pcscd permissions and grant sysfs access
	chown root:pcscd "$pkgdir"/usr/sbin/pcscd
	chmod 0550 "$pkgdir"/usr/sbin/pcscd
	filecap "$pkgdir"/usr/sbin/pcscd dac_override
}

libs() {
	pkgdesc="Middleware to access a smart card using SCard API (PC/SC) (libraries)"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib \
		"$subpkgdir"/usr || return 1
}

dev() {
	default_dev || return 1
	# move back the /usr/lib/libpcsclite.so
	# see http://bugs.alpinelinux.org/issues/3236 (and 6392)
	mv "$subpkgdir"/usr/lib/libpcsclite.so "$pkgdir"/usr/lib/libpcsclite.so || return 1
}

md5sums="03d92b060183b9cb0b559ea38c6c6c6f  pcsc-lite-1.8.18.tar.bz2
f9a2037622e5ed088185bb7e2b0a7031  pcscd.initd
5431070535db7126b196dd47af781325  musl-stacksize.patch"
sha256sums="b22d32b018f6a1016adba91abfcc63876cca999daa472dd86e953ddd41d00905  pcsc-lite-1.8.18.tar.bz2
738381311ebfe75d9c7221d7eb99f852130ed5fd058f6802a51db2a6fc99e2c4  pcscd.initd
f04fa89cae71a21d322b0a140aa3738c66dce2baadfdd514136e5e0ab088f008  musl-stacksize.patch"
sha512sums="928e8ca24491b0c457a36cf627b356d3218bc101ea3477b905694cfa943289e83273ef9fe468c85e625fcb58138240555b511d91e56ec3f8eb2be8df5f662f87  pcsc-lite-1.8.18.tar.bz2
6810ab357b5bcf07bf1ad76ed17ebb8e92be4599303a4e697b87a05d43b8d2bec5d3c29d44d8ddb5d031910ea62ca52a9868e6de9a255227eaeb29d1a7ee0041  pcscd.initd
bff3f9dd8157de960b7c9694ff178be0df087f4d96aa56aad1d91dd3555f2aef51992c86f9d9460086d2e6c2b519b258ca66ad609a4e0a64d8f2a0a3c6d405d2  musl-stacksize.patch"