- applied
[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
18e38179 4Version: 0.11.3
1c9cc728 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
18e38179 10# Source0-md5: 10897652e1f8d08d3c953982a4237f2e
8d087e90 11Patch0: %{name}-explorer-debug.patch
9c0288b5 12URL: http://www.opensc-project.org/
74b89671 13BuildRequires: autoconf >= 2.52
1cefa9cb 14BuildRequires: automake
6200ae89 15BuildRequires: libassuan-devel >= 1:0.6.0
8d087e90 16BuildRequires: libltdl-devel
1cefa9cb 17BuildRequires: libtool >= 1:1.4.2-9
543fbe6c 18BuildRequires: openct-devel
fcac1d33 19BuildRequires: openldap-devel >= 2.4.6
72eaba4f 20BuildRequires: openssl-devel >= 0.9.7d
1cefa9cb 21BuildRequires: pcsc-lite-devel
34f2d3c1 22BuildRequires: pkgconfig >= 1:0.9.0
1cefa9cb 23BuildRequires: readline-devel
543fbe6c 24BuildRequires: rpmbuild(macros) >= 1.236
896b833c 25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
1eb351c9 27# datadir is used for config files and (editable) profiles
ac174bda
JB
28%define _datadir /etc
29%define _sysconfdir /etc/opensc
543fbe6c
ER
30%define _plugindir %{_libdir}/browser-plugins
31
32# TODO: galeon and skipstone.
33# use macro, otherwise extra LF inserted along with the ifarch
34%define browsers mozilla, mozilla-firefox, konqueror, opera, seamonkey
d6f32863 35
896b833c 36%description
1cefa9cb
JB
37libopensc is a library for accessing SmartCard devices using PC/SC
38Lite middleware package. It is also the core library of the OpenSC
39project. Basic functionality (e.g. SELECT FILE, READ BINARY) should
40work on any ISO 7816-4 compatible SmartCard. Encryption and decryption
41using private keys on the SmartCard is at the moment possible only
42with PKCS#15 compatible cards, such as the FINEID (Finnish Electronic
43IDentity) card manufactured by Setec.
896b833c 44
8623b75b 45%description -l pl.UTF-8
1cefa9cb 46libopensc to biblioteka do korzystania z kart procesorowych przy
8623b75b
JR
47użyciu pakietu warstwy pośredniej PC/SC Lite. Jest to także podstawowa
48biblioteka projektu OpenSC. Podstawowa funkcjonalność (np. SELECT
49FILE, READ BINARY) powinna działać także z dowolną kartą procesorową
50zgodną z ISO-7816-4. Szyfrowanie i odszyfrowywanie przy użyciu
51prywatnych kluczy na karcie na razie jest możliwe tylko przy użyciu
1cefa9cb
JB
52kart kompatybilnych z PKCS#16, takich jak FINEID (Finnish Electronic
53IDentity) produkowanych przez Setec.
896b833c 54
55%package devel
1cefa9cb 56Summary: OpenSC development files
ae88f326 57Summary(pl.UTF-8): Pliki dla programistów używających OpenSC
896b833c 58Group: Development/Tools
9f872d80 59Requires: %{name} = %{epoch}:%{version}-%{release}
24aae781 60Requires: libltdl-devel
9f872d80
JB
61Requires: openct-devel
62Requires: openssl-devel
63Requires: pcsc-lite-devel
896b833c 64
65%description devel
1cefa9cb 66OpenSC development files.
896b833c 67
8623b75b
JR
68%description devel -l pl.UTF-8
69Pliki dla programistów używających OpenSC.
896b833c 70
71%package static
1cefa9cb 72Summary: Static OpenSC libraries
ae88f326 73Summary(pl.UTF-8): Bibloteki statyczne OpenSC
896b833c 74Group: Development/Tools
9f872d80 75Requires: %{name}-devel = %{epoch}:%{version}-%{release}
896b833c 76
77%description static
1cefa9cb 78Static OpenSC libraries.
896b833c 79
8623b75b 80%description static -l pl.UTF-8
1cefa9cb
JB
81Statyczne biblioteki OpenSC.
82
543fbe6c 83%package -n browser-plugin-opensc
d6f32863 84Summary: OpenSC Signer plugin for Mozilla
ae88f326 85Summary(pl.UTF-8): Wtyczka OpenSC Signer dla Mozilli
d6f32863 86Group: X11/Applications
9f872d80 87Requires: %{name} = %{epoch}:%{version}-%{release}
543fbe6c 88Requires: browser-plugins(%{_target_base_arch})
d6f32863 89Requires: pinentry-gtk
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
896b833c 103%prep
1cefa9cb 104%setup -q
bf585562 105%patch0 -p1
896b833c 106
107%build
b9c1b601 108touch config.rpath
1cefa9cb 109%{__libtoolize}
8d087e90 110%{__aclocal} -I aclocal
1cefa9cb 111%{__autoconf}
ac174bda 112%{__autoheader}
1cefa9cb 113%{__automake}
d6f32863
JB
114%configure \
115 --with-pin-entry=/usr/bin/pinentry-gtk \
543fbe6c 116 --with-plugin-dir="%{_plugindir}"
896b833c 117
1cefa9cb 118%{__make}
896b833c 119
120%install
121rm -rf $RPM_BUILD_ROOT
543fbe6c 122install -d $RPM_BUILD_ROOT%{_plugindir}
1cefa9cb 123
61f848e8
JB
124%{__make} install \
125 DESTDIR=$RPM_BUILD_ROOT
896b833c 126
61f848e8 127# just install instead of symlinking
543fbe6c
ER
128rm -f $RPM_BUILD_ROOT%{_plugindir}/opensc-signer.so
129mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{_plugindir}
afd37b22 130
61f848e8 131# default config
4bdbfbe7 132install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir}
1eb351c9 133
61f848e8 134# useless (dlopened by *.so)
18e38179 135rm -f $RPM_BUILD_ROOT%{_libdir}/{onepin-opensc,opensc,pkcs11}-*.{a,la} \
8d087e90 136 $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la}
61f848e8 137
896b833c 138%clean
139rm -rf $RPM_BUILD_ROOT
140
1cefa9cb
JB
141%post -p /sbin/ldconfig
142%postun -p /sbin/ldconfig
896b833c 143
543fbe6c
ER
144%triggerin -n browser-plugin-opensc -- mozilla-firefox
145%nsplugin_install -d %{_libdir}/mozilla-firefox/plugins opensc-signer.so
146
147%triggerun -n browser-plugin-opensc -- mozilla-firefox
148%nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins opensc-signer.so
149
150%triggerin -n browser-plugin-opensc -- mozilla
151%nsplugin_install -d %{_libdir}/mozilla/plugins opensc-signer.so
152
153%triggerun -n browser-plugin-opensc -- mozilla
154%nsplugin_uninstall -d %{_libdir}/mozilla/plugins opensc-signer.so
155
156%triggerin -n browser-plugin-opensc -- opera
157%nsplugin_install -d %{_libdir}/opera/plugins opensc-signer.so
158
159%triggerun -n browser-plugin-opensc -- opera
160%nsplugin_uninstall -d %{_libdir}/opera/plugins opensc-signer.so
161
162%triggerin -n browser-plugin-opensc -- konqueror
163%nsplugin_install -d %{_libdir}/kde3/plugins/konqueror opensc-signer.so
164
165%triggerun -n browser-plugin-opensc -- konqueror
166%nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror opensc-signer.so
167
168%triggerin -n browser-plugin-opensc -- seamonkey
169%nsplugin_install -d %{_libdir}/seamonkey/plugins opensc-signer.so
170
171%triggerun -n browser-plugin-opensc -- seamonkey
172%nsplugin_uninstall -d %{_libdir}/seamonkey/plugins opensc-signer.so
173
174# as rpm removes the old obsoleted package files after the triggers
175# are ran, add another trigger to make the links there.
176%triggerpostun -n browser-plugin-opensc -- mozilla-plugin-opensc
177%nsplugin_install -f -d %{_libdir}/mozilla/plugins opensc-signer.so
178
896b833c 179%files
180%defattr(644,root,root,755)
88647e66 181%doc NEWS README doc/ChangeLog doc/{*.{html,css},html/tools.html}
61f848e8 182%attr(755,root,root) %{_bindir}/cardos-info
1cefa9cb 183%attr(755,root,root) %{_bindir}/cryptoflex-tool
8d087e90
JB
184%attr(755,root,root) %{_bindir}/eidenv
185%attr(755,root,root) %{_bindir}/netkey-tool
1cefa9cb
JB
186%attr(755,root,root) %{_bindir}/opensc-explorer
187%attr(755,root,root) %{_bindir}/opensc-tool
88647e66 188%attr(755,root,root) %{_bindir}/piv-tool
61f848e8 189%attr(755,root,root) %{_bindir}/pkcs11-tool
1cefa9cb
JB
190%attr(755,root,root) %{_bindir}/pkcs15-*
191%attr(755,root,root) %{_libdir}/lib*.so.*.*
18e38179 192%attr(755,root,root) %{_libdir}/onepin-opensc-pkcs11.so
2f74c13c 193%attr(755,root,root) %{_libdir}/opensc-pkcs11.so
8d087e90 194%attr(755,root,root) %{_libdir}/pkcs11-spy.so
1cefa9cb 195%dir %{_datadir}/opensc
4bdbfbe7
JB
196%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
197%config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile
92519f5f 198%{_mandir}/man1/cardos-info.1*
61f848e8 199%{_mandir}/man1/cryptoflex-tool.1*
8d087e90 200%{_mandir}/man1/netkey-tool.1*
61f848e8
JB
201%{_mandir}/man1/opensc-explorer.1*
202%{_mandir}/man1/opensc-tool.1*
92519f5f
JB
203%{_mandir}/man1/pkcs11-tool.1*
204%{_mandir}/man1/pkcs15-*.1*
61f848e8 205%{_mandir}/man[57]/*
896b833c 206
207%files devel
208%defattr(644,root,root,755)
8d087e90 209%doc doc/html/api.html
1cefa9cb
JB
210%attr(755,root,root) %{_bindir}/opensc-config
211%attr(755,root,root) %{_libdir}/libopensc.so
212%attr(755,root,root) %{_libdir}/libpkcs15init.so
213%attr(755,root,root) %{_libdir}/libscconf.so
8d087e90
JB
214%{_libdir}/libopensc.la
215%{_libdir}/libpkcs15init.la
216%{_libdir}/libscconf.la
1cefa9cb 217%{_includedir}/opensc
61f848e8
JB
218%{_pkgconfigdir}/*.pc
219%{_mandir}/man1/opensc-config.1*
220%{_mandir}/man3/*
896b833c 221
222%files static
223%defattr(644,root,root,755)
8d087e90
JB
224%{_libdir}/libopensc.a
225%{_libdir}/libpkcs15init.a
226%{_libdir}/libscconf.a
d6f32863 227
543fbe6c 228%files -n browser-plugin-opensc
d6f32863 229%defattr(644,root,root,755)
543fbe6c 230%attr(755,root,root) %{_plugindir}/opensc-signer.so
This page took 0.087214 seconds and 4 git commands to generate.