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