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