# $Id$ PNAME="pcsc-lite" PVER="1.7.4" PBUILD="r1" PCATEGORIE="sys-apps" DESCRIPTION="Middleware to access a smart card using SCard API (PC/SC)." HOMEPAGE="http://pcsclite.alioth.debian.org/" DEPEND=">= dev-libs/libusb-1" SDEPEND=">= dev-util/pkgconfig-0.25" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools # rc cvs revision RC_REV=1.2 SRC_URI=( https://alioth.debian.org/frs/download.php/3598/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-systemd-socket-activation.patch mirror://${PNAME}/${PNAME}-${PVER}-systemd-disable-autostart.patch mirror://${PNAME}/${PNAME}-${PVER}-systemd-install-service-files.patch mirror://${PNAME}/pcscd.rc-${RC_REV} mirror://${PNAME}/pcscd.confd ) UP2DATE="updatecmd 'https://alioth.debian.org/frs/?group_id=30105' | grep '${PNAME}-\(.*\).*' | firsttarball" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # add systemd support mpatch ${PNAME}-${PVER}-systemd-socket-activation.patch || die mpatch ${PNAME}-${PVER}-systemd-disable-autostart.patch || die mpatch ${PNAME}-${PVER}-systemd-install-service-files.patch || die } src_compile() { local myconf cd ${SRCDIR} # needed by the systemd patch: myconf="--disable-autostart" mconfigure \ --docdir=/usr/share/doc/${PNAME}-${PVER} \ --enable-usbdropdir=/usr/$(mlibdir)/readers/usb \ --enable-libusb \ --disable-libhal \ ${myconf} \ || die mmake || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die minstallrc pcscd.rc-${RC_REV} pcscd || die minstallconf pcscd.confd pcscd || die minstalldocs AUTHORS DRIVERS HELP README SECURITY ChangeLog } postinstall() { mstartservice pcscd mstartunit pcscd.socket mstartunit pcscd.service } postremove() { mstopservice pcscd mstopunit pcscd.socket mstopunit pcscd.service }