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