# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=ccid
pkgver=1.4.29
pkgrel=0
pkgdesc="USB CCID/ICCD SmartCard reader driver"
url="https://pcsclite.alioth.debian.org/ccid.html"
arch="all"
license="LGPL-2.1-or-later"
depends="pcsc-lite"
makedepends="perl libusb-dev pcsc-lite-dev"
install=""
subpackages=""
source="https://alioth.debian.org/frs/download.php/file/4238/ccid-1.4.29.tar.bz2"

builddir="$srcdir"/ccid-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/etc/udev/rules.d/
	cp src/92_pcscd_ccid.rules "$pkgdir"/etc/udev/rules.d/
}

sha512sums="9ff37acad086e959f660069b245fe06ecada140623025a19dfbff55edec71e1e72bce09ac4fc506ad985dd0831dafc6b12f5a5b109b38bf9ba7583856eb19418  ccid-1.4.29.tar.bz2"
