]>
Commit | Line | Data |
---|---|---|
de6d008b | 1 | Summary: OpenCT library - library for accessing smart card terminals |
0e35976a | 2 | Summary(pl.UTF-8): OpenCT - biblioteka dostępu do terminali kart procesorowych |
de6d008b | 3 | Name: openct |
cc58fdf7 | 4 | Version: 0.6.15 |
b894ce50 | 5 | Release: 4 |
ee3a5999 | 6 | License: LGPL v2.1+ |
0feefd78 | 7 | Group: Applications/System |
666ad101 | 8 | Source0: http://www.opensc-project.org/files/openct/%{name}-%{version}.tar.gz |
cc58fdf7 | 9 | # Source0-md5: 70205beac03974e266fc259b6c9feaa8 |
7b653b6d | 10 | Source1: %{name}.init |
b87c35c9 | 11 | Source2: %{name}-initramfs-hook |
666ad101 | 12 | URL: http://www.opensc-project.org/openct/ |
6e2a3bd6 | 13 | BuildRequires: autoconf >= 2.52 |
de6d008b | 14 | BuildRequires: automake |
8d7a69f6 | 15 | BuildRequires: libltdl-devel |
d288c1c9 | 16 | BuildRequires: libtool |
de6d008b AF |
17 | BuildRequires: libusb-devel |
18 | BuildRequires: pcsc-lite-devel | |
4556ff6a | 19 | BuildRequires: pkgconfig >= 1:0.9.0 |
7b653b6d | 20 | Requires(post,preun): /sbin/chkconfig |
2af6f3d1 | 21 | Requires(pre): /bin/id |
14733865 | 22 | Requires(pre): /usr/sbin/useradd |
2af6f3d1 | 23 | Requires(postun): /usr/sbin/userdel |
cda08749 | 24 | Requires: %{name}-libs = %{version}-%{release} |
de6d008b AF |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
1dcb98ea JB |
28 | OpenCT is a library for accessing smart card terminals. It provides a |
29 | rich set of functions for driver writers, protocol drivers for T=0 and | |
30 | T=1, serial and USB functionality, including USB hotplugging. | |
31 | ||
3c69b6aa JR |
32 | %description -l pl.UTF-8 |
33 | OpenCT to biblioteka służąca do dostępu do terminali kart | |
34 | procesorowych (smart card). Dostarcza bogaty zbiór funkcji dla | |
35 | piszących sterowniki, sterowniki protokołów dla T=0 i T=1, | |
36 | funkcjonalność dla portów szeregowych i USB, włącznie z podłączaniem | |
37 | urządzeń USB w locie (hotplug). | |
de6d008b | 38 | |
49d5d884 AM |
39 | %package -n hal-openct |
40 | Summary: hal integration for OpenCT | |
41 | Summary(pl.UTF-8): Integracja OpenCT z hal | |
42 | Group: Applications/System | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | Requires: udev-core | |
45 | ||
46 | %description -n hal-openct | |
47 | hal integration for OpenCT. | |
48 | ||
49 | %description -n hal-openct -l pl.UTF-8 | |
50 | Integracja OpenCT z hal. | |
51 | ||
0feefd78 JB |
52 | %package -n udev-openct |
53 | Summary: udev integration for OpenCT | |
54 | Summary(pl.UTF-8): Integracja OpenCT z udevem | |
55 | Group: Applications/System | |
56 | Requires: %{name} = %{version}-%{release} | |
57 | Requires: udev-core | |
58 | ||
59 | %description -n udev-openct | |
60 | udev integration for OpenCT. | |
61 | ||
62 | %description -n udev-openct -l pl.UTF-8 | |
63 | Integracja OpenCT z udevem. | |
64 | ||
1d9b4a6a JB |
65 | %package -n pcsc-driver-openct |
66 | Summary: OpenCT driver for PC/SC | |
0e35976a | 67 | Summary(pl.UTF-8): Sterownik OpenCT dla PC/SC |
1d9b4a6a JB |
68 | Group: Libraries |
69 | Requires: %{name} = %{version}-%{release} | |
70 | Requires: pcsc-lite | |
71 | ||
72 | %description -n pcsc-driver-openct | |
73 | OpenCT driver for PC/SC. | |
74 | ||
3c69b6aa | 75 | %description -n pcsc-driver-openct -l pl.UTF-8 |
1d9b4a6a JB |
76 | Sterownik OpenCT dla PC/SC. |
77 | ||
cda08749 | 78 | %package libs |
79 | Summary: OpenCT library | |
0e35976a | 80 | Summary(pl.UTF-8): Biblioteka OpenCT |
0feefd78 | 81 | License: BSD (libopenct), LGPL v2.1+ (the rest) |
cda08749 | 82 | Group: Libraries |
841493e1 | 83 | Conflicts: openct < 0.6.2-3 |
cda08749 | 84 | |
85 | %description libs | |
86 | OpenCT library. | |
87 | ||
3c69b6aa | 88 | %description libs -l pl.UTF-8 |
cda08749 | 89 | Biblioteka OpenCT. |
90 | ||
de6d008b AF |
91 | %package devel |
92 | Summary: OpenCT development files | |
0e35976a | 93 | Summary(pl.UTF-8): Pliki dla programistów używających OpenCT |
df918352 | 94 | License: BSD |
1dcb98ea | 95 | Group: Development/Libraries |
cda08749 | 96 | Requires: %{name}-libs = %{version}-%{release} |
de6d008b AF |
97 | |
98 | %description devel | |
99 | OpenSC development files. | |
100 | ||
3c69b6aa JR |
101 | %description devel -l pl.UTF-8 |
102 | Pliki dla programistów używających OpenCT. | |
de6d008b AF |
103 | |
104 | %package static | |
105 | Summary: Static OpenCT libraries | |
0e35976a | 106 | Summary(pl.UTF-8): Bibloteki statyczne OpenCT |
df918352 | 107 | License: BSD |
1dcb98ea | 108 | Group: Development/Libraries |
a9278f67 | 109 | Requires: %{name}-devel = %{version}-%{release} |
de6d008b AF |
110 | |
111 | %description static | |
112 | Static OpenCT libraries. | |
113 | ||
3c69b6aa | 114 | %description static -l pl.UTF-8 |
de6d008b AF |
115 | Statyczne biblioteki OpenCT. |
116 | ||
e5c9e158 JR |
117 | %package initramfs |
118 | Summary: OpenCT support scripts for initramfs-tools | |
119 | Summary(pl.UTF-8): Skrypty dla initramfs-tools ze wsparciem dla OpenCT | |
120 | Group: Base | |
121 | Requires: %{name} = %{version}-%{release} | |
122 | Requires: initramfs-tools | |
123 | ||
124 | %description initramfs | |
125 | OpenCT support scripts for initramfs-tools. | |
126 | ||
127 | %description initramfs -l pl.UTF-8 | |
128 | Skrypty dla initramfs-tools ze wsparciem dla OpenCT. | |
129 | ||
de6d008b AF |
130 | %prep |
131 | %setup -q | |
132 | ||
133 | %build | |
c4c47e98 | 134 | touch config.rpath |
d288c1c9 | 135 | %{__libtoolize} |
cc58fdf7 | 136 | %{__aclocal} -I m4 |
d288c1c9 | 137 | %{__autoconf} |
138 | %{__autoheader} | |
139 | %{__automake} | |
1d9b4a6a | 140 | %configure \ |
0feefd78 | 141 | --disable-rpath \ |
cc58fdf7 | 142 | --enable-api-doc \ |
0feefd78 | 143 | --enable-non-privileged \ |
cc58fdf7 | 144 | --enable-pcsc \ |
cc58fdf7 AM |
145 | --enable-sunray \ |
146 | --enable-sunrayclient \ | |
0feefd78 | 147 | --enable-usb \ |
cc58fdf7 | 148 | --with-apidocdir \ |
0feefd78 JB |
149 | --with-bundle=%{_libdir}/pcsc/drivers \ |
150 | --with-ifddir \ | |
49d5d884 | 151 | --with-udev=/lib/udev |
de6d008b AF |
152 | %{__make} |
153 | ||
154 | %install | |
155 | rm -rf $RPM_BUILD_ROOT | |
e5c9e158 JR |
156 | install -d $RPM_BUILD_ROOT{/var/run/openct,/etc/{rc.d/init.d,udev/rules.d},/usr/share/hal/fdi/information/10freedesktop} \ |
157 | $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks | |
de6d008b AF |
158 | |
159 | %{__make} install \ | |
160 | DESTDIR=$RPM_BUILD_ROOT | |
161 | ||
1dcb98ea | 162 | install etc/openct.conf $RPM_BUILD_ROOT%{_sysconfdir} |
49d5d884 AM |
163 | install etc/openct.fdi $RPM_BUILD_ROOT%{_datadir}/hal/fdi/information/10freedesktop/10-usb-openct.fdi |
164 | install etc/openct.hald $RPM_BUILD_ROOT%{_bindir}/hald-addon-openct | |
165 | install etc/openct.udev $RPM_BUILD_ROOT/etc/udev/rules.d/50-openct.rules | |
166 | ||
7b653b6d | 167 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/openct |
1dcb98ea | 168 | |
e5c9e158 JR |
169 | install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/openct |
170 | ||
6bd39254 | 171 | rm -f $RPM_BUILD_ROOT%{_libdir}/openct-*.{a,la} |
de6d008b AF |
172 | |
173 | %clean | |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
14733865 | 176 | %pre |
b9056c74 | 177 | %useradd -u 208 -d %{_datadir}/empty -c "openctd User" -g usb openctd |
14733865 | 178 | |
bf2e5bff | 179 | %post |
7b653b6d | 180 | /sbin/chkconfig --add openct |
181 | if [ -f /var/lock/subsys/openct ]; then | |
182 | /etc/rc.d/init.d/openct restart >&2 | |
183 | else | |
184 | echo "Run \"/etc/rc.d/init.d/openct start\" to start openct." | |
bf2e5bff | 185 | fi |
186 | ||
7b653b6d | 187 | %preun |
188 | if [ "$1" = "0" ]; then | |
189 | if [ -f /var/lock/subsys/openct ]; then | |
190 | /etc/rc.d/init.d/openct stop >&2 | |
191 | fi | |
192 | /sbin/chkconfig --del openct | |
193 | fi | |
cda08749 | 194 | |
14733865 AM |
195 | %postun |
196 | if [ "$1" = "0" ]; then | |
197 | %userremove openctd | |
198 | fi | |
199 | ||
cda08749 | 200 | %post libs -p /sbin/ldconfig |
201 | %postun libs -p /sbin/ldconfig | |
de6d008b AF |
202 | |
203 | %files | |
204 | %defattr(644,root,root,755) | |
cc58fdf7 | 205 | %doc NEWS TODO doc/nonpersistent/ChangeLog doc/nonpersistent/wiki.out/*.{html,css} |
de6d008b | 206 | %attr(755,root,root) %{_bindir}/openct-tool |
de6d008b | 207 | %attr(755,root,root) %{_sbindir}/ifdhandler |
1d9b4a6a | 208 | %attr(755,root,root) %{_sbindir}/ifdproxy |
de6d008b | 209 | %attr(755,root,root) %{_sbindir}/openct-control |
1d9b4a6a | 210 | %dir /var/run/openct |
841493e1 | 211 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openct.conf |
7b653b6d | 212 | %attr(754,root,root) /etc/rc.d/init.d/openct |
2504adee | 213 | %{_mandir}/man1/openct-tool.1* |
de6d008b | 214 | |
0feefd78 JB |
215 | %files -n udev-openct |
216 | %defattr(644,root,root,755) | |
49d5d884 AM |
217 | %attr(755,root,root) /lib/udev/openct_pcmcia |
218 | %attr(755,root,root) /lib/udev/openct_serial | |
219 | %attr(755,root,root) /lib/udev/openct_usb | |
220 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/50-openct.rules | |
221 | ||
222 | %files -n hal-openct | |
223 | %defattr(644,root,root,755) | |
224 | %attr(755,root,root) %{_bindir}/hald-addon-openct | |
225 | %{_datadir}/hal/fdi/information/10freedesktop/10-usb-openct.fdi | |
0feefd78 | 226 | |
1d9b4a6a JB |
227 | %files -n pcsc-driver-openct |
228 | %defattr(644,root,root,755) | |
229 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle | |
230 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents | |
231 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Linux | |
841493e1 | 232 | %attr(755,root,root) %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so |
1d9b4a6a JB |
233 | %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Info.plist |
234 | %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/PkgInfo | |
235 | ||
bf2477bb | 236 | %files libs |
237 | %defattr(644,root,root,755) | |
2504adee | 238 | %attr(755,root,root) %{_libdir}/libopenct.so.*.*.* |
0feefd78 | 239 | %attr(755,root,root) %ghost %{_libdir}/libopenct.so.1 |
bf2477bb | 240 | %attr(755,root,root) %{_libdir}/libopenctapi.so |
241 | %attr(755,root,root) %{_libdir}/openct-ifd.so | |
242 | ||
de6d008b AF |
243 | %files devel |
244 | %defattr(644,root,root,755) | |
cc58fdf7 | 245 | %doc doc/api.out/html/* |
1cf4ab81 | 246 | %attr(755,root,root) %{_libdir}/libopenct.so |
2504adee JB |
247 | %{_libdir}/libopenct.la |
248 | %{_libdir}/libopenctapi.la | |
de6d008b | 249 | %{_includedir}/openct |
2504adee | 250 | %{_pkgconfigdir}/libopenct.pc |
de6d008b AF |
251 | |
252 | %files static | |
253 | %defattr(644,root,root,755) | |
2504adee JB |
254 | %{_libdir}/libopenct.a |
255 | %{_libdir}/libopenctapi.a | |
e5c9e158 JR |
256 | |
257 | %files initramfs | |
258 | %defattr(644,root,root,755) | |
259 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/openct |