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