1Summanry = "Middleware framework for smart card terminals" 2HOMEPAGE = "https://github.com/OpenSC/openct/wiki" 3DESCRIPTION = " \ 4OpenCT implements drivers for several smart card readers. \ 5It comes as driver in ifdhandler format for PC/SC-Lite, \ 6as CT-API driver, or as a small and lean middleware, \ 7so applications can use it with minimal overhead. \ 8OpenCT also has a primitive mechanism to export smart card \ 9readers to remote machines via TCP/IP." 10 11DEPENDS += "libtool pcsc-lite libusb-compat" 12 13SRC_URI = " \ 14 https://downloads.sourceforge.net/project/opensc/${BPN}/${BPN}-${PV}.tar.gz \ 15 file://etc-openct.udev.in-disablePROGRAM.patch \ 16 file://etc-openct_usb.in-modify-UDEVINFO.patch \ 17 file://openct.init \ 18 file://openct.sysconfig \ 19 file://openct.service \ 20" 21 22SRC_URI[md5sum] = "a1da3358ab798f1cb9232f1dbababc21" 23SRC_URI[sha256sum] = "6cd3e2933d29eb1f875c838ee58b8071fd61f0ec8ed5922a86c01c805d181a68" 24 25LICENSE = "LGPL-2.0-or-later" 26LIC_FILES_CHKSUM = "file://LGPL-2.1;md5=2d5025d4aa3495befef8f17206a5b0a1" 27 28inherit systemd 29SYSTEMD_SERVICE:${PN} += "openct.service " 30SYSTEMD_AUTO_ENABLE = "enable" 31 32EXTRA_OECONF=" \ 33 --disable-static \ 34 --enable-usb \ 35 --enable-pcsc \ 36 --enable-doc \ 37 --enable-api-doc \ 38 --with-udev=${nonarch_libdir}/udev \ 39 --with-bundle=${libdir}/pcsc/drivers \ 40" 41 42inherit autotools pkgconfig 43 44FILES:${PN} += " \ 45 ${libdir}/ctapi \ 46 ${nonarch_libdir}/udev \ 47 ${libdir}/openct-ifd.so \ 48 ${libdir}/pcsc \ 49" 50 51FILES:${PN}-dbg += " \ 52 ${libdir}/ctapi/.debug \ 53 ${libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Linux/.debug \ 54" 55 56INSANE_SKIP:${PN} += "dev-deps" 57 58do_install[cleandirs] += "${D}" 59 60do_install () { 61 install -d ${D}${sysconfdir} 62 # fix up hardcoded paths 63 sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \ 64 ${WORKDIR}/openct.service ${WORKDIR}/openct.init 65 66 oe_runmake install DESTDIR=${D} 67 install -dm 755 ${D}${libdir}/ctapi/ 68 mv ${D}${libdir}/libopenctapi.so ${D}${libdir}/ctapi/ 69 install -Dpm 644 etc/openct.udev ${D}${nonarch_libdir}/udev/rules.d/60-openct.rules 70 install -pm 644 etc/openct.conf ${D}${sysconfdir}/openct.conf 71 72 install -Dpm 755 ${WORKDIR}/openct.init ${D}${sysconfdir}/init.d/openct 73 install -Dpm 644 ${WORKDIR}/openct.sysconfig ${D}${sysconfdir}/sysconfig/openct 74 75 install -d ${D}${systemd_unitdir}/system 76 install -m 644 ${WORKDIR}/openct.service ${D}${systemd_unitdir}/system 77 78 so=$(find ${D} -name \*.so | sed "s|^${D}||") 79 sed -i -e 's|\\(LIBPATH\\s*\\).*|\\1$so|' etc/reader.conf 80 install -Dpm 644 etc/reader.conf ${D}${sysconfdir}/reader.conf.d/openct.conf 81} 82 83BBCLASSEXTEND = "native" 84