Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > by-pkgid > c0b66197b747c74fc4303fd6e6317bba > files > 5

opensc-0.11.1-2mdv2007.0.src.rpm

# THIS PACKAGE IS HOSTED AT MANDRIVA SVN
# PLEASE DO NOT UPLOAD DIRECTLY BEFORE COMMIT

%define	name	opensc
%define version 0.11.1
%define release %mkrel 2

%define major 2
%define libname %mklibname %{name}

Summary:	Library for accessing SmartCard devices
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		System/Kernel and hardware
URL:		http://www.opensc.org/
Source:		http://www.opensc.org/files/%{name}-%{version}.tar.gz
Source1:	oberthur.profile
# based on http://keitin.net/jarpatus/projects/usbtoken/opensc.readpin.patch
Patch:		opensc-0.10.0-pinstdin.patch
# http://www.opensc-project.org/pipermail/opensc-user/2006-June/001058.html
# http://www.opensc-project.org/opensc/changeset/2977
# http://www.opensc-project.org/opensc/changeset/3030
Patch1:		opensc-0.11.1-oberthurfix.patch
BuildRequires:	flex
BuildRequires:	X11-devel
BuildRequires:	libopenct-devel
BuildRequires:	libxslt-proc
BuildRequires:	readline-devel
BuildRequires:	termcap-devel
# opensc 0.10.0 requires at least pcsc-lite 1.2.9
BuildRequires:  libpcsclite-devel >= 1.2.9
BuildRequires:	libassuan-devel
BuildRequires:	libltdl-devel
BuildRequires:	openssl-devel
Requires:	pinentry
Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
%{name} is a library for accessing smart card devices using PC/SC Lite
middleware package. It is also the core library of the OpenSC project.
Basic functionality (e.g. SELECT FILE, READ BINARY) should work on any
ISO 7816-4 compatible smart card. Encryption and decryption using private
keys on the SmartCard is at the moment possible only with PKCS #15
compatible cards.


%package -n	%{libname}%{major}
Summary:	Library for accessing SmartCard devices
Group:		System/Libraries
License:	LGPL
Provides: 	%{libname} = %{version}-%{release}
# because we moved the config file and some modules from the %{name} package
# to the %{libname}%{major} package
Conflicts:	%{name} < 0.10.0-1mdk

%description -n	%{libname}%{major}
%{name} is a library for accessing smart card devices using PC/SC Lite
middleware package. It is also the core library of the OpenSC project.
Basic functionality (e.g. SELECT FILE, READ BINARY) should work on any
ISO 7816-4 compatible smart card. Encryption and decryption using private
keys on the SmartCard is at the moment possible only with PKCS #15
compatible cards.


%package -n	%{libname}%{major}-devel
Summary:	Development related files for %{name}
Group:		Development/C
License:	LGPL
Provides: 	%{libname}-devel = %{version}-%{release}
Provides: 	%{name}-devel = %{version}-%{release}
Requires:	%{libname}%{major} = %{version}
Conflicts:	%{libname}0-devel

%description -n	%{libname}%{major}-devel
%{name} is a library for accessing smart card devices using PC/SC Lite
middleware package. It is also the core library of the OpenSC project.
Basic functionality (e.g. SELECT FILE, READ BINARY) should work on any
ISO 7816-4 compatible smart card. Encryption and decryption using private
keys on the SmartCard is at the moment possible only with PKCS #15
compatible cards.

This package contains all necessary files to develop or compile any
applications or libraries that use %{name}. 


%package -n	mozilla-plugin-%{name}
Summary:	OpenSC Mozilla plugin
Group:		Networking/WWW
# could be just opensc-pkcs11.so instead of %{libname}%{major}, but
# the opensc-pkcs11.so object doesn't have a versioned soname so we
# can't risk using it
Requires:	%{libname}%{major} = %{version}
Requires:	mozilla-firefox

%description -n	mozilla-plugin-%{name}
This mozilla plugins handles web signatures using OpenSC
smartcard library.

%prep
%setup -q
%patch -p1 -b .stdin
%patch1 -p0 -b .oberthurfix
install -m 0644 %{_sourcedir}/oberthur.profile oberthur-alternate.profile

%build
%configure2_5x \
	--with-pin-entry=%{_bindir}/pinentry

%make

%install
rm -rf %{buildroot}
%makeinstall_std

# install conf file
mkdir -p %{buildroot}%{_sysconfdir}
install -m 0644 etc/opensc.conf %{buildroot}%{_sysconfdir}

pushd %{buildroot}

# move mozilla plugin to correct place
mkdir -p .%{_libdir}/mozilla/plugins
mv .%{_libdir}/opensc-signer.so .%{_libdir}/mozilla/plugins/
rm -f .%{_libdir}/opensc-signer.*

popd

# remove useless files
rm -f %{buildroot}%{_libdir}/pkcs11-spy.a \
      %{buildroot}%{_libdir}/opensc-pkcs11.a

%multiarch_binaries %{buildroot}/%{_bindir}/%{name}-config

%post
%_install_info %{name}.info

%preun
%_remove_install_info %{name}.info

