]> git.pld-linux.org Git - packages/opensc.git/blob - opensc.spec
d5db61cfae6e0cea9a379984a3a0566d015204dc
[packages/opensc.git] / opensc.spec
1 #
2 # Conditional build:
3 %bcond_with     openct          # use OpenCT instead of PC/SC for reader access
4 %bcond_without  openpace        # OpenPACE support
5 #
6 Summary:        OpenSC library - for accessing SmartCard devices using PC/SC Lite
7 Summary(pl.UTF-8):      Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite
8 Name:           opensc
9 Version:        0.19.0
10 Release:        3
11 License:        LGPL v2.1+
12 Group:          Applications
13 #Source0Download: https://github.com/OpenSC/OpenSC/releases
14 Source0:        https://github.com/OpenSC/OpenSC/releases/download/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  40734b2343cf83c62c4c403f8a37475e
16 Patch0:         build.patch
17 URL:            https://github.com/OpenSC/OpenSC/wiki
18 BuildRequires:  autoconf >= 2.60
19 BuildRequires:  automake >= 1:1.10
20 BuildRequires:  docbook-style-xsl
21 BuildRequires:  libltdl-devel
22 BuildRequires:  libtool >= 1:1.4.2-9
23 BuildRequires:  libxslt-progs
24 %{?with_openct:BuildRequires:   openct-devel}
25 %{?with_openpace:BuildRequires: openpace-devel >= 0.9}
26 BuildRequires:  openssl-devel >= 0.9.7d
27 %{!?with_openct:BuildRequires:  pcsc-lite-devel >= 1.8.22}
28 BuildRequires:  pkgconfig >= 1:0.9.0
29 BuildRequires:  readline-devel
30 BuildRequires:  rpmbuild(macros) >= 1.364
31 BuildRequires:  zlib-devel
32 Requires:       filesystem >= 4.0-28
33 %{?with_openpace:Requires:      openpace >= 0.9}
34 %{!?with_openct:Requires:       pcsc-lite-libs >= 1.8.22}
35 Obsoletes:      browser-plugin-opensc
36 Obsoletes:      mozilla-plugin-opensc
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 # datadir is used for config files and (editable) profiles
40 %define         _datadir        /etc
41 %define         _sysconfdir     /etc/opensc
42
43 %description
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.
51
52 %description -l pl.UTF-8
53 libopensc to biblioteka do korzystania z kart procesorowych przy
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
59 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
60 IDentity) produkowanych przez Setec.
61
62 %package devel
63 Summary:        OpenSC development files
64 Summary(pl.UTF-8):      Pliki dla programistów używających OpenSC
65 Group:          Development/Tools
66 Requires:       %{name} = %{version}-%{release}
67 Requires:       libltdl-devel
68 %{?with_openct:Requires:        openct-devel}
69 Requires:       openssl-devel >= 0.9.7d
70 %{!?with_openct:Requires:       pcsc-lite-devel >= 1.8.22}
71 Requires:       zlib-devel
72
73 %description devel
74 OpenSC development files.
75
76 %description devel -l pl.UTF-8
77 Pliki dla programistów używających OpenSC.
78
79 %package static
80 Summary:        Static OpenSC library
81 Summary(pl.UTF-8):      Bibloteka statyczna OpenSC
82 Group:          Development/Tools
83 Requires:       %{name}-devel = %{version}-%{release}
84
85 %description static
86 Static OpenSC library.
87
88 %description static -l pl.UTF-8
89 Biblioteka statyczna OpenSC.
90
91 %package -n bash-completion-opensc
92 Summary:        Bash completion for OpenSC commands
93 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów poleceń OpenSC
94 Group:          Applications/Shells
95 Requires:       %{name} = %{version}-%{release}
96
97 %description -n bash-completion-opensc
98 Bash completion for OpenSC commands.
99
100 %description -n bash-completion-opensc -l pl.UTF-8
101 Bashowe uzupełnianie parametrów poleceń OpenSC.
102
103 %prep
104 %setup -q
105 %patch0 -p1
106
107 %build
108 %{__libtoolize}
109 %{__aclocal} -I m4
110 %{__autoconf}
111 %{__autoheader}
112 %{__automake}
113 %configure \
114         %{?with_openct:--enable-openct --disable-pcsc} \
115         %{!?with_openct:--enable-pcsc --disable-openct} \
116         %{!?with_openpace:--disable-openpace} \
117         --disable-silent-rules \
118         --enable-doc \
119         --with-pcsc-provider=%{_libdir}/libpcsclite.so.1
120
121 %{__make}
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11}
126
127 %{__make} install \
128         DESTDIR=$RPM_BUILD_ROOT \
129         completiondir=/etc/bash_completion.d
130
131 # not needed (dlopened by soname)
132 %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la
133 # API not exported
134 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la
135
136 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %post   -p /sbin/ldconfig
142 %postun -p /sbin/ldconfig
143
144 %files
145 %defattr(644,root,root,755)
146 %doc NEWS README doc/tools/tools.html
147 %attr(755,root,root) %{_bindir}/cardos-tool
148 %attr(755,root,root) %{_bindir}/cryptoflex-tool
149 %attr(755,root,root) %{_bindir}/dnie-tool
150 %attr(755,root,root) %{_bindir}/egk-tool
151 %attr(755,root,root) %{_bindir}/eidenv
152 %attr(755,root,root) %{_bindir}/gids-tool
153 %attr(755,root,root) %{_bindir}/iasecc-tool
154 %attr(755,root,root) %{_bindir}/netkey-tool
155 %attr(755,root,root) %{_bindir}/npa-tool
156 %attr(755,root,root) %{_bindir}/openpgp-tool
157 %attr(755,root,root) %{_bindir}/opensc-asn1
158 %attr(755,root,root) %{_bindir}/opensc-explorer
159 %attr(755,root,root) %{_bindir}/opensc-notify
160 %attr(755,root,root) %{_bindir}/opensc-tool
161 %attr(755,root,root) %{_bindir}/piv-tool
162 %attr(755,root,root) %{_bindir}/pkcs11-tool
163 %attr(755,root,root) %{_bindir}/pkcs15-crypt
164 %attr(755,root,root) %{_bindir}/pkcs15-init
165 %attr(755,root,root) %{_bindir}/pkcs15-tool
166 %attr(755,root,root) %{_bindir}/sc-hsm-tool
167 %attr(755,root,root) %{_bindir}/westcos-tool
168 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
169 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.6
170 %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.*
171 %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.6
172 # PKCS11 modules
173 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
174 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
175 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
176 %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
177 %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so
178 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
179 %dir %{_datadir}/opensc
180 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf
181 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
182 %if %{with openpace}
183 /etc/eac/cvc/DESRCACC100001
184 %endif
185 %{_mandir}/man1/cardos-tool.1*
186 %{_mandir}/man1/cryptoflex-tool.1*
187 %{_mandir}/man1/dnie-tool.1*
188 %{_mandir}/man1/egk-tool.1*
189 %{_mandir}/man1/eidenv.1*
190 %{_mandir}/man1/gids-tool.1*
191 %{_mandir}/man1/iasecc-tool.1*
192 %{_mandir}/man1/netkey-tool.1*
193 %{_mandir}/man1/npa-tool.1*
194 %{_mandir}/man1/openpgp-tool.1*
195 %{_mandir}/man1/opensc-asn1.1*
196 %{_mandir}/man1/opensc-explorer.1*
197 %{_mandir}/man1/opensc-notify.1*
198 %{_mandir}/man1/opensc-tool.1*
199 %{_mandir}/man1/piv-tool.1*
200 %{_mandir}/man1/pkcs11-tool.1*
201 %{_mandir}/man1/pkcs15-crypt.1*
202 %{_mandir}/man1/pkcs15-init.1*
203 %{_mandir}/man1/pkcs15-tool.1*
204 %{_mandir}/man1/sc-hsm-tool.1*
205 %{_mandir}/man1/westcos-tool.1*
206 %{_mandir}/man5/opensc.conf.5*
207 %{_mandir}/man5/pkcs15-profile.5*
208
209 %files devel
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{_libdir}/libopensc.so
212 %attr(755,root,root) %{_libdir}/libsmm-local.so
213 %{_pkgconfigdir}/opensc-pkcs11.pc
214
215 %files static
216 %defattr(644,root,root,755)
217 %{_libdir}/libopensc.a
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
224 /etc/bash_completion.d/egk-tool
225 /etc/bash_completion.d/eidenv
226 /etc/bash_completion.d/gids-tool
227 /etc/bash_completion.d/iasecc-tool
228 /etc/bash_completion.d/netkey-tool
229 /etc/bash_completion.d/npa-tool
230 /etc/bash_completion.d/openpgp-tool
231 /etc/bash_completion.d/opensc-asn1
232 /etc/bash_completion.d/opensc-explorer
233 /etc/bash_completion.d/opensc-notify
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.032648 seconds and 2 git commands to generate.