1 # TODO: use browser-plugins framework for signer plugin
2 Summary: OpenSC library - for accessing SmartCard devices using PC/SC Lite
3 Summary(pl): Biblioteka OpenSC - do korzystania z kart procesorowych przy u¿yciu PC/SC Lite
10 Source0: http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz
11 # Source0-md5: be9cced6c703253baf78ccd9970679fa
12 Patch0: %{name}-explorer-debug.patch
13 Patch1: %{name}-libassuan.patch
14 URL: http://www.opensc-project.org/
15 BuildRequires: autoconf >= 2.52
16 BuildRequires: automake
17 BuildRequires: libassuan-devel >= 1:0.6.0
18 BuildRequires: libltdl-devel
19 BuildRequires: libtool >= 1:1.4.2-9
20 BuildRequires: openldap-devel
21 BuildRequires: openssl-devel >= 0.9.7d
22 BuildRequires: openct-devel
23 BuildRequires: pcsc-lite-devel
24 BuildRequires: pkgconfig >= 1:0.9.0
25 BuildRequires: readline-devel
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 # datadir is used for config files and (editable) profiles
30 %define _sysconfdir /etc/opensc
31 %define mozplugindir /usr/%{_lib}/mozilla/plugins
34 libopensc is a library for accessing SmartCard devices using PC/SC
35 Lite middleware package. It is also the core library of the OpenSC
36 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
37 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
38 using private keys on the SmartCard is at the moment possible only
39 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
40 IDentity) card manufactured by Setec.
43 libopensc to biblioteka do korzystania z kart procesorowych przy
44 u¿yciu pakietu warstwy po¶redniej PC/SC Lite. Jest to tak¿e podstawowa
45 biblioteka projektu OpenSC. Podstawowa funkcjonalno¶æ (np. SELECT
46 FILE, READ BINARY) powinna dzia³aæ tak¿e z dowoln± kart± procesorow±
47 zgodn± z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy u¿yciu
48 prywatnych kluczy na karcie na razie jest mo¿liwe tylko przy u¿yciu
49 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
50 IDentity) produkowanych przez Setec.
53 Summary: OpenSC development files
54 Summary(pl): Pliki dla programistów u¿ywaj±cych OpenSC
55 Group: Development/Tools
56 Requires: %{name} = %{epoch}:%{version}-%{release}
57 Requires: libltdl-devel
58 Requires: openct-devel
59 Requires: openssl-devel
60 Requires: pcsc-lite-devel
63 OpenSC development files.
65 %description devel -l pl
66 Pliki dla programistów u¿ywaj±cych OpenSC.
69 Summary: Static OpenSC libraries
70 Summary(pl): Bibloteki statyczne OpenSC
71 Group: Development/Tools
72 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
75 Static OpenSC libraries.
77 %description static -l pl
78 Statyczne biblioteki OpenSC.
80 %package -n mozilla-plugin-opensc
81 Summary: OpenSC Signer plugin for Mozilla
82 Summary(pl): Wtyczka OpenSC Signer dla Mozilli
83 Group: X11/Applications
84 Requires: %{name} = %{epoch}:%{version}-%{release}
85 Requires: pinentry-gtk
87 %description -n mozilla-plugin-opensc
88 OpenSC Signer plugin for Mozilla.
90 %description -n mozilla-plugin-opensc -l pl
91 Wtyczka OpenSC Signer dla Mozilli.
100 %{__aclocal} -I aclocal
105 --with-pin-entry=/usr/bin/pinentry-gtk \
106 --with-plugin-dir="%{mozplugindir}"
111 rm -rf $RPM_BUILD_ROOT
112 install -d $RPM_BUILD_ROOT%{mozplugindir}
115 DESTDIR=$RPM_BUILD_ROOT
117 # just install instead of symlinking
118 rm -f $RPM_BUILD_ROOT%{mozplugindir}/opensc-signer.so
119 mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{mozplugindir}
122 install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
124 # useless (dlopened by *.so)
125 rm -f $RPM_BUILD_ROOT%{_libdir}/{opensc,pkcs11}-*.{a,la} \
126 $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la}
129 rm -rf $RPM_BUILD_ROOT
131 %post -p /sbin/ldconfig
132 %postun -p /sbin/ldconfig
135 %defattr(644,root,root,755)
136 %doc NEWS README doc/ChangeLog doc/{*.{html,css},html/tools.html}
137 %attr(755,root,root) %{_bindir}/cardos-info
138 %attr(755,root,root) %{_bindir}/cryptoflex-tool
139 %attr(755,root,root) %{_bindir}/eidenv
140 %attr(755,root,root) %{_bindir}/netkey-tool
141 %attr(755,root,root) %{_bindir}/opensc-explorer
142 %attr(755,root,root) %{_bindir}/opensc-tool
143 %attr(755,root,root) %{_bindir}/piv-tool
144 %attr(755,root,root) %{_bindir}/pkcs11-tool
145 %attr(755,root,root) %{_bindir}/pkcs15-*
146 %attr(755,root,root) %{_libdir}/lib*.so.*.*
147 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
148 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
149 %dir %{_datadir}/opensc
150 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
151 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
152 %{_mandir}/man1/cardos-info.1*
153 %{_mandir}/man1/cryptoflex-tool.1*
154 %{_mandir}/man1/netkey-tool.1*
155 %{_mandir}/man1/opensc-explorer.1*
156 %{_mandir}/man1/opensc-tool.1*
157 %{_mandir}/man1/pkcs11-tool.1*
158 %{_mandir}/man1/pkcs15-*.1*
162 %defattr(644,root,root,755)
163 %doc doc/html/api.html
164 %attr(755,root,root) %{_bindir}/opensc-config
165 %attr(755,root,root) %{_libdir}/libopensc.so
166 %attr(755,root,root) %{_libdir}/libpkcs15init.so
167 %attr(755,root,root) %{_libdir}/libscconf.so
168 %{_libdir}/libopensc.la
169 %{_libdir}/libpkcs15init.la
170 %{_libdir}/libscconf.la
171 %{_includedir}/opensc
172 %{_pkgconfigdir}/*.pc
173 %{_mandir}/man1/opensc-config.1*
177 %defattr(644,root,root,755)
178 %{_libdir}/libopensc.a
179 %{_libdir}/libpkcs15init.a
180 %{_libdir}/libscconf.a
182 %files -n mozilla-plugin-opensc
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{mozplugindir}/opensc-signer.so