]>
Commit | Line | Data |
---|---|---|
455ac4e7 JB |
1 | # |
2 | # Conditional build: | |
53aad453 JB |
3 | %bcond_with openct # use OpenCT instead of PC/SC for reader access |
4 | # | |
1cefa9cb | 5 | Summary: OpenSC library - for accessing SmartCard devices using PC/SC Lite |
ae88f326 | 6 | Summary(pl.UTF-8): Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite |
896b833c | 7 | Name: opensc |
47359102 | 8 | Version: 0.15.0 |
4f1bc56e | 9 | Release: 1 |
e0fb86be | 10 | Epoch: 0 |
18e38179 | 11 | License: LGPL v2.1+ |
1cefa9cb | 12 | Group: Applications |
4f1bc56e | 13 | Source0: http://downloads.sourceforge.net/opensc/%{name}-%{version}.tar.gz |
47359102 | 14 | # Source0-md5: 01e6b803865f7b7574ee65a7b2d63c17 |
4f1bc56e | 15 | Patch0: %{name}-pc.patch |
47359102 | 16 | Patch1: %{name}-missing.patch |
4f1bc56e | 17 | URL: https://github.com/OpenSC/OpenSC/wiki |
c28ca417 JB |
18 | BuildRequires: autoconf >= 2.60 |
19 | BuildRequires: automake >= 1:1.10 | |
455ac4e7 | 20 | BuildRequires: docbook-style-xsl |
8d087e90 | 21 | BuildRequires: libltdl-devel |
1cefa9cb | 22 | BuildRequires: libtool >= 1:1.4.2-9 |
d740a4df | 23 | BuildRequires: libxslt-progs |
455ac4e7 | 24 | %{?with_openct:BuildRequires: openct-devel} |
72eaba4f | 25 | BuildRequires: openssl-devel >= 0.9.7d |
455ac4e7 | 26 | %{!?with_openct:BuildRequires: pcsc-lite-devel >= 1.6.0} |
34f2d3c1 | 27 | BuildRequires: pkgconfig >= 1:0.9.0 |
1cefa9cb | 28 | BuildRequires: readline-devel |
c28ca417 JB |
29 | BuildRequires: rpmbuild(macros) >= 1.364 |
30 | BuildRequires: zlib-devel | |
4f1bc56e | 31 | Requires: filesystem >= 4.0-28 |
455ac4e7 JB |
32 | %{!?with_openct:Requires: pcsc-lite-libs >= 1.6.0} |
33 | Obsoletes: browser-plugin-opensc | |
34 | Obsoletes: mozilla-plugin-opensc | |
896b833c | 35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
1eb351c9 | 37 | # datadir is used for config files and (editable) profiles |
ac174bda JB |
38 | %define _datadir /etc |
39 | %define _sysconfdir /etc/opensc | |
d6f32863 | 40 | |
896b833c | 41 | %description |
1cefa9cb JB |
42 | libopensc is a library for accessing SmartCard devices using PC/SC |
43 | Lite middleware package. It is also the core library of the OpenSC | |
44 | project. Basic functionality (e.g. SELECT FILE, READ BINARY) should | |
45 | work on any ISO 7816-4 compatible SmartCard. Encryption and decryption | |
46 | using private keys on the SmartCard is at the moment possible only | |
47 | with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic | |
48 | IDentity) card manufactured by Setec. | |
896b833c | 49 | |
8623b75b | 50 | %description -l pl.UTF-8 |
1cefa9cb | 51 | libopensc to biblioteka do korzystania z kart procesorowych przy |
8623b75b JR |
52 | użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa |
53 | biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT | |
54 | FILE, READ BINARY) powinna działać także z dowolną kartą procesorową | |
55 | zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu | |
56 | prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu | |
1cefa9cb JB |
57 | kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic |
58 | IDentity) produkowanych przez Setec. | |
896b833c | 59 | |
60 | %package devel | |
1cefa9cb | 61 | Summary: OpenSC development files |
ae88f326 | 62 | Summary(pl.UTF-8): Pliki dla programistów używających OpenSC |
896b833c | 63 | Group: Development/Tools |
9f872d80 | 64 | Requires: %{name} = %{epoch}:%{version}-%{release} |
24aae781 | 65 | Requires: libltdl-devel |
455ac4e7 | 66 | %{?with_openct:Requires: openct-devel} |
ef886f95 | 67 | Requires: openssl-devel >= 0.9.7d |
455ac4e7 | 68 | %{!?with_openct:Requires: pcsc-lite-devel >= 1.6.0} |
ef886f95 | 69 | Requires: zlib-devel |
896b833c | 70 | |
71 | %description devel | |
1cefa9cb | 72 | OpenSC development files. |
896b833c | 73 | |
8623b75b JR |
74 | %description devel -l pl.UTF-8 |
75 | Pliki dla programistów używających OpenSC. | |
896b833c | 76 | |
77 | %package static | |
455ac4e7 JB |
78 | Summary: Static OpenSC library |
79 | Summary(pl.UTF-8): Bibloteka statyczna OpenSC | |
896b833c | 80 | Group: Development/Tools |
9f872d80 | 81 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
896b833c | 82 | |
83 | %description static | |
455ac4e7 | 84 | Static OpenSC library. |
896b833c | 85 | |
8623b75b | 86 | %description static -l pl.UTF-8 |
455ac4e7 | 87 | Biblioteka statyczna OpenSC. |
d6f32863 | 88 | |
47359102 JB |
89 | %package -n bash-completion-opensc |
90 | Summary: Bash completion for OpenSC commands | |
91 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów poleceń OpenSC | |
92 | Group: Applications/Shells | |
93 | Requires: %{name} = %{version}-%{release} | |
94 | ||
95 | %description -n bash-completion-opensc | |
96 | Bash completion for OpenSC commands. | |
97 | ||
98 | %description -n bash-completion-opensc -l pl.UTF-8 | |
99 | Bashowe uzupełnianie parametrów poleceń OpenSC. | |
100 | ||
896b833c | 101 | %prep |
1cefa9cb | 102 | %setup -q |
4f1bc56e | 103 | %patch0 -p1 |
47359102 | 104 | %patch1 -p1 |
2504dc81 | 105 | |
896b833c | 106 | %build |
1cefa9cb | 107 | %{__libtoolize} |
c28ca417 | 108 | %{__aclocal} -I m4 |
1cefa9cb | 109 | %{__autoconf} |
ac174bda | 110 | %{__autoheader} |
1cefa9cb | 111 | %{__automake} |
d6f32863 | 112 | %configure \ |
455ac4e7 JB |
113 | %{?with_openct:--enable-openct --disable-pcsc} \ |
114 | %{!?with_openct:--enable-pcsc --disable-openct} \ | |
80bde4f7 | 115 | --disable-silent-rules \ |
455ac4e7 JB |
116 | --enable-doc \ |
117 | --with-pcsc-provider=%{_libdir}/libpcsclite.so.1 | |
896b833c | 118 | |
1cefa9cb | 119 | %{__make} |
896b833c | 120 | |
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
3d10579f | 123 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11} |
70be04b7 | 124 | |
3d10579f | 125 | %{__make} install \ |
47359102 JB |
126 | DESTDIR=$RPM_BUILD_ROOT \ |
127 | completiondir=/etc/bash_completion.d | |
896b833c | 128 | |
455ac4e7 | 129 | # not needed (dlopened by soname) |
ef886f95 | 130 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la |
4f1bc56e | 131 | # obsoleted by pkg-config |
ef886f95 | 132 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la |
61f848e8 | 133 | |
53aad453 | 134 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
0a3c046b | 135 | |
896b833c | 136 | %clean |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
1cefa9cb JB |
139 | %post -p /sbin/ldconfig |
140 | %postun -p /sbin/ldconfig | |
896b833c | 141 | |
142 | %files | |
143 | %defattr(644,root,root,755) | |
4f1bc56e | 144 | %doc ChangeLog NEWS README doc/tools/tools.html |
d9747ba8 | 145 | %attr(755,root,root) %{_bindir}/cardos-tool |
1cefa9cb | 146 | %attr(755,root,root) %{_bindir}/cryptoflex-tool |
ef886f95 | 147 | %attr(755,root,root) %{_bindir}/dnie-tool |
8d087e90 | 148 | %attr(755,root,root) %{_bindir}/eidenv |
4f1bc56e | 149 | %attr(755,root,root) %{_bindir}/iasecc-tool |
8d087e90 | 150 | %attr(755,root,root) %{_bindir}/netkey-tool |
4f1bc56e | 151 | %attr(755,root,root) %{_bindir}/openpgp-tool |
1cefa9cb JB |
152 | %attr(755,root,root) %{_bindir}/opensc-explorer |
153 | %attr(755,root,root) %{_bindir}/opensc-tool | |
88647e66 | 154 | %attr(755,root,root) %{_bindir}/piv-tool |
61f848e8 | 155 | %attr(755,root,root) %{_bindir}/pkcs11-tool |
455ac4e7 JB |
156 | %attr(755,root,root) %{_bindir}/pkcs15-crypt |
157 | %attr(755,root,root) %{_bindir}/pkcs15-init | |
158 | %attr(755,root,root) %{_bindir}/pkcs15-tool | |
4f1bc56e | 159 | %attr(755,root,root) %{_bindir}/sc-hsm-tool |
c9f4880d | 160 | %attr(755,root,root) %{_bindir}/westcos-tool |
c39ac2c0 | 161 | %attr(755,root,root) %{_libdir}/libopensc.so.*.*.* |
455ac4e7 | 162 | %attr(755,root,root) %ghost %{_libdir}/libopensc.so.3 |
ef886f95 JB |
163 | %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.* |
164 | %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.3 | |
c28ca417 | 165 | # PKCS11 modules |
ef886f95 | 166 | %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so |
2f74c13c | 167 | %attr(755,root,root) %{_libdir}/opensc-pkcs11.so |
8d087e90 | 168 | %attr(755,root,root) %{_libdir}/pkcs11-spy.so |
ef886f95 | 169 | %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so |
c28ca417 JB |
170 | %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so |
171 | %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so | |
1cefa9cb | 172 | %dir %{_datadir}/opensc |
c9f4880d | 173 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf |
4bdbfbe7 | 174 | %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile |
d9747ba8 | 175 | %{_mandir}/man1/cardos-tool.1* |
61f848e8 | 176 | %{_mandir}/man1/cryptoflex-tool.1* |
47359102 | 177 | %{_mandir}/man1/dnie-tool.1* |
53aad453 | 178 | %{_mandir}/man1/eidenv.1* |
4f1bc56e | 179 | %{_mandir}/man1/iasecc-tool.1* |
8d087e90 | 180 | %{_mandir}/man1/netkey-tool.1* |
4f1bc56e | 181 | %{_mandir}/man1/openpgp-tool.1* |
61f848e8 JB |
182 | %{_mandir}/man1/opensc-explorer.1* |
183 | %{_mandir}/man1/opensc-tool.1* | |
53aad453 | 184 | %{_mandir}/man1/piv-tool.1* |
92519f5f | 185 | %{_mandir}/man1/pkcs11-tool.1* |
455ac4e7 JB |
186 | %{_mandir}/man1/pkcs15-crypt.1* |
187 | %{_mandir}/man1/pkcs15-init.1* | |
188 | %{_mandir}/man1/pkcs15-tool.1* | |
4f1bc56e | 189 | %{_mandir}/man1/sc-hsm-tool.1* |
c9f4880d | 190 | %{_mandir}/man1/westcos-tool.1* |
c39ac2c0 | 191 | %{_mandir}/man5/pkcs15-profile.5* |
896b833c | 192 | |
193 | %files devel | |
194 | %defattr(644,root,root,755) | |
1cefa9cb | 195 | %attr(755,root,root) %{_libdir}/libopensc.so |
ef886f95 | 196 | %attr(755,root,root) %{_libdir}/libsmm-local.so |
4f1bc56e | 197 | %{_pkgconfigdir}/libopensc.pc |
896b833c | 198 | |
199 | %files static | |
200 | %defattr(644,root,root,755) | |
8d087e90 | 201 | %{_libdir}/libopensc.a |
ef886f95 | 202 | %{_libdir}/libsmm-local.a |
47359102 JB |
203 | |
204 | %files -n bash-completion-opensc | |
205 | %defattr(644,root,root,755) | |
206 | /etc/bash_completion.d/cardos-tool | |
207 | /etc/bash_completion.d/cryptoflex-tool | |
208 | /etc/bash_completion.d/dnie-tool | |
209 | /etc/bash_completion.d/eidenv | |
210 | /etc/bash_completion.d/iasecc-tool | |
211 | /etc/bash_completion.d/netkey-tool | |
212 | /etc/bash_completion.d/openpgp-tool | |
213 | /etc/bash_completion.d/opensc-explorer | |
214 | /etc/bash_completion.d/opensc-tool | |
215 | /etc/bash_completion.d/piv-tool | |
216 | /etc/bash_completion.d/pkcs11-tool | |
217 | /etc/bash_completion.d/pkcs15-crypt | |
218 | /etc/bash_completion.d/pkcs15-init | |
219 | /etc/bash_completion.d/pkcs15-tool | |
220 | /etc/bash_completion.d/sc-hsm-tool | |
221 | /etc/bash_completion.d/westcos-tool |