File pcsc-cyberjack.spec of Package pcsc-cyberjack
#
# spec file for package pcsc-cyberjack
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if %suse_version >= 1120
%if %( echo `rpm -q --queryformat %%{version} udev` ) > 190
%define _udevrulesdir /usr/lib/udev/rules.d
%else
%define _udevrulesdir /lib/udev/rules.d
%endif
%endif
Name: pcsc-cyberjack
BuildRequires: distribution-release
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pcsc-lite-devel
BuildRequires: pkg-config
BuildRequires: readline-devel
%if %suse_version >= 1120
BuildRequires: libusb-1_0-devel
BuildRequires: udev
%else
BuildRequires: hal-devel
BuildRequires: libusb-devel
%endif
Version: 3.99.5final.SP08
Release: 0
Url: http://www.reiner-sct.de/support/treiber_cyberjack.php
Summary: PC/SC IFD Handler for the Reiner SCT Cyberjack USB-SmartCard Readers
License: LGPL-2.1+
Group: Productivity/Security
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-README.SUSE
Source2: 40-cyberjack.rules
Patch1: ctapi-cyberjack-configure.patch
Patch2: ctapi-cyberjack-check.patch
Patch3: pcsc-cyberjack-fprintf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define ifddir %(pkg-config --variable=usbdropdir libpcsclite)
Supplements: modalias(usb:v0C4Bp0100d*dc*dsc*dp*ic*isc*ip*)
Supplements: modalias(usb:v0C4Bp0300d*dc*dsc*dp*ic*isc*ip*)
Supplements: modalias(usb:v0C4Bp0400d*dc*dsc*dp*ic*isc*ip*)
Supplements: modalias(usb:v0C4Bp0401d*dc*dsc*dp*ic*isc*ip*)
Supplements: modalias(usb:v0C4Bp0500d*dc*dsc*dp*ic*isc*ip*)
Supplements: modalias(usb:v0C4Bp0501d*dc*dsc*dp*ic*isc*ip*)
Requires: pcsc-lite
%description
This package includes the PC/SC IFD handler for the Reiner SCT
Cyberjack pinpad/e-com/RFID USB chipcard readers.
This driver is meant to be used with the PCSC-Lite daemon from the
pcsc-lite package.
%prep
%setup -q
cp -a %{S:1} README.SUSE
%patch1
%patch2
%patch3 -p1
%build
ACLOCAL="aclocal -I m4" autoreconf -f -i
%configure\
--disable-static\
--enable-release\
%if %suse_version < 1120
--enable-hal=yes \
--enable-udev=no \
%endif
--with-usbdropdir=%{ifddir}
make %{?jobs:-j%jobs}
%install
%makeinstall
%if %suse_version >= 1120
mkdir -p $RPM_BUILD_ROOT%{_udevrulesdir}
install %{SOURCE2} $RPM_BUILD_ROOT%{_udevrulesdir}
%endif
# clean up
mv $RPM_BUILD_ROOT%{_sysconfdir}/cyberjack.conf{.default,}
# man pages
mkdir -p $RPM_BUILD_ROOT%{_datadir}/man/man8/
mv $RPM_BUILD_ROOT%{_datadir}/man/*.8 $RPM_BUILD_ROOT%{_datadir}/man/man8/
# exclude
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/hal/fdi/policy/10osvendor/80-cyberjack.fdi
rm -rf $RPM_BUILD_ROOT%{_libdir}/cyberjack/pcscd_init.diff
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYRIGHT.GPL COPYRIGHT.LGPL doc/README.* README.SUSE doc/LIESMICH.* ChangeLog NEWS
%dir %{ifddir}
%{ifddir}/libifd-cyberjack.bundle
%doc %{_mandir}/man8/*
%{_bindir}/*
%{_libdir}/cyberjack
%config(noreplace) %{_sysconfdir}/cyberjack.conf
%if %suse_version >= 1120
%{_udevrulesdir}/*
%endif
%changelog