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