X-Git-Url: http://git.pld-linux.org/?p=packages%2Fopensc.git;a=blobdiff_plain;f=opensc.spec;h=66505fe374aa1d5ca758f0cd2941c60c1b8d5e5d;hp=0cfec2e1bba163d034b5f8bb28899c575b922766;hb=b9c1b601789fccab89abca00de7bdb0d9d5c7974;hpb=61f848e8b6401381d18aae3e4aa6529babde0da4 diff --git a/opensc.spec b/opensc.spec index 0cfec2e..66505fe 100644 --- a/opensc.spec +++ b/opensc.spec @@ -1,29 +1,38 @@ Summary: OpenSC library - for accessing SmartCard devices using PC/SC Lite Summary(pl): Biblioteka OpenSC - do korzystania z kart procesorowych przy u¿yciu PC/SC Lite Name: opensc -Version: 0.8.0 -Release: 1 +Version: 0.11.1 +Release: 2 +Epoch: 0 License: LGPL Group: Applications -Source0: http://www.opensc.org/files/%{name}-%{version}.tar.gz -# Source0-md5: 46bb22935040816a0d741b5f76ed4b81 -Patch0: %{name}-nolibs.patch -Patch1: %{name}-libdir.patch -URL: http://www.opensc.org/ +Source0: http://www.opensc-project.org/files/opensc/%{name}-%{version}.tar.gz +# Source0-md5: 94ce00a6bda38fac10ab06f5d5d1a8c3 +Patch0: %{name}-explorer-debug.patch +Patch1: %{name}-libassuan.patch +URL: http://www.opensc-project.org/ BuildRequires: autoconf >= 2.52 BuildRequires: automake -BuildRequires: libassuan-devel +BuildRequires: libassuan-devel >= 1:0.6.0 +BuildRequires: libltdl-devel BuildRequires: libtool >= 1:1.4.2-9 +BuildRequires: openct-devel BuildRequires: openldap-devel -BuildRequires: openssl-devel -BuildRequires: pam-devel +BuildRequires: openssl-devel >= 0.9.7d BuildRequires: pcsc-lite-devel +BuildRequires: pkgconfig >= 1:0.9.0 BuildRequires: readline-devel +BuildRequires: rpmbuild(macros) >= 1.236 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # datadir is used for config files and (editable) profiles -%define _datadir %{_sysconfdir} -%define mozplugindir /usr/lib/mozilla/plugins +%define _datadir /etc +%define _sysconfdir /etc/opensc +%define _plugindir %{_libdir}/browser-plugins + +# TODO: galeon and skipstone. +# use macro, otherwise extra LF inserted along with the ifarch +%define browsers mozilla, mozilla-firefox, konqueror, opera, seamonkey %description libopensc is a library for accessing SmartCard devices using PC/SC @@ -48,7 +57,11 @@ IDentity) produkowanych przez Setec. Summary: OpenSC development files Summary(pl): Pliki dla programistów u¿ywaj±cych OpenSC Group: Development/Tools -Requires: %{name} = %{version} +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: libltdl-devel +Requires: openct-devel +Requires: openssl-devel +Requires: pcsc-lite-devel %description devel OpenSC development files. @@ -60,7 +73,7 @@ Pliki dla programist Summary: Static OpenSC libraries Summary(pl): Bibloteki statyczne OpenSC Group: Development/Tools -Requires: %{name}-devel = %{version} +Requires: %{name}-devel = %{epoch}:%{version}-%{release} %description static Static OpenSC libraries. @@ -68,33 +81,25 @@ Static OpenSC libraries. %description static -l pl Statyczne biblioteki OpenSC. -%package -n pam_opensc -Summary: OpenSC module for PAM -Summary(pl): Modu³ PAM OpenSC -License: GPL -Group: Base -Requires: %{name} = %{version} - -%description -n pam_opensc -OpenSC module for PAM. - -%description -n pam_opensc -l pl -Modu³ PAM OpenSC. - -%package -n mozilla-plugin-opensc +%package -n browser-plugin-opensc Summary: OpenSC Signer plugin for Mozilla Summary(pl): Wtyczka OpenSC Signer dla Mozilli -# libassuan is GPL -License: GPL Group: X11/Applications -Requires: %{name} = %{version} +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: browser-plugins(%{_target_base_arch}) Requires: pinentry-gtk +Provides: mozilla-plugin-opensc +Obsoletes: mozilla-plugin-opensc + +%description -n browser-plugin-opensc +OpenSC Signer browser plugin. -%description -n mozilla-plugin-opensc -OpenSC Signer plugin for Mozilla. +Supported browsers: %{browsers}. -%description -n mozilla-plugin-opensc -l pl -Wtyczka OpenSC Signer dla Mozilli. +%description -n browser-plugin-opensc -l pl +Wtyczka OpenSC Signer dla przegl±darek. + +Obs³ugiwane przegl±darki: %{browsers}. %prep %setup -q @@ -102,39 +107,35 @@ Wtyczka OpenSC Signer dla Mozilli. %patch1 -p1 %build +touch config.rpath %{__libtoolize} -%{__aclocal} +%{__aclocal} -I aclocal %{__autoconf} +%{__autoheader} %{__automake} %configure \ --with-pin-entry=/usr/bin/pinentry-gtk \ - --with-plugin-dir="%{mozplugindir}" + --with-plugin-dir="%{_plugindir}" %{__make} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{mozplugindir} +install -d $RPM_BUILD_ROOT%{_plugindir} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/lib -mv -f $RPM_BUILD_ROOT%{_libdir}/security $RPM_BUILD_ROOT/lib - # just install instead of symlinking -rm -f $RPM_BUILD_ROOT%{mozplugindir}/opensc-signer.so -mv -f $RPM_BUILD_ROOT%{_libdir}/opensc/opensc-signer.so $RPM_BUILD_ROOT%{mozplugindir}/plugins +rm -f $RPM_BUILD_ROOT%{_plugindir}/opensc-signer.so +mv -f $RPM_BUILD_ROOT%{_libdir}/opensc-signer.so $RPM_BUILD_ROOT%{_plugindir} # default config -mv -f $RPM_BUILD_ROOT%{_datadir}/opensc/opensc.conf{.example,} -mv -f $RPM_BUILD_ROOT%{_datadir}/opensc/scldap.conf{.example,} +install etc/opensc.conf $RPM_BUILD_ROOT%{_sysconfdir} # useless (dlopened by *.so) -rm -f $RPM_BUILD_ROOT%{_libdir}/libscam.{a,la} \ - $RPM_BUILD_ROOT%{_libdir}/opensc/opensc-signer.{a,la} \ - $RPM_BUILD_ROOT%{_libdir}/pkcs11/opensc-pkcs11.{a,la} \ - $RPM_BUILD_ROOT/lib/security/pam_opensc.{a,la} +rm -f $RPM_BUILD_ROOT%{_libdir}/{opensc,pkcs11}-*.{a,la} \ + $RPM_BUILD_ROOT%{_libdir}/opensc/*.{a,la} %clean rm -rf $RPM_BUILD_ROOT @@ -142,36 +143,78 @@ rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%triggerin -n browser-plugin-opensc -- mozilla-firefox +%nsplugin_install -d %{_libdir}/mozilla-firefox/plugins opensc-signer.so + +%triggerun -n browser-plugin-opensc -- mozilla-firefox +%nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins opensc-signer.so + +%triggerin -n browser-plugin-opensc -- mozilla +%nsplugin_install -d %{_libdir}/mozilla/plugins opensc-signer.so + +%triggerun -n browser-plugin-opensc -- mozilla +%nsplugin_uninstall -d %{_libdir}/mozilla/plugins opensc-signer.so + +%triggerin -n browser-plugin-opensc -- opera +%nsplugin_install -d %{_libdir}/opera/plugins opensc-signer.so + +%triggerun -n browser-plugin-opensc -- opera +%nsplugin_uninstall -d %{_libdir}/opera/plugins opensc-signer.so + +%triggerin -n browser-plugin-opensc -- konqueror +%nsplugin_install -d %{_libdir}/kde3/plugins/konqueror opensc-signer.so + +%triggerun -n browser-plugin-opensc -- konqueror +%nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror opensc-signer.so + +%triggerin -n browser-plugin-opensc -- seamonkey +%nsplugin_install -d %{_libdir}/seamonkey/plugins opensc-signer.so + +%triggerun -n browser-plugin-opensc -- seamonkey +%nsplugin_uninstall -d %{_libdir}/seamonkey/plugins opensc-signer.so + +# as rpm removes the old obsoleted package files after the triggers +# are ran, add another trigger to make the links there. +%triggerpostun -n browser-plugin-opensc -- mozilla-plugin-opensc +%nsplugin_install -f -d %{_libdir}/mozilla/plugins opensc-signer.so + %files %defattr(644,root,root,755) -%doc ANNOUNCE ChangeLog NEWS docs/{pkcs-15v1_1.asn,opensc.{html,css}} +%doc NEWS README doc/ChangeLog doc/{*.{html,css},html/tools.html} %attr(755,root,root) %{_bindir}/cardos-info %attr(755,root,root) %{_bindir}/cryptoflex-tool +%attr(755,root,root) %{_bindir}/eidenv +%attr(755,root,root) %{_bindir}/netkey-tool %attr(755,root,root) %{_bindir}/opensc-explorer %attr(755,root,root) %{_bindir}/opensc-tool +%attr(755,root,root) %{_bindir}/piv-tool %attr(755,root,root) %{_bindir}/pkcs11-tool %attr(755,root,root) %{_bindir}/pkcs15-* %attr(755,root,root) %{_libdir}/lib*.so.*.* -%attr(755,root,root) %{_libdir}/libscam.so -%dir %{_libdir}/pkcs11 -%attr(755,root,root) %{_libdir}/pkcs11/opensc-pkcs11.so +%attr(755,root,root) %{_libdir}/opensc-pkcs11.so +%attr(755,root,root) %{_libdir}/pkcs11-spy.so %dir %{_datadir}/opensc -%config(noreplace) %verify(not size mtime md5) %{_datadir}/opensc/*.conf -%config(noreplace) %verify(not size mtime md5) %{_datadir}/opensc/*.profile +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf +%config(noreplace) %verify(not md5 mtime size) %{_datadir}/opensc/*.profile +%{_mandir}/man1/cardos-info.1* %{_mandir}/man1/cryptoflex-tool.1* +%{_mandir}/man1/netkey-tool.1* %{_mandir}/man1/opensc-explorer.1* %{_mandir}/man1/opensc-tool.1* -%{_mandir}/man1/pkcs15* +%{_mandir}/man1/pkcs11-tool.1* +%{_mandir}/man1/pkcs15-*.1* %{_mandir}/man[57]/* %files devel %defattr(644,root,root,755) +%doc doc/html/api.html %attr(755,root,root) %{_bindir}/opensc-config %attr(755,root,root) %{_libdir}/libopensc.so %attr(755,root,root) %{_libdir}/libpkcs15init.so %attr(755,root,root) %{_libdir}/libscconf.so -%attr(755,root,root) %{_libdir}/libscldap.so -%{_libdir}/lib*.la +%{_libdir}/libopensc.la +%{_libdir}/libpkcs15init.la +%{_libdir}/libscconf.la %{_includedir}/opensc %{_pkgconfigdir}/*.pc %{_mandir}/man1/opensc-config.1* @@ -179,12 +222,10 @@ rm -rf $RPM_BUILD_ROOT %files static %defattr(644,root,root,755) -%{_libdir}/lib*.a - -%files -n pam_opensc -%defattr(644,root,root,755) -%attr(755,root,root) /lib/security/pam_opensc.so +%{_libdir}/libopensc.a +%{_libdir}/libpkcs15init.a +%{_libdir}/libscconf.a -%files -n mozilla-plugin-opensc +%files -n browser-plugin-opensc %defattr(644,root,root,755) -%attr(755,root,root) %{mozplugindir}/opensc-signer.so +%attr(755,root,root) %{_plugindir}/opensc-signer.so