%define bundledir %(pkg-config libpcsclite --variable=usbdropdir) Name: libopenct Version: 0.6.20 Release: 2mamba Summary: OpenCT is a library for accessing smart card terminals Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Aleph0 URL: http://www.opensc.org/ Source0: http://www.opensc-project.org/files/openct/openct-%{version}.tar.gz Source1: %{name}.initscript Source2: %{name}.sysconfig License: LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libltdl-devel BuildRequires: libpcsclite-devel BuildRequires: libusb0-devel ## AUTOBUILDREQ-END BuildRequires: flex BuildRoot: %{_tmppath}/%{name}-%{version}-root %description OpenCT is a library for accessing smart card terminals. It provides a rich set of functions for driver writers, protocol drivers for T=0 and T=1, serial and USB functionality, including USB hotplugging. OpenCT provides a native OpenCT, CT-API and PC/SC Lite IFD interface with an OpenCT ifdhandler resource manager. %package devel Summary: Devel package for %{name} Group: Development/Libraries Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description devel OpenCT is a library for accessing smart card terminals. This package contains static libraries and header files need for development. %prep %setup -q -n openct-%{version} %build %configure \ --disable-static \ --with-bundle=%{bundledir} \ --enable-pcsc \ --enable-usb \ --enable-api-doc \ --with-udev=/lib/udev %make %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} install -dm 755 %{buildroot}/lib/udev %makeinstall install -d .m 755 %{buildroot}%{_libdir}/ctapi mv %{buildroot}%{_libdir}/{libopenctapi.la,libopenctapi.so,ctapi} install -D -m 644 etc/openct.udev \ %{buildroot}%{_sysconfdir}/udev/rules.d/60-openct.rules #install -D -m 644 etc/openct.conf %{buildroot}%{_sysconfdir}/reader.conf.d/openct.conf #so=$(find %{buildroot}%{bundledir} -name \*.so | sed "s|^%{buildroot}||") #sed -i -e "s|\\(LIBPATH\\s*\\).*|\\1$so|" etc/reader.conf.d/reader.conf #install -Dpm 644 etc/reader.conf \ # %{buildroot}%{_sysconfdir}/reader.conf.d/%{name}.conf install -d -m 755 %{buildroot}%{_localstatedir}/run/openct touch %{buildroot}%{_localstatedir}/run/openct/status chmod 644 %{buildroot}%{_localstatedir}/run/openct/status install -D -m 755 %{S:1} %{buildroot}%{_initrddir}/openct install -D -m 644 %{S:2} %{buildroot}%{_sysconfdir}/sysconfig/openct %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %post if [ $1 -eq 1 ]; then /sbin/ldconfig /sbin/chkconfig --add openct fi touch %{_localstatedir}/run/openct/status exit 0 %preun if [ $1 -eq 0 ]; then /sbin/chkconfig --del openct service openct stop 2>/dev/null fi exit 0 %postun if [ $1 -eq 1 ]; then service openct condrestart fi /sbin/ldconfig exit 0 %files %defattr(-,root,root) %{_bindir}/openct-tool %{_sbindir}/ifdhandler %{_sbindir}/ifdproxy %{_sbindir}/openct-control %{_libdir}/libopenct.so.* /lib/udev/openct_pcmcia /lib/udev/openct_serial /lib/udev/openct_usb %{_initrddir}/openct %config(noreplace) %{_sysconfdir}/openct.conf #%config(noreplace) %{_sysconfdir}/reader.conf.d/libopenct.conf #%config(noreplace) %{_sysconfdir}/reader.conf.d/openct.conf %config(noreplace) %{_sysconfdir}/sysconfig/openct %config(noreplace) %{_sysconfdir}/udev/rules.d/*openct.rules %{bundledir}/openct-ifd.bundle/ %{_mandir}/man1/openct-tool.* %dir %{_localstatedir}/run/openct/ %ghost %{_localstatedir}/run/openct/status %doc LGPL-2.1 NEWS TODO %files devel %defattr(-,root,root) %{_libdir}/libopenct.la %{_libdir}/libopenct.so %{_libdir}/openct-ifd.la %{_libdir}/openct-ifd.so %{_libdir}/ctapi/libopenctapi.la %{_libdir}/ctapi/libopenctapi.so #%{_libdir}/openct-ifd.la #%{_libdir}/openct-ifd.so %{_includedir}/openct %{_libdir}/pkgconfig/libopenct.pc %{_docdir}/openct/api/* %{_docdir}/openct/NEWS %{_docdir}/openct/README %changelog * Mon Dec 29 2014 Automatic Build System 0.6.20-2mamba - automatic rebuild by autodist * Tue Apr 27 2010 Automatic Build System 0.6.20-1mamba - automatic update by autodist * Thu Jan 28 2010 Silvan Calarco 0.6.19-2mamba - touch /var/run/openct/status on install - don't install build time prepared readers.d/libopenct.conf to prevent problems with pcscd initscript using update-reader.conf - fix udev libexec files installation and rules configuration - fixed bundledir configuration * Wed Jan 20 2010 Automatic Build System 0.6.19-1mamba - automatic update by autodist * Thu Oct 01 2009 Automatic Build System 0.6.18-1mamba - automatic update by autodist * Fri Jul 31 2009 Automatic Build System 0.6.17-1mamba - automatic update by autodist * Sat May 23 2009 Automatic Build System 0.6.16-1mamba - automatic update by autodist * Mon Dec 08 2008 Silvan Calarco 0.6.15-1mamba - automatic update by autodist * Wed Nov 28 2007 Aleph0 0.6.14-1mamba - update to 0.6.14 * Tue Dec 07 2004 Davide Madrisan 0.6.2-1qilnx - package created by autospec