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