]>
Commit | Line | Data |
---|---|---|
1 | Summary: OpenSC library - for accessing SmartCard devices using PC/SC Lite | |
2 | Summary(pl.UTF-8): Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite | |
3 | Name: opensc | |
4 | Version: 0.11.9 | |
5 | Release: 1 | |
6 | Epoch: 0 | |
7 | License: LGPL v2.1+ | |
8 | Group: Applications | |
9 | Source0: http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz | |
10 | # Source0-md5: ff9b5ee4f00693873d54d83398e20847 | |
11 | Source1: %{name}-initramfs-hook | |
12 | Source2: %{name}-initramfs-local-bottom | |
13 | Source3: %{name}-initramfs-local-top | |
14 | Source4: %{name}-initramfs-README | |
15 | URL: http://www.opensc-project.org/ | |
16 | BuildRequires: autoconf >= 2.60 | |
17 | BuildRequires: automake >= 1:1.10 | |
18 | BuildRequires: libassuan-devel >= 1:0.6.0 | |
19 | BuildRequires: libltdl-devel | |
20 | BuildRequires: libtool >= 1:1.4.2-9 | |
21 | BuildRequires: openct-devel | |
22 | BuildRequires: openldap-devel >= 2.4.6 | |
23 | BuildRequires: openssl-devel >= 0.9.7d | |
24 | BuildRequires: pcsc-lite-devel | |
25 | BuildRequires: pkgconfig >= 1:0.9.0 | |
26 | BuildRequires: readline-devel | |
27 | BuildRequires: rpmbuild(macros) >= 1.364 | |
28 | BuildRequires: zlib-devel | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | # datadir is used for config files and (editable) profiles | |
32 | %define _datadir /etc | |
33 | %define _sysconfdir /etc/opensc | |
34 | ||
35 | %description | |
36 | libopensc is a library for accessing SmartCard devices using PC/SC | |
37 | Lite middleware package. It is also the core library of the OpenSC | |
38 | project. Basic functionality (e.g. SELECT FILE, READ BINARY) should | |
39 | work on any ISO 7816-4 compatible SmartCard. Encryption and decryption | |
40 | using private keys on the SmartCard is at the moment possible only | |
41 | with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic | |
42 | IDentity) card manufactured by Setec. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | libopensc to biblioteka do korzystania z kart procesorowych przy | |
46 | użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa | |
47 | biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT | |
48 | FILE, READ BINARY) powinna działać także z dowolną kartą procesorową | |
49 | zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu | |
50 | prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu | |
51 | kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic | |
52 | IDentity) produkowanych przez Setec. | |
53 | ||
54 | %package devel | |
55 | Summary: OpenSC development files | |
56 | Summary(pl.UTF-8): Pliki dla programistów używających OpenSC | |
57 | Group: Development/Tools | |
58 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
59 | Requires: libltdl-devel | |
60 | Requires: openct-devel | |
61 | Requires: openssl-devel | |
62 | Requires: pcsc-lite-devel | |
63 | ||
64 | %description devel | |
65 | OpenSC development files. | |
66 | ||
67 | %description devel -l pl.UTF-8 | |
68 | Pliki dla programistów używających OpenSC. | |
69 | ||
70 | %package static | |
71 | Summary: Static OpenSC libraries | |
72 | Summary(pl.UTF-8): Bibloteki statyczne OpenSC | |
73 | Group: Development/Tools | |
74 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
75 | ||
76 | %description static | |
77 | Static OpenSC libraries. | |
78 | ||
79 | %description static -l pl.UTF-8 | |
80 | Statyczne biblioteki OpenSC. | |
81 | ||
82 | %package -n browser-plugin-opensc | |
83 | Summary: OpenSC Signer plugin for Mozilla | |
84 | Summary(pl.UTF-8): Wtyczka OpenSC Signer dla Mozilli | |
85 | Group: X11/Applications | |
86 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
87 | Requires: browser-plugins >= 2.0 | |
88 | Requires: browser-plugins(%{_target_base_arch}) | |
89 | Requires: pinentry >= 0.7.5-2 | |
90 | Provides: mozilla-plugin-opensc | |
91 | Obsoletes: mozilla-plugin-opensc | |
92 | ||
93 | %description -n browser-plugin-opensc | |
94 | OpenSC Signer browser plugin. | |
95 | ||
96 | Supported browsers: %{browsers}. | |
97 | ||
98 | %description -n browser-plugin-opensc -l pl.UTF-8 | |
99 | Wtyczka OpenSC Signer dla przeglądarek. | |
100 | ||
101 | Obsługiwane przeglądarki: %{browsers}. | |
102 | ||
103 | %package initramfs | |
104 | Summary: OpenSC support scripts for initramfs-tools | |
105 | Summary(pl.UTF-8): Skrypty dla initramfs-tools ze wsparciem dla OpenSC | |
106 | Group: Base | |
107 | Requires: %{name} = %{version}-%{release} | |
108 | Requires: initramfs-tools | |
109 | ||
110 | %description initramfs | |
111 | OpenSC support scripts for initramfs-tools. | |
112 | ||
113 | %description initramfs -l pl.UTF-8 | |
114 | Skrypty dla initramfs-tools ze wsparciem dla OpenSC. | |
115 | ||
116 | %prep | |
117 | %setup -q | |
118 | ||
119 | install %{SOURCE4} README.initramfs | |
120 | ||
121 | %build | |
122 | %{__libtoolize} | |
123 | %{__aclocal} -I m4 | |
124 | %{__autoconf} | |
125 | %{__autoheader} | |
126 | %{__automake} | |
127 | %configure \ | |
128 | --enable-openct \ | |
129 | --enable-nsplugin \ | |
130 | --enable-pcsc \ | |
131 | --with-pcsc-provider=%{_libdir}/libpcsclite.so.1 \ | |
132 | --with-pinentry=/usr/bin/pinentry \ | |
133 | --with-plugindir=%{_browserpluginsdir} | |
134 | ||
135 | %{__make} | |
136 | ||
137 | %install | |
138 | rm -rf $RPM_BUILD_ROOT | |
139 | install -d $RPM_BUILD_ROOT%{_browserpluginsdir} \ | |
140 | $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-{bottom,top}} | |
141 | ||
142 | %{__make} install \ | |
143 | DESTDIR=$RPM_BUILD_ROOT | |
144 | ||
145 | # just install instead of symlinking | |
146 | %{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/opensc-signer.so | |
147 | mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{_browserpluginsdir} | |
148 | ||
149 | # default config | |
150 | install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir} | |
151 | ||
152 | install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/opensc | |
153 | install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-bottom/opensc | |
154 | install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/opensc | |
155 | ||
156 | # useless (dlopened by *.so) | |
157 | rm -f $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc,opensc,pkcs11}-*.{a,la} \ | |
158 | $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la} | |
159 | ||
160 | %clean | |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
163 | %post -p /sbin/ldconfig | |
164 | %postun -p /sbin/ldconfig | |
165 | ||
166 | %post -n browser-plugin-opensc | |
167 | %update_browser_plugins | |
168 | ||
169 | %postun -n browser-plugin-opensc | |
170 | if [ "$1" = "0" ]; then | |
171 | %update_browser_plugins | |
172 | fi | |
173 | ||
174 | %files | |
175 | %defattr(644,root,root,755) | |
176 | %doc NEWS README doc/nonpersistent/{ChangeLog,wiki.out} doc/html.out/tools.html | |
177 | %attr(755,root,root) %{_bindir}/cardos-info | |
178 | %attr(755,root,root) %{_bindir}/cardos-tool | |
179 | %attr(755,root,root) %{_bindir}/cryptoflex-tool | |
180 | %attr(755,root,root) %{_bindir}/eidenv | |
181 | %attr(755,root,root) %{_bindir}/netkey-tool | |
182 | %attr(755,root,root) %{_bindir}/opensc-explorer | |
183 | %attr(755,root,root) %{_bindir}/opensc-tool | |
184 | %attr(755,root,root) %{_bindir}/piv-tool | |
185 | %attr(755,root,root) %{_bindir}/pkcs11-tool | |
186 | %attr(755,root,root) %{_bindir}/pkcs15-* | |
187 | %attr(755,root,root) %{_bindir}/rutoken-tool | |
188 | %attr(755,root,root) %{_libdir}/libopensc.so.*.*.* | |
189 | %attr(755,root,root) %ghost %{_libdir}/libopensc.so.2 | |
190 | %attr(755,root,root) %{_libdir}/libpkcs15init.so.*.*.* | |
191 | %attr(755,root,root) %ghost %{_libdir}/libpkcs15init.so.2 | |
192 | %attr(755,root,root) %{_libdir}/libscconf.so.*.*.* | |
193 | %attr(755,root,root) %ghost %{_libdir}/libscconf.so.2 | |
194 | # PKCS11 modules | |
195 | %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so | |
196 | %attr(755,root,root) %{_libdir}/opensc-pkcs11.so | |
197 | %attr(755,root,root) %{_libdir}/pkcs11-spy.so | |
198 | %dir %{_libdir}/pkcs11 | |
199 | %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so | |
200 | %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so | |
201 | %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so | |
202 | %dir %{_datadir}/opensc | |
203 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf | |
204 | %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile | |
205 | %{_mandir}/man1/cardos-tool.1* | |
206 | %{_mandir}/man1/cryptoflex-tool.1* | |
207 | %{_mandir}/man1/netkey-tool.1* | |
208 | %{_mandir}/man1/opensc-explorer.1* | |
209 | %{_mandir}/man1/opensc-tool.1* | |
210 | %{_mandir}/man1/pkcs11-tool.1* | |
211 | %{_mandir}/man1/pkcs15-*.1* | |
212 | %{_mandir}/man5/pkcs15-profile.5* | |
213 | ||
214 | %files devel | |
215 | %defattr(644,root,root,755) | |
216 | %doc doc/html.out/api.html | |
217 | %attr(755,root,root) %{_bindir}/opensc-config | |
218 | %attr(755,root,root) %{_libdir}/libopensc.so | |
219 | %attr(755,root,root) %{_libdir}/libpkcs15init.so | |
220 | %attr(755,root,root) %{_libdir}/libscconf.so | |
221 | %{_libdir}/libopensc.la | |
222 | %{_libdir}/libpkcs15init.la | |
223 | %{_libdir}/libscconf.la | |
224 | %{_includedir}/opensc | |
225 | %{_pkgconfigdir}/libopensc.pc | |
226 | %{_pkgconfigdir}/libpkcs15init.pc | |
227 | %{_pkgconfigdir}/libscconf.pc | |
228 | %{_mandir}/man1/opensc-config.1* | |
229 | %{_mandir}/man3/sc_*.3* | |
230 | ||
231 | %files static | |
232 | %defattr(644,root,root,755) | |
233 | %{_libdir}/libopensc.a | |
234 | %{_libdir}/libpkcs15init.a | |
235 | %{_libdir}/libscconf.a | |
236 | ||
237 | %files -n browser-plugin-opensc | |
238 | %defattr(644,root,root,755) | |
239 | %attr(755,root,root) %{_browserpluginsdir}/opensc-signer.so | |
240 | ||
241 | %files initramfs | |
242 | %defattr(644,root,root,755) | |
243 | %doc README.initramfs | |
244 | %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/opensc | |
245 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/opensc | |
246 | %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-bottom/opensc |