#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: https://pozol.eu
# Source Website : https://git.sr.ht/~kennylevinsen/seatd
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=pcsclite
pkgver=1.9.9
pkgrel=01
pkgdesc="PC/SC Architecture smartcard middleware library w/o systemd"
arch=('x86_64')
url='https://pcsclite.apdu.fr/'

depends=('python' 'libeudev')
makedepends=('pkg-config')
provides=('libpcsclite.so' 'libpcscspy.so')
#options=('!docs')  # uncomment this to produce the documents pkg, otherwise the same as arch
source=("https://pcsclite.apdu.fr/files/pcsc-lite-${pkgver}.tar.bz2"{,.asc})

build() {
  cd "pcsc-lite-$pkgver"

  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --sysconfdir=/etc \
    --enable-filter \
    --enable-ipcdir=/run/pcscd \
    --enable-libudev \
    --enable-usbdropdir=/usr/lib/pcsc/drivers \
    --with-systemdsystemunitdir=no \
    --disable-libsystemd \
    --disable-documentation

  make
}

package() {
  cd "pcsc-lite-$pkgver"
  make DESTDIR="$pkgdir" install

  install -D -m0644 "$srcdir/pcsc-lite-$pkgver/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -d "$pkgdir/usr/lib/pcsc/drivers"
}


#---- license gpg-key sha256sums ----

license=('BSD')

validpgpkeys=('F5E11B9FFE911146F41D953D78A1B4DFE8F9C57E') # Ludovic Rousseau <rousseau@debian.org>

sha256sums=(cbcc3b34c61f53291cecc0d831423c94d437b188eb2b97b7febc08de1c914e8a # pcsc-lite-1.9.9.tar.bz2
	387dfea1c79ecae42ec82f5ce401117700b578f4fd25f73af38df438e44f66f7) # pcsc-lite-1.9.9.tar.bz2.asc


