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