%def_disable static Name: openct Version: 0.6.15 Release: alt2 Group: System/Servers Summary: OpenCT Library for Smart Card Readers License: LGPL Url: http://www.opensc-project.org/ Packager: Andriy Stepanov Requires: lib%name = %version-%release Requires: hal Source0: %name-%version.tar Source1: readme.alt Source10: openct.startup Source11: openct.hald Source22: openct-policy.fdi Patch70: %name-%version-%release-super.patch # Automatically added by buildreq on Tue Sep 02 2008 BuildRequires: doxygen gcc-c++ gcc-fortran glibc-devel-static libltdl-devel subversion wget xsltproc BuildRequires: libpcsclite-devel libusb-compat-devel %if_enabled static BuildRequires: libstdc++-devel-static libpcsclite-devel-static libusb-devel-static %endif %define ifddir %(pkg-config libpcsclite --variable=usbdropdir) %description OpenCT implements drivers for several smart card readers. It comes as driver in ifdhandler format for PC/SC-Lite, as CT-API driver, or as a small and lean middleware, so applications can use it with minimal overhead. OpenCT also has a primitive mechanism to export smart card readers to remote machines via tcp/ip. %package -n lib%name Group: System/Libraries Summary: Library for accessing Smartcards %description -n lib%name These are the shared libraries for the smartcard terminal middleware OpenCT. If you want to compile applications using this library, you also need the %name-devel package. %package -n lib%name-devel Requires: lib%name = %version Group: System/Libraries Summary: Supplementary files for developing %name applications Requires: lib%name = %version-%release %description -n lib%name-devel Header files and documentation for %name. %package -n lib%name-devel-static Requires: lib%name = %version Group: System/Libraries Summary: Supplementary files for developing %name applications Requires: lib%name-devel = %version-%release %description -n lib%name-devel-static static libraries for %name. %package -n pcsc-openct License: BSD 3-Clause; LGPL v2.1 or later Group: System/Libraries Summary: PC/SC IFD Handler for OpenCT Smart Card Drivers %description -n pcsc-openct PC/SC Connector for OpenCT. It allows to use any of OpenCT Smart Card drivers with the PCSC-Lite daemon from the pcsc-lite package. OpenCT is a set of library and tools to talk to smart card readers. OpenCT is used by the OpenSC Smart Card library. %prep %setup -q #%patch70 -p1 %build %autoreconf %add_optflags %optflags_shared export CFLAGS="%optflags" ## # Run /usr/sbin/openct-control as root, don't use --enable-non-privileged %configure \ %{subst_enable static} \ %{subst_enable debug} \ --enable-pcsc \ --with-bundle=%{ifddir}\ --with-ifddir=%{ifddir} \ --localstatedir=%{_var} \ --enable-doc\ --enable-api-doc\ --enable-usb\ --docdir=%_docdir/%name-%version %make %make -k check %install %make install DESTDIR=%buildroot ## # Create local state dir: # install -d %{buildroot}/%{_var}/run/openct ## # Install init script: # install -d %buildroot/%_initdir install -m 755 %SOURCE10 %buildroot/%_initdir/%name ## # Prepare configs: # # install %_builddir/%name-%version/%_sysconfdir/openct.conf %buildroot/%_sysconfdir/ ## # HAL stuff # Don't use udev or hotplug # # http://www.nabble.com/-PATCH--openct:-HAL-FDI-update-and-basic-PolicyKit-support-td22852689.html # http://www.opensc-project.org/openct/browser/trunk/etc # mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/information/10freedesktop # Convert hotplug stuff to hal { cat <<-EOF EOF grep -v '^#' etc/openct.usermap | while read foo match vendor product baz; do if [ "$match" = "0x0003" ]; then cat <<-EOF true EOF fi done cat <<-EOF true smart_card_reader @info.parent:linux.device_file smart_card_reader EOF } > $RPM_BUILD_ROOT%{_datadir}/hal/fdi/information/10freedesktop/10-usb-openct.fdi mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/10osvendor ## # Copy policy install %{SOURCE22} $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/10osvendor/10-usb-openct.fdi # SOURCE11 is hald-addon-openct mkdir -p %buildroot/usr/libexec/hal # use own install %{SOURCE11} %buildroot/usr/libexec/hal/hald-addon-openct # or use standard # install %_builddir/%name-%version/%_sysconfdir/openct.hald %buildroot/usr/libexec/hal/hald-addon-openct ## # /etc samples rm -rf etc_samples cp -ar etc etc_samples rm -f etc_samples/Makefile* etc_samples/*.in # And remove pointless .la file rm $RPM_BUILD_ROOT%{_libdir}/libopenct.la rm $RPM_BUILD_ROOT%{_libdir}/openct-ifd.la %post %post_service %name %preun %preun_service %name %files # %{_docdir}/%{name}-%{version}/* %_man1dir/*.* %_bindir/* %_sbindir/* %config(noreplace) %_sysconfdir/openct.conf %{_datadir}/hal/fdi/information/10freedesktop/10-usb-openct.fdi %{_datadir}/hal/fdi/policy/10osvendor/10-usb-openct.fdi /usr/libexec/hal/hald-addon-openct %{_initrddir}/%{name} # copy documentation from %_builddir %doc TODO LGPL-2.1 doc/nonpersistent/ChangeLog etc_samples %dir %{_var}/run/openct %files -n lib%name %_libdir/*.so.* %files -n lib%name-devel %_libdir/*.so %{_libdir}/pkgconfig/libopenct.pc %dir %_includedir/%name %_includedir/%name/*.h # %{_docdir}/%{name}-%{version}/api %if_enabled static %files -n lib%name-devel-static %_libdir/*.a %endif %files -n pcsc-openct %defattr(-,root,root) %{ifddir}/openct-ifd.bundle %changelog * Wed Apr 22 2009 Andriy Stepanov 0.6.15-alt2 - Cleanup * Tue Sep 02 2008 Andriy Stepanov 0.6.15-alt1 - Up to new upstream version * Tue Oct 30 2007 Andriy Stepanov 0.6.14-alt3 - Apply patch from ruToken. * Tue Oct 30 2007 Andriy Stepanov 0.6.14-alt2 - Apply patch from ruToken. * Thu Aug 02 2007 Andriy Stepanov 0.6.12-alt1 - Switch to new version. Add patch for www.rutoken.ru devices. Add HAL support. * Tue Dec 26 2006 Sergey V Turchin 0.6.11-alt1 - new version * Tue Sep 26 2006 Sergey V Turchin 0.6.9-alt1 - new version * Mon Jul 03 2006 Sergey V Turchin 0.6.8-alt1 - new version * Mon Oct 11 2004 Sergey V Turchin 0.5.0-alt2 - rebuild * Tue Apr 06 2004 Sergey V Turchin 0.5.0-alt1 - new version * Thu Nov 27 2003 Sergey V Turchin 0.1.0-alt2 - remove *.la * Mon Nov 24 2003 Sergey V Turchin 0.1.0-alt1 - build for ALT * Fri Nov 14 2003 Florin 0.1.0-2mdk - rebuild * Wed Nov 12 2003 Florin 0.1.0-1mdk - first mdk release