%post -n %{libname}%{major} -p /sbin/ldconfig
%postun -n %{libname}%{major} -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc NEWS doc/*.css doc/*.html README
%doc doc/README oberthur-alternate.profile
%exclude %{_mandir}/man1/opensc-config*
%{_bindir}/cardos-info
%{_bindir}/cryptoflex-tool
%{_bindir}/eidenv
%{_bindir}/piv-tool
%{_bindir}/netkey-tool
%{_bindir}/opensc-explorer
%{_bindir}/opensc-tool
%{_bindir}/pkcs11-tool
%{_bindir}/pkcs15-crypt
%{_bindir}/pkcs15-init
%{_bindir}/pkcs15-tool
%{_datadir}/%{name}
%{_libdir}/pkcs11-spy.*
%{_mandir}/man1/*
%{_mandir}/man5/*

%files -n %{libname}%{major}
%defattr(-,root,root)
%doc COPYING
%config(noreplace) %{_sysconfdir}/opensc.conf
%{_libdir}/opensc-pkcs11.*
%{_libdir}/lib*.so.*

%files -n %{libname}%{major}-devel
%defattr(-,root,root)
%doc doc/ChangeLog
%multiarch %{multiarch_bindir}/opensc-config
%{_bindir}/opensc-config
%{_libdir}/lib*.so
%{_libdir}/lib*.a
%{_libdir}/lib*.la
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*
%{_mandir}/man1/opensc-config*
%{_mandir}/man3/*

%files -n mozilla-plugin-%{name}
%defattr(-,root,root)
%{_libdir}/mozilla/plugins/*.so



%changelog
* Fri Sep 29 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-09-29 20:05:45 (62765)
- fixed oberthur support (#26248)

* Wed Jun 07 2006 Helio Chissini de Castro <helio@mandriva.com>
+ 2006-06-07 21:57:49 (36790)
- New upstream version 0.11.1

* Wed Jun 07 2006 Helio Chissini de Castro <helio@mandriva.com>
+ 2006-06-07 19:37:01 (36783)
- Raise epoch and recompile to allow x86_64 be up-to-date too

* Wed Jun 07 2006 Helio Chissini de Castro <helio@mandriva.com>
+ 2006-06-07 19:30:09 (36781)
- import opensc-0.10.1-3mdv2007.0

* Mon May 29 2006 Andreas Hasenack <andreas@mandriva.com> 0.10.1-3mdk
- make the mozilla plugin require mozilla-firefox, and not mozila as it was
  requiring in 1mdk. The plugin package needs a mozilla-type browser

* Thu Apr 06 2006 Götz Waschk <waschk@mandriva.org> 0.10.1-2mdk
- don't depend on mozilla

* Thu Mar 09 2006 ANdreas Hasenack <andreas@mandriva.com> 0.10.1-1mdk
- updated to version 0.10.1

* Thu Jan 05 2006 Oden Eriksson <oeriksson@mandriva.com> 0.10.0-7mdk
- rebuilt to fix one /lib6464 issue in openssl-devel

* Fri Dec 09 2005 Andreas Hasenack <andreas@mandriva.com> 0.10.0-6mdk
- added alternative oberthur profile to %doc

* Wed Dec 07 2005 Andreas Hasenack <andreas@mandriva.com> 0.10.0-5mdk
- added patch for pkcs15-crypt to accept the PIN on stdin

* Tue Dec 06 2005 Andreas Hasenack <andreas@mandriva.com> 0.10.0-4mdk
- added openssl-devel to buildrequires (thanks Stefan)

* Sat Dec 03 2005 Andreas Hasenack <andreas@mandriva.com> 0.10.0-3mdk
- rebuild with pcsc-lite support
- buildrequires libpcsclite-devel >= 1.2.9 (or else opensc won't build with pcsc
  support)
- dropped openldap-devel buildrequires since it is not used anymore

* Thu Nov 24 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.10.0-2mdk
- add BuildRequires: libltdl-devel

* Wed Nov 23 2005 Andreas Hasenack <andreas@mandriva.com> 0.10.0-1mdk
- updated to version 0.10.0 (Closes: #17883)
- removed parallel build patch, no longer necessary
- removed gcc4 patch, no longer necessary
- pam module has been removed from opensc version 0.10.0
- added opensc.conf file
- we don't have man7 anymore
- no more libscam
- more docs
- no more /usr/lib/pkcs11
- removed buildrequires for automake1.7, no longer needed
- major is 2 now, added appropriate conflicts
- moved config file and main opensc-pkcs11 module to the library package
- changed mozilla plugin requires from the main package (opensc) to just the
  library package
- fixed %multiarch usage for opensc-config

* Mon Nov 14 2005 Oden Eriksson <oeriksson@mandriva.com> 0.8.1-9mdk
- rebuilt against openssl-0.9.8a

* Tue Aug 30 2005 Buchan Milne <bgmilne@linux-mandrake.com> 0.8.1-8mdk
- Rebuild for libldap2.3

* Sun Aug 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.8.1-7mdk
- added one gcc4 patch (andreas)

* Mon Feb 07 2005 Buchan Milne <bgmilne@linux-mandrake.com> 0.8.1-6mdk
- rebuild for ldap2.2_7
- fix multiarch

* Sat Jan 22 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 0.8.1-5mdk
- rebuild for new readline

* Thu Dec 02 2004 Abel Cheung <deaddog@mandrake.org> 0.8.1-4mdk
- Fix BuildRequires

* Thu Aug 19 2004 Abel Cheung <deaddog@deaddog.org> 0.8.1-3mdk
- Rebuild
- Enable libtoolize
- P0: Fix parallel build and compatibility with automake > 1.5

* Mon Feb 09 2004 Abel Cheung <deaddog@deaddog.org> 0.8.1-2mdk
- Fix directory ownership

* Tue Oct 14 2003 Abel Cheung <deaddog@deaddog.org> 0.8.1-1mdk
- First Mandrake package