Magellan Linux

Diff of /trunk/pcsc-lite/patches/pcsc-lite-1.7.4-systemd-install-service-files.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1573 by niro, Thu Nov 24 20:58:47 2011 UTC revision 1574 by niro, Thu Nov 24 21:10:23 2011 UTC
# Line 1  Line 1 
1  ---  From 0f85375fd8949e529a6f46c07cdabda74040fd8a Mon Sep 17 00:00:00 2001
2   PCSC/Makefile.am          |    5 ++++-  From: Kalev Lember <kalev@smartlink.ee>
3   PCSC/configure.in         |   32 ++++++++++++++++++++++----------  Date: Fri, 24 Jun 2011 22:32:33 +0300
4   PCSC/etc/Makefile.am      |    9 +++++++++  Subject: [PATCH 3/3] Install systemd service files
  PCSC/etc/pcscd.service.in |   13 +++++++++++++  
  PCSC/etc/pcscd.socket.in  |    8 ++++++++  
  5 files changed, 56 insertions(+), 11 deletions(-)  
  create mode 100644 PCSC/etc/Makefile.am  
  create mode 100644 PCSC/etc/pcscd.service.in  
  create mode 100644 PCSC/etc/pcscd.socket.in  
5    
6  diff --git a/PCSC/Makefile.am b/PCSC/Makefile.am  ---
7  index 079b58a..c515128 100644   PCSC/Makefile.am          |    5 ++++-
8  --- a/PCSC/Makefile.am   PCSC/configure.in         |   32 ++++++++++++++++++++++----------
9  +++ b/PCSC/Makefile.am   PCSC/etc/Makefile.am      |    9 +++++++++
10  @@ -1,10 +1,13 @@   PCSC/etc/pcscd.service.in |   13 +++++++++++++
11  -SUBDIRS = m4 src doc   PCSC/etc/pcscd.socket.in  |    8 ++++++++
12  +SUBDIRS = m4 src etc doc   5 files changed, 56 insertions(+), 11 deletions(-)
13       create mode 100644 PCSC/etc/Makefile.am
14   fix-rights:   create mode 100644 PCSC/etc/pcscd.service.in
15    $(MAKE) -C src $@   create mode 100644 PCSC/etc/pcscd.socket.in
16      
17   ACLOCAL_AMFLAGS = -I m4  diff --git a/PCSC/Makefile.am b/PCSC/Makefile.am
18      index 079b58a..c515128 100644
19  +DISTCHECK_CONFIGURE_FLAGS = \  --- a/PCSC/Makefile.am
20  + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)  +++ b/PCSC/Makefile.am
21  +  @@ -1,10 +1,13 @@
22   EXTRA_DIST = DRIVERS SECURITY bootstrap HELP ChangeLog.svn  -SUBDIRS = m4 src doc
23      +SUBDIRS = m4 src etc doc
24   DISTCLEANFILES = ChangeLog.svn  
25  diff --git a/PCSC/configure.in b/PCSC/configure.in   fix-rights:
26  index 97e3360..cc6fe5f 100644   $(MAKE) -C src $@
27  --- a/PCSC/configure.in  
28  +++ b/PCSC/configure.in   ACLOCAL_AMFLAGS = -I m4
29  @@ -274,6 +274,14 @@ if test x$use_libusb = xyes; then  
30     PCSCLITE_FEATURES="${PCSCLITE_FEATURES} libusb"  +DISTCHECK_CONFIGURE_FLAGS = \
31   fi  + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
32      +
33  +AC_ARG_WITH([systemdsystemunitdir],   EXTRA_DIST = DRIVERS SECURITY bootstrap HELP ChangeLog.svn
34  +  AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),  
35  +  [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])   DISTCLEANFILES = ChangeLog.svn
36  +if test "x$with_systemdsystemunitdir" != xno; then  diff --git a/PCSC/configure.in b/PCSC/configure.in
37  +  AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])  index 97e3360..cc6fe5f 100644
38  +fi  --- a/PCSC/configure.in
39  +AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])  +++ b/PCSC/configure.in
40  +  @@ -274,6 +274,14 @@ if test x$use_libusb = xyes; then
41   # --disable-autostart     PCSCLITE_FEATURES="${PCSCLITE_FEATURES} libusb"
42   AC_ARG_ENABLE(autostart,   fi
43     AC_HELP_STRING([--disable-autostart], [disable pcscd automatic startup]),  
44  @@ -383,17 +391,18 @@ PTHREAD_CFLAGS:      ${PTHREAD_CFLAGS}  +AC_ARG_WITH([systemdsystemunitdir],
45   PTHREAD_LIBS:        ${PTHREAD_LIBS}  +  AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
46   PCSC_ARCH:           ${PCSC_ARCH}  +  [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
47      +if test "x$with_systemdsystemunitdir" != xno; then
48  -pcscd binary          ${PCSCD_BINARY}  +  AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
49  -libudev support:      ${use_libudev}  +fi
50  -libusb support:       ${use_libusb}  +AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
51  -USB drop directory:   ${usbdropdir}  +
52  -ATR parsing messages: ${debugatr}   # --disable-autostart
53  -ipcdir:               ${ipcdir}   AC_ARG_ENABLE(autostart,
54  -use serial:           ${use_serial}     AC_HELP_STRING([--disable-autostart], [disable pcscd automatic startup]),
55  -use usb:              ${use_usb}  @@ -383,17 +391,18 @@ PTHREAD_CFLAGS:      ${PTHREAD_CFLAGS}
56  -use autostart:        ${use_autostart}   PTHREAD_LIBS:        ${PTHREAD_LIBS}
57  +pcscd binary            ${PCSCD_BINARY}   PCSC_ARCH:           ${PCSC_ARCH}
58  +libudev support:        ${use_libudev}  
59  +libusb support:         ${use_libusb}  -pcscd binary          ${PCSCD_BINARY}
60  +USB drop directory:     ${usbdropdir}  -libudev support:      ${use_libudev}
61  +ATR parsing messages:   ${debugatr}  -libusb support:       ${use_libusb}
62  +ipcdir:                 ${ipcdir}  -USB drop directory:   ${usbdropdir}
63  +use serial:             ${use_serial}  -ATR parsing messages: ${debugatr}
64  +use usb:                ${use_usb}  -ipcdir:               ${ipcdir}
65  +use autostart:          ${use_autostart}  -use serial:           ${use_serial}
66  +systemd unit directory: ${with_systemdsystemunitdir}  -use usb:              ${use_usb}
67      -use autostart:        ${use_autostart}
68  -PCSCLITE_FEATURES:    ${PCSCLITE_FEATURES}  +pcscd binary            ${PCSCD_BINARY}
69  +PCSCLITE_FEATURES:      ${PCSCLITE_FEATURES}  +libudev support:        ${use_libudev}
70      +libusb support:         ${use_libusb}
71   EOF  +USB drop directory:     ${usbdropdir}
72      +ATR parsing messages:   ${debugatr}
73  @@ -406,6 +415,9 @@ doc/doxygen.conf  +ipcdir:                 ${ipcdir}
74   doc/pcscd.8  +use serial:             ${use_serial}
75   doc/reader.conf.5  +use usb:                ${use_usb}
76   doc/example/Makefile  +use autostart:          ${use_autostart}
77  +etc/Makefile  +systemd unit directory: ${with_systemdsystemunitdir}
78  +etc/pcscd.service  
79  +etc/pcscd.socket  -PCSCLITE_FEATURES:    ${PCSCLITE_FEATURES}
80   src/Makefile  +PCSCLITE_FEATURES:      ${PCSCLITE_FEATURES}
81   src/libpcsclite.pc  
82   src/pcscd.h   EOF
83  diff --git a/PCSC/etc/Makefile.am b/PCSC/etc/Makefile.am  
84  new file mode 100644  @@ -406,6 +415,9 @@ doc/doxygen.conf
85  index 0000000..6ab04fc   doc/pcscd.8
86  --- /dev/null   doc/reader.conf.5
87  +++ b/PCSC/etc/Makefile.am   doc/example/Makefile
88  @@ -0,0 +1,9 @@  +etc/Makefile
89  +if HAVE_SYSTEMD  +etc/pcscd.service
90  +SCRIPT_IN_FILES = \  +etc/pcscd.socket
91  + pcscd.service.in \   src/Makefile
92  + pcscd.socket.in   src/libpcsclite.pc
93  +   src/pcscd.h
94  +systemdsystemunit_DATA = \  diff --git a/PCSC/etc/Makefile.am b/PCSC/etc/Makefile.am
95  + pcscd.service \  new file mode 100644
96  + pcscd.socket  index 0000000..6ab04fc
97  +endif  --- /dev/null
98  diff --git a/PCSC/etc/pcscd.service.in b/PCSC/etc/pcscd.service.in  +++ b/PCSC/etc/Makefile.am
99  new file mode 100644  @@ -0,0 +1,9 @@
100  index 0000000..4800d32  +if HAVE_SYSTEMD
101  --- /dev/null  +SCRIPT_IN_FILES = \
102  +++ b/PCSC/etc/pcscd.service.in  + pcscd.service.in \
103  @@ -0,0 +1,13 @@  + pcscd.socket.in
104  +[Unit]  +
105  +Description=PC/SC Smart Card Daemon  +systemdsystemunit_DATA = \
106  +Requires=pcscd.socket  + pcscd.service \
107  +After=syslog.target  + pcscd.socket
108  +  +endif
109  +[Service]  diff --git a/PCSC/etc/pcscd.service.in b/PCSC/etc/pcscd.service.in
110  +ExecStart=@sbindir_exp@/pcscd -f  new file mode 100644
111  +ExecReload=@sbindir_exp@/pcscd -H  index 0000000..4800d32
112  +StandardOutput=syslog  --- /dev/null
113  +  +++ b/PCSC/etc/pcscd.service.in
114  +[Install]  @@ -0,0 +1,13 @@
115  +WantedBy=multi-user.target  +[Unit]
116  +Also=pcscd.socket  +Description=PC/SC Smart Card Daemon
117  diff --git a/PCSC/etc/pcscd.socket.in b/PCSC/etc/pcscd.socket.in  +Requires=pcscd.socket
118  new file mode 100644  +After=syslog.target
119  index 0000000..6fc93da  +
120  --- /dev/null  +[Service]
121  +++ b/PCSC/etc/pcscd.socket.in  +ExecStart=@sbindir_exp@/pcscd -f
122  @@ -0,0 +1,8 @@  +ExecReload=@sbindir_exp@/pcscd -H
123  +[Unit]  +StandardOutput=syslog
124  +Description=PC/SC Smart Card Daemon Activation Socket  +
125  +  +[Install]
126  +[Socket]  +WantedBy=multi-user.target
127  +ListenStream=@ipcdir@/pcscd.comm  +Also=pcscd.socket
128  +  diff --git a/PCSC/etc/pcscd.socket.in b/PCSC/etc/pcscd.socket.in
129  +[Install]  new file mode 100644
130  +WantedBy=sockets.target  index 0000000..6fc93da
131    --- /dev/null
132    +++ b/PCSC/etc/pcscd.socket.in
133    @@ -0,0 +1,8 @@
134    +[Unit]
135    +Description=PC/SC Smart Card Daemon Activation Socket
136    +
137    +[Socket]
138    +ListenStream=@ipcdir@/pcscd.comm
139    +
140    +[Install]
141    +WantedBy=sockets.target
142  --  --
143  1.7.5.4  1.7.5.4
144    

Legend:
Removed from v.1573  
changed lines
  Added in v.1574