- time to move to new libassuan - added libassuan-2 patch from upstream trac
[packages/opensc.git] / opensc.spec
CommitLineData
1cefa9cb 1Summary: OpenSC library - for accessing SmartCard devices using PC/SC Lite
ae88f326 2Summary(pl.UTF-8): Biblioteka OpenSC - do korzystania z kart procesorowych przy użyciu PC/SC Lite
896b833c 3Name: opensc
239c4950 4Version: 0.11.13
b725c008 5Release: 2
e0fb86be 6Epoch: 0
18e38179 7License: LGPL v2.1+
1cefa9cb 8Group: Applications
9c0288b5 9Source0: http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz
239c4950 10# Source0-md5: 98fa151e947941f9c3f27420fdf47c11
7af8549c
JR
11Source1: %{name}-initramfs-hook
12Source2: %{name}-initramfs-local-bottom
13Source3: %{name}-initramfs-local-top
14Source4: %{name}-initramfs-README
c9f4880d
JB
15Patch0: %{name}-libassuan-2.patch
16Patch1: %{name}-pcsc.patch
9c0288b5 17URL: http://www.opensc-project.org/
c28ca417
JB
18BuildRequires: autoconf >= 2.60
19BuildRequires: automake >= 1:1.10
c9f4880d 20BuildRequires: libassuan-devel >= 1:2.0.0
8d087e90 21BuildRequires: libltdl-devel
1cefa9cb 22BuildRequires: libtool >= 1:1.4.2-9
d740a4df 23BuildRequires: libxslt-progs
543fbe6c 24BuildRequires: openct-devel
fcac1d33 25BuildRequires: openldap-devel >= 2.4.6
72eaba4f 26BuildRequires: openssl-devel >= 0.9.7d
c9f4880d 27BuildRequires: pcsc-lite-devel >= 1.6.0
34f2d3c1 28BuildRequires: pkgconfig >= 1:0.9.0
1cefa9cb 29BuildRequires: readline-devel
c28ca417 30BuildRequires: rpmbuild(macros) >= 1.364
47974cd7 31BuildRequires: xorg-lib-libXt-devel
c28ca417 32BuildRequires: zlib-devel
c9f4880d 33Requires: pcsc-lite-libs >= 1.6.0
896b833c 34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
1eb351c9 36# datadir is used for config files and (editable) profiles
ac174bda
JB
37%define _datadir /etc
38%define _sysconfdir /etc/opensc
d6f32863 39
896b833c 40%description
1cefa9cb
JB
41libopensc is a library for accessing SmartCard devices using PC/SC
42Lite middleware package. It is also the core library of the OpenSC
43project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
44work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
45using private keys on the SmartCard is at the moment possible only
46with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
47IDentity) card manufactured by Setec.
896b833c 48
8623b75b 49%description -l pl.UTF-8
1cefa9cb 50libopensc to biblioteka do korzystania z kart procesorowych przy
8623b75b
JR
51użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
52biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
53FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
54zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
55prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
1cefa9cb
JB
56kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
57IDentity) produkowanych przez Setec.
896b833c 58
59%package devel
1cefa9cb 60Summary: OpenSC development files
ae88f326 61Summary(pl.UTF-8): Pliki dla programistów używających OpenSC
896b833c 62Group: Development/Tools
9f872d80 63Requires: %{name} = %{epoch}:%{version}-%{release}
24aae781 64Requires: libltdl-devel
9f872d80
JB
65Requires: openct-devel
66Requires: openssl-devel
c9f4880d 67Requires: pcsc-lite-devel >= 1.6.0
896b833c 68
69%description devel
1cefa9cb 70OpenSC development files.
896b833c 71
8623b75b
JR
72%description devel -l pl.UTF-8
73Pliki dla programistów używających OpenSC.
896b833c 74
75%package static
1cefa9cb 76Summary: Static OpenSC libraries
ae88f326 77Summary(pl.UTF-8): Bibloteki statyczne OpenSC
896b833c 78Group: Development/Tools
9f872d80 79Requires: %{name}-devel = %{epoch}:%{version}-%{release}
896b833c 80
81%description static
1cefa9cb 82Static OpenSC libraries.
896b833c 83
8623b75b 84%description static -l pl.UTF-8
1cefa9cb
JB
85Statyczne biblioteki OpenSC.
86
543fbe6c 87%package -n browser-plugin-opensc
d6f32863 88Summary: OpenSC Signer plugin for Mozilla
ae88f326 89Summary(pl.UTF-8): Wtyczka OpenSC Signer dla Mozilli
d6f32863 90Group: X11/Applications
9f872d80 91Requires: %{name} = %{epoch}:%{version}-%{release}
c28ca417 92Requires: browser-plugins >= 2.0
543fbe6c 93Requires: browser-plugins(%{_target_base_arch})
c28ca417 94Requires: pinentry >= 0.7.5-2
543fbe6c
ER
95Provides: mozilla-plugin-opensc
96Obsoletes: mozilla-plugin-opensc
97
98%description -n browser-plugin-opensc
99OpenSC Signer browser plugin.
d6f32863 100
543fbe6c 101Supported browsers: %{browsers}.
d6f32863 102
8623b75b
JR
103%description -n browser-plugin-opensc -l pl.UTF-8
104Wtyczka OpenSC Signer dla przeglądarek.
543fbe6c 105
8623b75b 106Obsługiwane przeglądarki: %{browsers}.
d6f32863 107
2504dc81
JR
108%package initramfs
109Summary: OpenSC support scripts for initramfs-tools
110Summary(pl.UTF-8): Skrypty dla initramfs-tools ze wsparciem dla OpenSC
111Group: Base
112Requires: %{name} = %{version}-%{release}
113Requires: initramfs-tools
114
115%description initramfs
116OpenSC support scripts for initramfs-tools.
117
118%description initramfs -l pl.UTF-8
119Skrypty dla initramfs-tools ze wsparciem dla OpenSC.
120
896b833c 121%prep
1cefa9cb 122%setup -q
c9f4880d
JB
123%patch0 -p1
124%patch1 -p1
896b833c 125
2504dc81
JR
126install %{SOURCE4} README.initramfs
127
896b833c 128%build
1cefa9cb 129%{__libtoolize}
c28ca417 130%{__aclocal} -I m4
1cefa9cb 131%{__autoconf}
ac174bda 132%{__autoheader}
1cefa9cb 133%{__automake}
d6f32863 134%configure \
c28ca417
JB
135 --enable-openct \
136 --enable-nsplugin \
137 --enable-pcsc \
138 --with-pcsc-provider=%{_libdir}/libpcsclite.so.1 \
34a5de28 139 --with-pinentry=/usr/bin/pinentry \
c28ca417 140 --with-plugindir=%{_browserpluginsdir}
896b833c 141
1cefa9cb 142%{__make}
896b833c 143
144%install
145rm -rf $RPM_BUILD_ROOT
2504dc81 146install -d $RPM_BUILD_ROOT%{_browserpluginsdir} \
80eefb38 147 $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/{hooks,scripts/local-{bottom,top}}
1cefa9cb 148
61f848e8
JB
149%{__make} install \
150 DESTDIR=$RPM_BUILD_ROOT
896b833c 151
61f848e8 152# just install instead of symlinking
c28ca417
JB
153%{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/opensc-signer.so
154mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{_browserpluginsdir}
afd37b22 155
61f848e8 156# default config
4bdbfbe7 157install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
1eb351c9 158
80eefb38
JR
159install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/hooks/opensc
160install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-bottom/opensc
161install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/initramfs-tools/scripts/local-top/opensc
2504dc81 162
61f848e8 163# useless (dlopened by *.so)
18e38179 164rm -f $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc,opensc,pkcs11}-*.{a,la} \
8d087e90 165 $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la}
61f848e8 166
896b833c 167%clean
168rm -rf $RPM_BUILD_ROOT
169
1cefa9cb
JB
170%post -p /sbin/ldconfig
171%postun -p /sbin/ldconfig
896b833c 172
c28ca417
JB
173%post -n browser-plugin-opensc
174%update_browser_plugins
543fbe6c 175
c28ca417
JB
176%postun -n browser-plugin-opensc
177if [ "$1" = "0" ]; then
178 %update_browser_plugins
179fi
543fbe6c 180
896b833c 181%files
182%defattr(644,root,root,755)
c28ca417 183%doc NEWS README doc/nonpersistent/{ChangeLog,wiki.out} doc/html.out/tools.html
61f848e8 184%attr(755,root,root) %{_bindir}/cardos-info
d9747ba8 185%attr(755,root,root) %{_bindir}/cardos-tool
1cefa9cb 186%attr(755,root,root) %{_bindir}/cryptoflex-tool
8d087e90
JB
187%attr(755,root,root) %{_bindir}/eidenv
188%attr(755,root,root) %{_bindir}/netkey-tool
1cefa9cb
JB
189%attr(755,root,root) %{_bindir}/opensc-explorer
190%attr(755,root,root) %{_bindir}/opensc-tool
88647e66 191%attr(755,root,root) %{_bindir}/piv-tool
61f848e8 192%attr(755,root,root) %{_bindir}/pkcs11-tool
1cefa9cb 193%attr(755,root,root) %{_bindir}/pkcs15-*
c28ca417 194%attr(755,root,root) %{_bindir}/rutoken-tool
c9f4880d 195%attr(755,root,root) %{_bindir}/westcos-tool
c39ac2c0 196%attr(755,root,root) %{_libdir}/libopensc.so.*.*.*
c39ac2c0 197%attr(755,root,root) %ghost %{_libdir}/libopensc.so.2
c28ca417 198%attr(755,root,root) %{_libdir}/libpkcs15init.so.*.*.*
c39ac2c0 199%attr(755,root,root) %ghost %{_libdir}/libpkcs15init.so.2
c28ca417 200%attr(755,root,root) %{_libdir}/libscconf.so.*.*.*
c39ac2c0 201%attr(755,root,root) %ghost %{_libdir}/libscconf.so.2
c28ca417 202# PKCS11 modules
18e38179 203%attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
2f74c13c 204%attr(755,root,root) %{_libdir}/opensc-pkcs11.so
8d087e90 205%attr(755,root,root) %{_libdir}/pkcs11-spy.so
c28ca417
JB
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
1cefa9cb 210%dir %{_datadir}/opensc
c9f4880d 211%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opensc.conf
4bdbfbe7 212%config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
d9747ba8 213%{_mandir}/man1/cardos-tool.1*
61f848e8 214%{_mandir}/man1/cryptoflex-tool.1*
8d087e90 215%{_mandir}/man1/netkey-tool.1*
61f848e8
JB
216%{_mandir}/man1/opensc-explorer.1*
217%{_mandir}/man1/opensc-tool.1*
92519f5f
JB
218%{_mandir}/man1/pkcs11-tool.1*
219%{_mandir}/man1/pkcs15-*.1*
c9f4880d 220%{_mandir}/man1/westcos-tool.1*
c39ac2c0 221%{_mandir}/man5/pkcs15-profile.5*
896b833c 222
223%files devel
224%defattr(644,root,root,755)
c28ca417 225%doc doc/html.out/api.html
1cefa9cb
JB
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
8d087e90
JB
230%{_libdir}/libopensc.la
231%{_libdir}/libpkcs15init.la
232%{_libdir}/libscconf.la
1cefa9cb 233%{_includedir}/opensc
c39ac2c0
JB
234%{_pkgconfigdir}/libopensc.pc
235%{_pkgconfigdir}/libpkcs15init.pc
236%{_pkgconfigdir}/libscconf.pc
61f848e8 237%{_mandir}/man1/opensc-config.1*
c39ac2c0 238%{_mandir}/man3/sc_*.3*
896b833c 239
240%files static
241%defattr(644,root,root,755)
8d087e90
JB
242%{_libdir}/libopensc.a
243%{_libdir}/libpkcs15init.a
244%{_libdir}/libscconf.a
d6f32863 245
543fbe6c 246%files -n browser-plugin-opensc
d6f32863 247%defattr(644,root,root,755)
c28ca417 248%attr(755,root,root) %{_browserpluginsdir}/opensc-signer.so
2504dc81
JR
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.176328 seconds and 4 git commands to generate.