]>
Commit | Line | Data |
---|---|---|
1 | Summary: OpenCT library - library for accessing smart card terminals | |
2 | Summary(pl.UTF-8): OpenCT - biblioteka dostępu do terminali kart procesorowych | |
3 | Name: openct | |
4 | Version: 0.6.15 | |
5 | Release: 3 | |
6 | License: LGPL v2.1+ | |
7 | Group: Applications/System | |
8 | Source0: http://www.opensc-project.org/files/openct/%{name}-%{version}.tar.gz | |
9 | # Source0-md5: 70205beac03974e266fc259b6c9feaa8 | |
10 | Source1: %{name}.init | |
11 | Source2: %{name}-initramfs-hook | |
12 | URL: http://www.opensc-project.org/openct/ | |
13 | BuildRequires: autoconf >= 2.52 | |
14 | BuildRequires: automake | |
15 | BuildRequires: libltdl-devel | |
16 | BuildRequires: libtool | |
17 | BuildRequires: libusb-devel | |
18 | BuildRequires: pcsc-lite-devel | |
19 | BuildRequires: pkgconfig >= 1:0.9.0 | |
20 | Requires(post,preun): /sbin/chkconfig | |
21 | Requires(pre): /bin/id | |
22 | Requires(pre): /usr/sbin/useradd | |
23 | Requires(postun): /usr/sbin/userdel | |
24 | Requires: %{name}-libs = %{version}-%{release} | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
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 | ||
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). | |
38 | ||
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 | ||
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 | ||
65 | %package -n pcsc-driver-openct | |
66 | Summary: OpenCT driver for PC/SC | |
67 | Summary(pl.UTF-8): Sterownik OpenCT dla PC/SC | |
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 | ||
75 | %description -n pcsc-driver-openct -l pl.UTF-8 | |
76 | Sterownik OpenCT dla PC/SC. | |
77 | ||
78 | %package libs | |
79 | Summary: OpenCT library | |
80 | Summary(pl.UTF-8): Biblioteka OpenCT | |
81 | License: BSD (libopenct), LGPL v2.1+ (the rest) | |
82 | Group: Libraries | |
83 | Conflicts: openct < 0.6.2-3 | |
84 | ||
85 | %description libs | |
86 | OpenCT library. | |
87 | ||
88 | %description libs -l pl.UTF-8 | |
89 | Biblioteka OpenCT. | |
90 | ||
91 | %package devel | |
92 | Summary: OpenCT development files | |
93 | Summary(pl.UTF-8): Pliki dla programistów używających OpenCT | |
94 | License: BSD | |
95 | Group: Development/Libraries | |
96 | Requires: %{name}-libs = %{version}-%{release} | |
97 | ||
98 | %description devel | |
99 | OpenSC development files. | |
100 | ||
101 | %description devel -l pl.UTF-8 | |
102 | Pliki dla programistów używających OpenCT. | |
103 | ||
104 | %package static | |
105 | Summary: Static OpenCT libraries | |
106 | Summary(pl.UTF-8): Bibloteki statyczne OpenCT | |
107 | License: BSD | |
108 | Group: Development/Libraries | |
109 | Requires: %{name}-devel = %{version}-%{release} | |
110 | ||
111 | %description static | |
112 | Static OpenCT libraries. | |
113 | ||
114 | %description static -l pl.UTF-8 | |
115 | Statyczne biblioteki OpenCT. | |
116 | ||
117 | %prep | |
118 | %setup -q | |
119 | ||
120 | %build | |
121 | touch config.rpath | |
122 | %{__libtoolize} | |
123 | %{__aclocal} -I m4 | |
124 | %{__autoconf} | |
125 | %{__autoheader} | |
126 | %{__automake} | |
127 | %configure \ | |
128 | --disable-rpath \ | |
129 | --enable-api-doc \ | |
130 | --enable-non-privileged \ | |
131 | --enable-pcsc \ | |
132 | --enable-sunray \ | |
133 | --enable-sunrayclient \ | |
134 | --enable-usb \ | |
135 | --with-apidocdir \ | |
136 | --with-bundle=%{_libdir}/pcsc/drivers \ | |
137 | --with-ifddir \ | |
138 | --with-udev=/lib/udev | |
139 | %{__make} | |
140 | ||
141 | %install | |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | install -d $RPM_BUILD_ROOT{/var/run/openct,/etc/{rc.d/init.d,udev/rules.d},/usr/share/hal/fdi/information/10freedesktop} | |
144 | ||
145 | %{__make} install \ | |
146 | DESTDIR=$RPM_BUILD_ROOT | |
147 | ||
148 | install etc/openct.conf $RPM_BUILD_ROOT%{_sysconfdir} | |
149 | install etc/openct.fdi $RPM_BUILD_ROOT%{_datadir}/hal/fdi/information/10freedesktop/10-usb-openct.fdi | |
150 | install etc/openct.hald $RPM_BUILD_ROOT%{_bindir}/hald-addon-openct | |
151 | install etc/openct.udev $RPM_BUILD_ROOT/etc/udev/rules.d/50-openct.rules | |
152 | ||
153 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/openct | |
154 | ||
155 | rm -f $RPM_BUILD_ROOT%{_libdir}/openct-*.{a,la} | |
156 | ||
157 | %clean | |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
160 | %pre | |
161 | %useradd -u 208 -d %{_datadir}/empty -c "openctd User" -g usb openctd | |
162 | ||
163 | %post | |
164 | /sbin/chkconfig --add openct | |
165 | if [ -f /var/lock/subsys/openct ]; then | |
166 | /etc/rc.d/init.d/openct restart >&2 | |
167 | else | |
168 | echo "Run \"/etc/rc.d/init.d/openct start\" to start openct." | |
169 | fi | |
170 | ||
171 | %preun | |
172 | if [ "$1" = "0" ]; then | |
173 | if [ -f /var/lock/subsys/openct ]; then | |
174 | /etc/rc.d/init.d/openct stop >&2 | |
175 | fi | |
176 | /sbin/chkconfig --del openct | |
177 | fi | |
178 | ||
179 | %postun | |
180 | if [ "$1" = "0" ]; then | |
181 | %userremove openctd | |
182 | fi | |
183 | ||
184 | %post libs -p /sbin/ldconfig | |
185 | %postun libs -p /sbin/ldconfig | |
186 | ||
187 | %files | |
188 | %defattr(644,root,root,755) | |
189 | %doc NEWS TODO doc/nonpersistent/ChangeLog doc/nonpersistent/wiki.out/*.{html,css} | |
190 | %attr(755,root,root) %{_bindir}/openct-tool | |
191 | %attr(755,root,root) %{_sbindir}/ifdhandler | |
192 | %attr(755,root,root) %{_sbindir}/ifdproxy | |
193 | %attr(755,root,root) %{_sbindir}/openct-control | |
194 | %dir /var/run/openct | |
195 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openct.conf | |
196 | %attr(754,root,root) /etc/rc.d/init.d/openct | |
197 | %{_mandir}/man1/openct-tool.1* | |
198 | ||
199 | %files -n udev-openct | |
200 | %defattr(644,root,root,755) | |
201 | %attr(755,root,root) /lib/udev/openct_pcmcia | |
202 | %attr(755,root,root) /lib/udev/openct_serial | |
203 | %attr(755,root,root) /lib/udev/openct_usb | |
204 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/50-openct.rules | |
205 | ||
206 | %files -n hal-openct | |
207 | %defattr(644,root,root,755) | |
208 | %attr(755,root,root) %{_bindir}/hald-addon-openct | |
209 | %{_datadir}/hal/fdi/information/10freedesktop/10-usb-openct.fdi | |
210 | ||
211 | %files -n pcsc-driver-openct | |
212 | %defattr(644,root,root,755) | |
213 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle | |
214 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents | |
215 | %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Linux | |
216 | %attr(755,root,root) %dir %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so | |
217 | %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/Info.plist | |
218 | %{_libdir}/pcsc/drivers/openct-ifd.bundle/Contents/PkgInfo | |
219 | ||
220 | %files libs | |
221 | %defattr(644,root,root,755) | |
222 | %attr(755,root,root) %{_libdir}/libopenct.so.*.*.* | |
223 | %attr(755,root,root) %ghost %{_libdir}/libopenct.so.1 | |
224 | %attr(755,root,root) %{_libdir}/libopenctapi.so | |
225 | %attr(755,root,root) %{_libdir}/openct-ifd.so | |
226 | ||
227 | %files devel | |
228 | %defattr(644,root,root,755) | |
229 | %doc doc/api.out/html/* | |
230 | %attr(755,root,root) %{_libdir}/libopenct.so | |
231 | %{_libdir}/libopenct.la | |
232 | %{_libdir}/libopenctapi.la | |
233 | %{_includedir}/openct | |
234 | %{_pkgconfigdir}/libopenct.pc | |
235 | ||
236 | %files static | |
237 | %defattr(644,root,root,755) | |
238 | %{_libdir}/libopenct.a | |
239 | %{_libdir}/libopenctapi.a |