]> git.pld-linux.org Git - packages/opensc.git/blob - opensc.spec
- updated to 0.15.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.15.0
9 Release:        1
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:  01e6b803865f7b7574ee65a7b2d63c17
15 Patch0:         %{name}-pc.patch
16 Patch1:         %{name}-missing.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 BuildRequires:  openssl-devel >= 0.9.7d
26 %{!?with_openct:BuildRequires:  pcsc-lite-devel >= 1.6.0}
27 BuildRequires:  pkgconfig >= 1:0.9.0
28 BuildRequires:  readline-devel
29 BuildRequires:  rpmbuild(macros) >= 1.364
30 BuildRequires:  zlib-devel
31 Requires:       filesystem >= 4.0-28
32 %{!?with_openct:Requires:       pcsc-lite-libs >= 1.6.0}
33 Obsoletes:      browser-plugin-opensc
34 Obsoletes:      mozilla-plugin-opensc
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 # datadir is used for config files and (editable) profiles
38 %define         _datadir        /etc
39 %define         _sysconfdir     /etc/opensc
40
41 %description
42 libopensc is a library for accessing SmartCard devices using PC/SC
43 Lite middleware package. It is also the core library of the OpenSC
44 project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
45 work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
46 using private keys on the SmartCard is at the moment possible only
47 with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
48 IDentity) card manufactured by Setec.
49
50 %description -l pl.UTF-8
51 libopensc to biblioteka do korzystania z kart procesorowych przy
52 użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
53 biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
54 FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
55 zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
56 prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
57 kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
58 IDentity) produkowanych przez Setec.
59
60 %package devel
61 Summary:        OpenSC development files
62 Summary(pl.UTF-8):      Pliki dla programistów używających OpenSC
63 Group:          Development/Tools
64 Requires:       %{name} = %{epoch}:%{version}-%{release}
65 Requires:       libltdl-devel
66 %{?with_openct:Requires:        openct-devel}
67 Requires:       openssl-devel >= 0.9.7d
68 %{!?with_openct:Requires:       pcsc-lite-devel >= 1.6.0}
69 Requires:       zlib-devel
70
71 %description devel
72 OpenSC development files.
73
74 %description devel -l pl.UTF-8
75 Pliki dla programistów używających OpenSC.
76
77 %package static
78 Summary:        Static OpenSC library
79 Summary(pl.UTF-8):      Bibloteka statyczna OpenSC
80 Group:          Development/Tools
81 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
82
83 %description static
84 Static OpenSC library.
85
86 %description static -l pl.UTF-8
87 Biblioteka statyczna OpenSC.
88
89 %package -n bash-completion-opensc
90 Summary:        Bash completion for OpenSC commands
91 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów poleceń OpenSC
92 Group:          Applications/Shells
93 Requires:       %{name} = %{version}-%{release}
94
95 %description -n bash-completion-opensc
96 Bash completion for OpenSC commands.
97
98 %description -n bash-completion-opensc -l pl.UTF-8
99 Bashowe uzupełnianie parametrów poleceń OpenSC.
100
101 %prep
102 %setup -q
103 %patch0 -p1
104 %patch1 -p1
105
106 %build
107 %{__libtoolize}
108 %{__aclocal} -I m4
109 %{__autoconf}
110 %{__autoheader}
111 %{__automake}
112 %configure \
113         %{?with_openct:--enable-openct --disable-pcsc} \
114         %{!?with_openct:--enable-pcsc --disable-openct} \
115         --disable-silent-rules \
116         --enable-doc \
117         --with-pcsc-provider=%{_libdir}/libpcsclite.so.1
118
119 %{__make}
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir}/pkcs11}
124
125 %{__make} install \
126         DESTDIR=$RPM_BUILD_ROOT \
127         completiondir=/etc/bash_completion.d
128
129 # not needed (dlopened by soname)
130 %{__rm} $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc-pkcs11,opensc-pkcs11,pkcs11-spy}.la
131 # obsoleted by pkg-config
132 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{opensc,smm-local}.la
133
134 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %post   -p /sbin/ldconfig
140 %postun -p /sbin/ldconfig
141
142 %files
143 %defattr(644,root,root,755)
144 %doc ChangeLog NEWS README doc/tools/tools.html
145 %attr(755,root,root) %{_bindir}/cardos-tool
146 %attr(755,root,root) %{_bindir}/cryptoflex-tool
147 %attr(755,root,root) %{_bindir}/dnie-tool
148 %attr(755,root,root) %{_bindir}/eidenv
149 %attr(755,root,root) %{_bindir}/iasecc-tool
150 %attr(755,root,root) %{_bindir}/netkey-tool
151 %attr(755,root,root) %{_bindir}/openpgp-tool
152 %attr(755,root,root) %{_bindir}/opensc-explorer
153 %attr(755,root,root) %{_bindir}/opensc-tool
154 %attr(755,root,root) %{_bindir}/piv-tool
155 %attr(755,root,root) %{_bindir}/pkcs11-tool
156 %attr(755,root,root) %{_bindir}/pkcs15-crypt
157 %attr(755,root,root) %{_bindir}/pkcs15-init
158 %attr(755,root,root) %{_bindir}/pkcs15-tool
159 %attr(755,root,root) %{_bindir}/sc-hsm-tool
160 %attr(755,root,root) %{_bindir}/westcos-tool
161 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.3
163 %attr(755,root,root) %{_libdir}/libsmm-local.so.*.*.*
164 %attr(755,root,root) %ghost %{_libdir}/libsmm-local.so.3
165 # PKCS11 modules
166 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
167 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
168 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
169 %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
170 %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so
171 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
172 %dir %{_datadir}/opensc
173 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf
174 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
175 %{_mandir}/man1/cardos-tool.1*
176 %{_mandir}/man1/cryptoflex-tool.1*
177 %{_mandir}/man1/dnie-tool.1*
178 %{_mandir}/man1/eidenv.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/iasecc-tool
211 /etc/bash_completion.d/netkey-tool
212 /etc/bash_completion.d/openpgp-tool
213 /etc/bash_completion.d/opensc-explorer
214 /etc/bash_completion.d/opensc-tool
215 /etc/bash_completion.d/piv-tool
216 /etc/bash_completion.d/pkcs11-tool
217 /etc/bash_completion.d/pkcs15-crypt
218 /etc/bash_completion.d/pkcs15-init
219 /etc/bash_completion.d/pkcs15-tool
220 /etc/bash_completion.d/sc-hsm-tool
221 /etc/bash_completion.d/westcos-tool
This page took 0.074656 seconds and 3 git commands to generate.