]>
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.2 | |
5 | Release: 1 | |
6 | Epoch: 0 | |
7 | License: LGPL | |
8 | Group: Applications | |
9 | Source0: http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz | |
10 | # Source0-md5: ac646f187e3adb1db29b9c6ca028dcc6 | |
11 | Patch0: %{name}-explorer-debug.patch | |
12 | URL: http://www.opensc-project.org/ | |
13 | BuildRequires: autoconf >= 2.52 | |
14 | BuildRequires: automake | |
15 | BuildRequires: libassuan-devel >= 1:0.6.0 | |
16 | BuildRequires: libltdl-devel | |
17 | BuildRequires: libtool >= 1:1.4.2-9 | |
18 | BuildRequires: openct-devel | |
19 | BuildRequires: openldap-devel | |
20 | BuildRequires: openssl-devel >= 0.9.7d | |
21 | BuildRequires: pcsc-lite-devel | |
22 | BuildRequires: pkgconfig >= 1:0.9.0 | |
23 | BuildRequires: readline-devel | |
24 | BuildRequires: rpmbuild(macros) >= 1.236 | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | # datadir is used for config files and (editable) profiles | |
28 | %define _datadir /etc | |
29 | %define _sysconfdir /etc/opensc | |
30 | %define _plugindir %{_libdir}/browser-plugins | |
31 | ||
32 | # TODO: galeon and skipstone. | |
33 | # use macro, otherwise extra LF inserted along with the ifarch | |
34 | %define browsers mozilla, mozilla-firefox, konqueror, opera, seamonkey | |
35 | ||
36 | %description | |
37 | libopensc is a library for accessing SmartCard devices using PC/SC | |
38 | Lite middleware package. It is also the core library of the OpenSC | |
39 | project. Basic functionality (e.g. SELECT FILE, READ BINARY) should | |
40 | work on any ISO 7816-4 compatible SmartCard. Encryption and decryption | |
41 | using private keys on the SmartCard is at the moment possible only | |
42 | with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic | |
43 | IDentity) card manufactured by Setec. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | libopensc to biblioteka do korzystania z kart procesorowych przy | |
47 | użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa | |
48 | biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT | |
49 | FILE, READ BINARY) powinna działać także z dowolną kartą procesorową | |
50 | zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu | |
51 | prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu | |
52 | kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic | |
53 | IDentity) produkowanych przez Setec. | |
54 | ||
55 | %package devel | |
56 | Summary: OpenSC development files | |
57 | Summary(pl.UTF-8): Pliki dla programistów używających OpenSC | |
58 | Group: Development/Tools | |
59 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
60 | Requires: libltdl-devel | |
61 | Requires: openct-devel | |
62 | Requires: openssl-devel | |
63 | Requires: pcsc-lite-devel | |
64 | ||
65 | %description devel | |
66 | OpenSC development files. | |
67 | ||
68 | %description devel -l pl.UTF-8 | |
69 | Pliki dla programistów używających OpenSC. | |
70 | ||
71 | %package static | |
72 | Summary: Static OpenSC libraries | |
73 | Summary(pl.UTF-8): Bibloteki statyczne OpenSC | |
74 | Group: Development/Tools | |
75 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
76 | ||
77 | %description static | |
78 | Static OpenSC libraries. | |
79 | ||
80 | %description static -l pl.UTF-8 | |
81 | Statyczne biblioteki OpenSC. | |
82 | ||
83 | %package -n browser-plugin-opensc | |
84 | Summary: OpenSC Signer plugin for Mozilla | |
85 | Summary(pl.UTF-8): Wtyczka OpenSC Signer dla Mozilli | |
86 | Group: X11/Applications | |
87 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
88 | Requires: browser-plugins(%{_target_base_arch}) | |
89 | Requires: pinentry-gtk | |
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 | %prep | |
104 | %setup -q | |
105 | %patch0 -p1 | |
106 | ||
107 | %build | |
108 | touch config.rpath | |
109 | %{__libtoolize} | |
110 | %{__aclocal} -I aclocal | |
111 | %{__autoconf} | |
112 | %{__autoheader} | |
113 | %{__automake} | |
114 | %configure \ | |
115 | --with-pin-entry=/usr/bin/pinentry-gtk \ | |
116 | --with-plugin-dir="%{_plugindir}" | |
117 | ||
118 | %{__make} | |
119 | ||
120 | %install | |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | install -d $RPM_BUILD_ROOT%{_plugindir} | |
123 | ||
124 | %{__make} install \ | |
125 | DESTDIR=$RPM_BUILD_ROOT | |
126 | ||
127 | # just install instead of symlinking | |
128 | rm -f $RPM_BUILD_ROOT%{_plugindir}/opensc-signer.so | |
129 | mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{_plugindir} | |
130 | ||
131 | # default config | |
132 | install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir} | |
133 | ||
134 | # useless (dlopened by *.so) | |
135 | rm -f $RPM_BUILD_ROOT%{_libdir}/{opensc,pkcs11}-*.{a,la} \ | |
136 | $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la} | |
137 | ||
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %post -p /sbin/ldconfig | |
142 | %postun -p /sbin/ldconfig | |
143 | ||
144 | %triggerin -n browser-plugin-opensc -- mozilla-firefox | |
145 | %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins opensc-signer.so | |
146 | ||
147 | %triggerun -n browser-plugin-opensc -- mozilla-firefox | |
148 | %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins opensc-signer.so | |
149 | ||
150 | %triggerin -n browser-plugin-opensc -- mozilla | |
151 | %nsplugin_install -d %{_libdir}/mozilla/plugins opensc-signer.so | |
152 | ||
153 | %triggerun -n browser-plugin-opensc -- mozilla | |
154 | %nsplugin_uninstall -d %{_libdir}/mozilla/plugins opensc-signer.so | |
155 | ||
156 | %triggerin -n browser-plugin-opensc -- opera | |
157 | %nsplugin_install -d %{_libdir}/opera/plugins opensc-signer.so | |
158 | ||
159 | %triggerun -n browser-plugin-opensc -- opera | |
160 | %nsplugin_uninstall -d %{_libdir}/opera/plugins opensc-signer.so | |
161 | ||
162 | %triggerin -n browser-plugin-opensc -- konqueror | |
163 | %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror opensc-signer.so | |
164 | ||
165 | %triggerun -n browser-plugin-opensc -- konqueror | |
166 | %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror opensc-signer.so | |
167 | ||
168 | %triggerin -n browser-plugin-opensc -- seamonkey | |
169 | %nsplugin_install -d %{_libdir}/seamonkey/plugins opensc-signer.so | |
170 | ||
171 | %triggerun -n browser-plugin-opensc -- seamonkey | |
172 | %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins opensc-signer.so | |
173 | ||
174 | # as rpm removes the old obsoleted package files after the triggers | |
175 | # are ran, add another trigger to make the links there. | |
176 | %triggerpostun -n browser-plugin-opensc -- mozilla-plugin-opensc | |
177 | %nsplugin_install -f -d %{_libdir}/mozilla/plugins opensc-signer.so | |
178 | ||
179 | %files | |
180 | %defattr(644,root,root,755) | |
181 | %doc NEWS README doc/ChangeLog doc/{*.{html,css},html/tools.html} | |
182 | %attr(755,root,root) %{_bindir}/cardos-info | |
183 | %attr(755,root,root) %{_bindir}/cryptoflex-tool | |
184 | %attr(755,root,root) %{_bindir}/eidenv | |
185 | %attr(755,root,root) %{_bindir}/netkey-tool | |
186 | %attr(755,root,root) %{_bindir}/opensc-explorer | |
187 | %attr(755,root,root) %{_bindir}/opensc-tool | |
188 | %attr(755,root,root) %{_bindir}/piv-tool | |
189 | %attr(755,root,root) %{_bindir}/pkcs11-tool | |
190 | %attr(755,root,root) %{_bindir}/pkcs15-* | |
191 | %attr(755,root,root) %{_libdir}/lib*.so.*.* | |
192 | %attr(755,root,root) %{_libdir}/opensc-pkcs11.so | |
193 | %attr(755,root,root) %{_libdir}/pkcs11-spy.so | |
194 | %dir %{_datadir}/opensc | |
195 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf | |
196 | %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile | |
197 | %{_mandir}/man1/cardos-info.1* | |
198 | %{_mandir}/man1/cryptoflex-tool.1* | |
199 | %{_mandir}/man1/netkey-tool.1* | |
200 | %{_mandir}/man1/opensc-explorer.1* | |
201 | %{_mandir}/man1/opensc-tool.1* | |
202 | %{_mandir}/man1/pkcs11-tool.1* | |
203 | %{_mandir}/man1/pkcs15-*.1* | |
204 | %{_mandir}/man[57]/* | |
205 | ||
206 | %files devel | |
207 | %defattr(644,root,root,755) | |
208 | %doc doc/html/api.html | |
209 | %attr(755,root,root) %{_bindir}/opensc-config | |
210 | %attr(755,root,root) %{_libdir}/libopensc.so | |
211 | %attr(755,root,root) %{_libdir}/libpkcs15init.so | |
212 | %attr(755,root,root) %{_libdir}/libscconf.so | |
213 | %{_libdir}/libopensc.la | |
214 | %{_libdir}/libpkcs15init.la | |
215 | %{_libdir}/libscconf.la | |
216 | %{_includedir}/opensc | |
217 | %{_pkgconfigdir}/*.pc | |
218 | %{_mandir}/man1/opensc-config.1* | |
219 | %{_mandir}/man3/* | |
220 | ||
221 | %files static | |
222 | %defattr(644,root,root,755) | |
223 | %{_libdir}/libopensc.a | |
224 | %{_libdir}/libpkcs15init.a | |
225 | %{_libdir}/libscconf.a | |
226 | ||
227 | %files -n browser-plugin-opensc | |
228 | %defattr(644,root,root,755) | |
229 | %attr(755,root,root) %{_plugindir}/opensc-signer.so |