Patchwork [meta-oe,v1,2/3] libpcsclite: add version 1.7.2

login
register
mail settings
Submitter Otavio Salvador
Date May 15, 2011, 9:45 p.m.
Message ID <1305495926-21490-2-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/4099/
State New, archived
Headers show

Comments

Otavio Salvador - May 15, 2011, 9:45 p.m.
The recipe name libpcsclite has been choosen since this is the most
important and used part of the project. The daemon itself is optional
and not always required to be installed.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta-oe/recipes-support/pcsc-lite/files/pcscd.init |   32 +++++++++++++++++
 .../recipes-support/pcsc-lite/libpcsclite_1.7.2.bb |   36 ++++++++++++++++++++
 2 files changed, 68 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-support/pcsc-lite/files/pcscd.init
 create mode 100644 meta-oe/recipes-support/pcsc-lite/libpcsclite_1.7.2.bb
Koen Kooi - May 16, 2011, 7:15 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15-05-11 23:45, Otavio Salvador wrote:
> The recipe name libpcsclite has been choosen since this is the most
> important and used part of the project. The daemon itself is optional
> and not always required to be installed.

Wouldn't debian.bbclass already take care of such renaming with proper
packaging?



> +++ b/meta-oe/recipes-support/pcsc-lite/libpcsclite_1.7.2.bb

> +INITSCRIPT_PACKAGES = "pcscd"
> +INITSCRIPT_NAME_pcscd = "pcscd"
> +INITSCRIPT_PARAMS_pcscd = "defaults"

These should go near the other _pscsd entries

> +
> +EXTRA_OECONF = " \
> +	--enable-libusb \
> +	--disable-libudev \

Please add the proper libusb to DEPENDS and a comment why udev is in
DEPENDS, but disabled
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFN0M8GMkyGM64RGpERAsJXAJ9aFHqXmtSGZ2rDgvTSnu+5DAPK/wCeNonq
weHpoQIB5GTXDvMvOjT4d/w=
=rHle
-----END PGP SIGNATURE-----
Otavio Salvador - May 16, 2011, 12:02 p.m.
On Mon, May 16, 2011 at 04:15, Koen Kooi <koen@dominion.thruhere.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 15-05-11 23:45, Otavio Salvador wrote:
>> The recipe name libpcsclite has been choosen since this is the most
>> important and used part of the project. The daemon itself is optional
>> and not always required to be installed.
>
> Wouldn't debian.bbclass already take care of such renaming with proper
> packaging?

It does for soname but not for -dev and -doc that is mostly related to
the library, not the daemon.

>> +++ b/meta-oe/recipes-support/pcsc-lite/libpcsclite_1.7.2.bb
>
>> +INITSCRIPT_PACKAGES = "pcscd"
>> +INITSCRIPT_NAME_pcscd = "pcscd"
>> +INITSCRIPT_PARAMS_pcscd = "defaults"
>
> These should go near the other _pscsd entries
>
>> +
>> +EXTRA_OECONF = " \
>> +     --enable-libusb \
>> +     --disable-libudev \
>
> Please add the proper libusb to DEPENDS and a comment why udev is in
> DEPENDS, but disabled

Fixed. Will post it again.

Patch

diff --git a/meta-oe/recipes-support/pcsc-lite/files/pcscd.init b/meta-oe/recipes-support/pcsc-lite/files/pcscd.init
new file mode 100644
index 0000000..92385ab
--- /dev/null
+++ b/meta-oe/recipes-support/pcsc-lite/files/pcscd.init
@@ -0,0 +1,32 @@ 
+#!/bin/sh
+DAEMON=/usr/sbin/pcscd
+NAME=pcscd
+DESC="PCSC Daemon"
+PIDFILE=/var/run/pcscd/pcscd.pid
+ARGS=""
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+    start)
+        echo -n "Starting $DESC: $NAME"
+        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS
+        echo "."
+        ;;
+    stop)
+        echo -n "Stopping $DESC: $NAME"
+        start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
+        echo "."
+        ;;
+    restart)
+        $0 stop
+        sleep 1
+        $0 start
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/meta-oe/recipes-support/pcsc-lite/libpcsclite_1.7.2.bb b/meta-oe/recipes-support/pcsc-lite/libpcsclite_1.7.2.bb
new file mode 100644
index 0000000..6326152
--- /dev/null
+++ b/meta-oe/recipes-support/pcsc-lite/libpcsclite_1.7.2.bb
@@ -0,0 +1,36 @@ 
+DESCRIPTION = "PC/SC Lite smart card framework and applications"
+HOMEPAGE = "http://pcsclite.alioth.debian.org/"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c8e551349dc346258274f0007679e149"
+DEPENDS = "udev"
+PR = "r0"
+
+SRC_URI = "https://alioth.debian.org/frs/download.php/3533/pcsc-lite-${PV}.tar.bz2 \
+           file://pcscd.init "
+
+SRC_URI[md5sum] = "47e7055cfc14399fdaa1b7a4aa06e5aa"
+SRC_URI[sha256sum] = "41f13d552eaa2c3978fbb6f2125e81903a0767011d999052fd1a6ee03880b398"
+
+inherit autotools update-rc.d
+
+INITSCRIPT_PACKAGES = "pcscd"
+INITSCRIPT_NAME_pcscd = "pcscd"
+INITSCRIPT_PARAMS_pcscd = "defaults"
+
+EXTRA_OECONF = " \
+	--enable-libusb \
+	--disable-libudev \
+	--enable-usbdropdir=${libdir}/pcsc/drivers \
+	"
+
+S = "${WORKDIR}/pcsc-lite-${PV}"
+
+do_install() {
+	oe_runmake DESTDIR="${D}" install
+	install -d "${D}/etc/init.d"
+	install -m 755 "${WORKDIR}/pcscd.init" "${D}/etc/init.d/pcscd"
+}
+
+PACKAGES =+ "pcscd"
+
+FILES_pcscd = "${bindir}/pscsd ${sysconfdir}/init.d"