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