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