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