]> git.pld-linux.org Git - packages/opensc.git/blob - opensc.spec
- time to move to new libassuan - added libassuan-2 patch from upstream trac
[packages/opensc.git] / opensc.spec
1 Summary:        OpenSC library - for accessing SmartCard devices using PC/SC Lite
2 Summary(pl.UTF-8):      Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite
3 Name:           opensc
4 Version:        0.11.13
5 Release:        2
6 Epoch:          0
7 License:        LGPL v2.1+
8 Group:          Applications
9 Source0:        http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz
10 # Source0-md5:  98fa151e947941f9c3f27420fdf47c11
11 Source1:        %{name}-initramfs-hook
12 Source2:        %{name}-initramfs-local-bottom
13 Source3:        %{name}-initramfs-local-top
14 Source4:        %{name}-initramfs-README
15 Patch0:         %{name}-libassuan-2.patch
16 Patch1:         %{name}-pcsc.patch
17 URL:            http://www.opensc-project.org/
18 BuildRequires:  autoconf >= 2.60
19 BuildRequires:  automake >= 1:1.10
20 BuildRequires:  libassuan-devel >= 1:2.0.0
21 BuildRequires:  libltdl-devel
22 BuildRequires:  libtool >= 1:1.4.2-9
23 BuildRequires:  libxslt-progs
24 BuildRequires:  openct-devel
25 BuildRequires:  openldap-devel >= 2.4.6
26 BuildRequires:  openssl-devel >= 0.9.7d
27 BuildRequires:  pcsc-lite-devel >= 1.6.0
28 BuildRequires:  pkgconfig >= 1:0.9.0
29 BuildRequires:  readline-devel
30 BuildRequires:  rpmbuild(macros) >= 1.364
31 BuildRequires:  xorg-lib-libXt-devel
32 BuildRequires:  zlib-devel
33 Requires:       pcsc-lite-libs >= 1.6.0
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 Requires:       openct-devel
66 Requires:       openssl-devel
67 Requires:       pcsc-lite-devel >= 1.6.0
68
69 %description devel
70 OpenSC development files.
71
72 %description devel -l pl.UTF-8
73 Pliki dla programistów używających OpenSC.
74
75 %package static
76 Summary:        Static OpenSC libraries
77 Summary(pl.UTF-8):      Bibloteki statyczne OpenSC
78 Group:          Development/Tools
79 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
80
81 %description static
82 Static OpenSC libraries.
83
84 %description static -l pl.UTF-8
85 Statyczne biblioteki OpenSC.
86
87 %package -n browser-plugin-opensc
88 Summary:        OpenSC Signer plugin for Mozilla
89 Summary(pl.UTF-8):      Wtyczka OpenSC Signer dla Mozilli
90 Group:          X11/Applications
91 Requires:       %{name} = %{epoch}:%{version}-%{release}
92 Requires:       browser-plugins >= 2.0
93 Requires:       browser-plugins(%{_target_base_arch})
94 Requires:       pinentry >= 0.7.5-2
95 Provides:       mozilla-plugin-opensc
96 Obsoletes:      mozilla-plugin-opensc
97
98 %description -n browser-plugin-opensc
99 OpenSC Signer browser plugin.
100
101 Supported browsers: %{browsers}.
102
103 %description -n browser-plugin-opensc -l pl.UTF-8
104 Wtyczka OpenSC Signer dla przeglądarek.
105
106 Obsługiwane przeglądarki: %{browsers}.
107
108 %package initramfs
109 Summary:        OpenSC support scripts for initramfs-tools
110 Summary(pl.UTF-8):      Skrypty dla initramfs-tools ze wsparciem dla OpenSC
111 Group:          Base
112 Requires:       %{name} = %{version}-%{release}
113 Requires:       initramfs-tools
114
115 %description initramfs
116 OpenSC support scripts for initramfs-tools.
117
118 %description initramfs -l pl.UTF-8
119 Skrypty dla initramfs-tools ze wsparciem dla OpenSC.
120
121 %prep
122 %setup -q
123 %patch0 -p1
124 %patch1 -p1
125
126 install %{SOURCE4} README.initramfs
127
128 %build
129 %{__libtoolize}
130 %{__aclocal} -I m4
131 %{__autoconf}
132 %{__autoheader}
133 %{__automake}
134 %configure \
135         --enable-openct \
136         --enable-nsplugin \
137         --enable-pcsc \
138         --with-pcsc-provider=%{_libdir}/libpcsclite.so.1 \
139         --with-pinentry=/usr/bin/pinentry \
140         --with-plugindir=%{_browserpluginsdir}
141
142 %{__make}
143
144 %install
145 rm -rf $RPM_BUILD_ROOT
146 install -d $RPM_BUILD_ROOT%{_browserpluginsdir} \
147         $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-{bottom,top}}
148
149 %{__make} install \
150         DESTDIR=$RPM_BUILD_ROOT
151
152 # just install instead of symlinking
153 %{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/opensc-signer.so
154 mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{_browserpluginsdir}
155
156 # default config
157 install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
158
159 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/opensc
160 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-bottom/opensc
161 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/opensc
162
163 # useless (dlopened by *.so)
164 rm -f $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc,opensc,pkcs11}-*.{a,la} \
165         $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la}
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %post   -p /sbin/ldconfig
171 %postun -p /sbin/ldconfig
172
173 %post   -n browser-plugin-opensc
174 %update_browser_plugins
175
176 %postun -n browser-plugin-opensc
177 if [ "$1" = "0" ]; then
178         %update_browser_plugins
179 fi
180
181 %files
182 %defattr(644,root,root,755)
183 %doc NEWS README doc/nonpersistent/{ChangeLog,wiki.out} doc/html.out/tools.html
184 %attr(755,root,root) %{_bindir}/cardos-info
185 %attr(755,root,root) %{_bindir}/cardos-tool
186 %attr(755,root,root) %{_bindir}/cryptoflex-tool
187 %attr(755,root,root) %{_bindir}/eidenv
188 %attr(755,root,root) %{_bindir}/netkey-tool
189 %attr(755,root,root) %{_bindir}/opensc-explorer
190 %attr(755,root,root) %{_bindir}/opensc-tool
191 %attr(755,root,root) %{_bindir}/piv-tool
192 %attr(755,root,root) %{_bindir}/pkcs11-tool
193 %attr(755,root,root) %{_bindir}/pkcs15-*
194 %attr(755,root,root) %{_bindir}/rutoken-tool
195 %attr(755,root,root) %{_bindir}/westcos-tool
196 %attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
197 %attr(755,root,root) %ghost %{_libdir}/libopensc.so.2
198 %attr(755,root,root) %{_libdir}/libpkcs15init.so.*.*.*
199 %attr(755,root,root) %ghost %{_libdir}/libpkcs15init.so.2
200 %attr(755,root,root) %{_libdir}/libscconf.so.*.*.*
201 %attr(755,root,root) %ghost %{_libdir}/libscconf.so.2
202 # PKCS11 modules
203 %attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
204 %attr(755,root,root) %{_libdir}/opensc-pkcs11.so
205 %attr(755,root,root) %{_libdir}/pkcs11-spy.so
206 %dir %{_libdir}/pkcs11
207 %attr(755,root,root) %{_libdir}/pkcs11/onepin-opensc-pkcs11.so
208 %attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so
209 %attr(755,root,root) %{_libdir}/pkcs11/pkcs11-spy.so
210 %dir %{_datadir}/opensc
211 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf
212 %config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
213 %{_mandir}/man1/cardos-tool.1*
214 %{_mandir}/man1/cryptoflex-tool.1*
215 %{_mandir}/man1/netkey-tool.1*
216 %{_mandir}/man1/opensc-explorer.1*
217 %{_mandir}/man1/opensc-tool.1*
218 %{_mandir}/man1/pkcs11-tool.1*
219 %{_mandir}/man1/pkcs15-*.1*
220 %{_mandir}/man1/westcos-tool.1*
221 %{_mandir}/man5/pkcs15-profile.5*
222
223 %files devel
224 %defattr(644,root,root,755)
225 %doc doc/html.out/api.html
226 %attr(755,root,root) %{_bindir}/opensc-config
227 %attr(755,root,root) %{_libdir}/libopensc.so
228 %attr(755,root,root) %{_libdir}/libpkcs15init.so
229 %attr(755,root,root) %{_libdir}/libscconf.so
230 %{_libdir}/libopensc.la
231 %{_libdir}/libpkcs15init.la
232 %{_libdir}/libscconf.la
233 %{_includedir}/opensc
234 %{_pkgconfigdir}/libopensc.pc
235 %{_pkgconfigdir}/libpkcs15init.pc
236 %{_pkgconfigdir}/libscconf.pc
237 %{_mandir}/man1/opensc-config.1*
238 %{_mandir}/man3/sc_*.3*
239
240 %files static
241 %defattr(644,root,root,755)
242 %{_libdir}/libopensc.a
243 %{_libdir}/libpkcs15init.a
244 %{_libdir}/libscconf.a
245
246 %files -n browser-plugin-opensc
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_browserpluginsdir}/opensc-signer.so
249
250 %files initramfs
251 %defattr(644,root,root,755)
252 %doc README.initramfs
253 %attr(755,root,root) %{_datadir}/initramfs-tools/hooks/opensc
254 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-top/opensc
255 %attr(755,root,root) %{_datadir}/initramfs-tools/scripts/local-bottom/opensc
This page took 0.077072 seconds and 4 git commands to generate.