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