%define version 0.8.1 %define release 2mdk %define major 0 %define libname %mklibname %{name} Summary: Library for accessing SmartCard devices Name: opensc 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 Buildroot: %{_tmppath}/%{name}-%{version}-buildroot BuildRequires: flex BuildRequires: libldap2-devel BuildRequires: libopenct-devel BuildRequires: libxslt-proc # it misdetect openssl, requiring libcrypto.a BuildRequires: openssl-static-devel >= 0.9.7a BuildRequires: pam-devel BuildRequires: readline-devel BuildRequires: termcap-devel BuildRequires: pcsc-lite-devel BuildRequires: libassuan-devel Requires: pinentry %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} %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} %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 pam_%{name} Summary: OpenSC PAM module Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description -n pam_%{name} This package contains PAM authentication module of OpenSC. %package -n mozilla-plugin-%{name} Summary: OpenSC Mozilla plugin Group: Networking/WWW Requires: %{name} = %{version}-%{release} Requires: mozilla %description -n mozilla-plugin-%{name} This mozilla plugins handles web signatures using OpenSC smartcard library. %prep %setup -q %build # mdk doesn't have libtool 1.5 yet %define __libtoolize /bin/true %configure2_5x \ --with-pin-entry=%{_bindir}/pinentry # won't compile with 2.6 kernel header # --enable-usbtoken # paralle make broken make %install rm -rf %{buildroot} %makeinstall_std pushd %{buildroot} # move pam stuff to correct place mkdir -p %{_lib}/security mv .%{_libdir}/security/pam*.so %{_lib}/security/ rm -rf .%{_libdir}/security # move mozilla plugin to correct place mkdir -p .%{_libdir}/mozilla/plugins mv .%{_libdir}/opensc/opensc-signer.so .%{_libdir}/mozilla/plugins/ popd # remove useless files rm -f %{buildroot}%{_libdir}/pkcs11/*.{a,la} \ %{buildroot}%{_libdir}/libscam.{a,la} \ %{buildroot}%{_libdir}/opensc/*.{a,la} %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 ANNOUNCE AUTHORS NEWS docs/*.css docs/opensc.html %doc docs/pkcs-15v1_1.asn etc/*.example %exclude %{_bindir}/opensc-config %exclude %{_mandir}/man1/opensc-config* %{_bindir}/* #{_sbindir}/* %{_datadir}/%{name} %{_libdir}/pkcs11 %{_libdir}/opensc %{_mandir}/man1/* %{_mandir}/man5/* %{_mandir}/man7/* %files -n %{libname}%{major} %defattr(-,root,root) %doc COPYING %{_libdir}/lib*.so.* %files -n %{libname}%{major}-devel %defattr(-,root,root) %doc ChangeLog CodingStyle %exclude %{_libdir}/libscam.so %{_bindir}/opensc-config %{_libdir}/lib*.so %{_libdir}/lib*.a %{_libdir}/lib*.la %{_libdir}/pkgconfig/*.pc %{_includedir}/* %{_mandir}/man1/opensc-config* %{_mandir}/man3/* %files -n pam_%{name} %defattr(-,root,root) /%{_lib}/security/pam*.so %{_libdir}/libscam.so %files -n mozilla-plugin-%{name} %defattr(-,root,root) %{_libdir}/mozilla/plugins/*.so %changelog * 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