File libchipcard.spec of Package libchipcard

# Copyright (c) 2007-2008 oc2pus
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments to the Bugzilla

# norootforbuild

%define _prefix	/usr
%define  releasever 382
%define  ascreleasever 381

Summary:	Library for generic access to chipcard readers
Name:		libchipcard
Version:	5.1.6
Release:	0
Source:		https://www.aquamaniac.de/rdm/attachments/download/%{releasever}/%{name}-%{version}.tar.gz
Source1:    https://www.aquamaniac.de/rdm/attachments/download/%{ascreleasever}/%{name}-%{version}.tar.gz.asc
Group:		System/Libraries
License:	LGPL-2.1
URL:		http://www.libchipcard.de
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
BuildRequires:	gcc-c++
BuildRequires:  gwenhywfar-devel >= 4.0.0
BuildRequires:  libusb-devel
BuildRequires:  pcsc-lite-devel
BuildRequires:  pkgconfig
BuildRequires:  sysfsutils
BuildRequires:  udev
BuildRequires:  zlib-devel
BuildRequires:  doxygen
BuildRequires:  autoconf >= 2.60
BuildRequires:	automake
BuildRequires:  libtool

%description
Libchipcard is a library for generic access to chipcard readers. It
contains a complete ressource manager and uses the hardware drivers
provided by manufacturers of card readers. The number of readers to
be used in parallel is unbound.

Libchipcard has some advantages over existing card reader ressource
managers:
* autodetection of readers at multiple buses
* readers are only allocated upon request by a client (while no
  client needs access to a given reader this reader is not accessed
  by Libchipcard3)
* it provides a fake CTAPI which can be used by any CTAPI-aware
  program to use Libchipcard3 via CTAPI

Libchipcard3 autodetects and automatically configures readers at the
following buses:
* raw USB
* USB serial
* PCI
* PCMCIA

Libchipcard has been tested by myself with the following readers:
* Kobil Kaan Advanced USB (works)
* Towitoko Chipdrive Micro (serial, works)
* old Reiner SCT Cyberjack (0x100, works)
* new Reiner SCT Cyberjack (0x300, works)
* Reiner SCT Cyberjack ECom (works)
* Omnikey CardMan 3621 (USB, works)
* Omnikey CardMan 4000 (PCMCIA, works)
* Cherry G80-1501 (mode 2, works)
* Cherry G80-1502 (mode 2, works)
* SCM SCR 3310 (works)
* SCM SPR 532 (works with original driver, see 9.4)

Author: Martin Preuss <martin@libchipcard.de>

%package -n chipcard-data
Group:		System/Libraries
Summary:	Common data files for libchipcard

%description -n chipcard-data
This is a collection of data files used by libchipcard.

%package -n %{name}6
Group:		System/Libraries
Summary:	Library for generic access to chipcard readers
Requires:	pcsc-lite udev chipcard-data

%description -n %{name}6
This is a library for generic access to chipcard readers. It
contains a complete ressource manager and uses the hardware drivers
provided by manufacturers of card readers. The number of readers to
be used in parallel is unbound.

Libchipcard has some advantages over existing card reader ressource
managers:
* autodetection of readers at multiple buses
* readers are only allocated upon request by a client (while no
  client needs access to a given reader this reader is not accessed
  by Libchipcard3)
* it provides a fake CTAPI which can be used by any CTAPI-aware
  program to use Libchipcard3 via CTAPI

Libchipcard4 autodetects and automatically configures readers at the
following buses:
* raw USB
* USB serial
* PCI
* PCMCIA

Libchipcard has been tested with the following readers:
* Kobil Kaan Advanced USB (works)
* Towitoko Chipdrive Micro (serial, works)
* old Reiner SCT Cyberjack (0x100, works)
* new Reiner SCT Cyberjack (0x300, works)
* Reiner SCT Cyberjack ECom (works)
* Omnikey CardMan 3621 (USB, works)
* Omnikey CardMan 4000 (PCMCIA, works)
* Cherry G80-1501 (mode 2, works)
* Cherry G80-1502 (mode 2, works)
* SCM SCR 3310 (works)
* SCM SPR 532 (works with original driver, see 9.4)

Author: Martin Preuss <martin@libchipcard.de>

%package devel
Summary:	LibChipCard server development kit
Group:		Development/Libraries/C and C++
Requires:	%{name}6 = %{version}
Requires:	gwenhywfar5-devel >= 4.0.0 zlib-devel pcsc-lite-devel glibc-devel 

%description devel
This package contains chipcard2-server-config and header files for
writing drivers, services or even your own chipcard daemon for
LibChipCard.

Author: Martin Preuss <martin@libchipcard.de>

%package crypttoken
Summary:	CryptToken Plugins for gwenhywfar
Group:		Development/Libraries/C and C++
Requires:	%{name}6 = %{version}

%description crypttoken
This package contains the CryptToken plugins for Gwenhywfar. These
are used by AqBanking to access chipcards for the German homebanking
protocol HBCI.

Author: Martin Preuss <martin@libchipcard.de>

%prep
%setup -q -n %{name}-%{version}
%{?suse_update_config:%{suse_update_config -f}}

%build
ACLOCAL="aclocal -I m4"
autoreconf -f -i
./configure \
	--prefix=%{_prefix} \
	--libdir=%{_libdir} \
	--sysconfdir=%{_sysconfdir} \
	--with-init-script-dir=%{_sysconfdir}/init.d \
	--enable-gwenhywfar \
	--enable-release \
	--enable-full-doc \
	--disable-static \
	--with-pcsc-libname=libpcsclite.so \
	--with-pcsc-libs=%{_libdir} \
	--with-pic
%if 0%{?suse_version}
%__sed -i -e 's|initscriptdir = with_init_script_dir|initscriptdir = %{_sysconfdir}/init.d|g' \
	etc/Makefile
%endif

%__make %{?jobs:-j%{jobs}}

%install
LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} \
%{__make} DESTDIR=$RPM_BUILD_ROOT install
rm $RPM_BUILD_ROOT%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -n %{name}6
/sbin/ldconfig

%postun -n %{name}6
/sbin/ldconfig

%files -n %{name}6
%defattr(-,root,root,0755)
%doc AUTHORS COPYING ChangeLog README
%config %{_sysconfdir}/chipcard
%{_bindir}/*
%exclude %{_bindir}/*-config
%{_libdir}/%{name}.so.*

%files -n chipcard-data
%defattr(-,root,root)
%{_datadir}/chipcard

%files devel
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/*-config
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/libchipcard-client.pc
%{_libdir}/pkgconfig/libchipcard-server.pc
%{_datadir}/aclocal/*.m4

%files crypttoken
%defattr(-,root,root)
%dir %{_libdir}/gwenhywfar
%dir %{_libdir}/gwenhywfar/plugins
%{_libdir}/gwenhywfar/plugins/*

%changelog
* Sat May 09 2009 Johannes Engel <jcnengel@googlemail.com>
- update to 4.2.8
- More CCID readers
- better error handling
- driver description for Omnikey CM4040
* Mon Apr 06 2009 jcnengel@googlemail.com
- update to 4.2.6
- fix some memory leaks in chipcardd
* Tue Mar 31 2009 jcnengel@googlemail.com
- update to 4.2.5
- added recognition for PCMCIA devices again
- added description of GemPC Express
- resolved problems with newer versions of libccid
* Fri Feb 13 2009 jcnengel@googlemail.com
- update to 4.2.4
* Tue Dec 23 2008 jcnengel@googlemail.com
- update to 4.2.3
* Mon Dec 22 2008 jcnengel@googlemail.com
- adapt to new package names libgwenhywfar47
* Wed Aug 20 2008 Toni Graffy <toni@links2linux.de> - 4.2.0-0.pm.1
- update to 4.2.0
- build with gwenhywfar3-3.4.1
* Wed Jul 09 2008 Toni Graffy <toni@links2linux.de> - 4.1.3-0.pm.1
- update to 4.1.3
- build with gwenhywfar3-3.3.5
* Wed Jul 02 2008 Toni Graffy <toni@links2linux.de> - 4.1.2-0.pm.1
- update to 4.1.2
* Fri Jun 13 2008 Toni Graffy <toni@links2linux.de> - 4.1.1-0.pm.1
- update to 4.1.1
- build with gwenhywfar3-3.3.4
* Wed May 28 2008 Toni Graffy <toni@links2linux.de> - 4.1.0-0.pm.1
- update to 4.1.0
- build with gwenhywfar3-3.3.2
* Thu Nov 22 2007 Toni Graffy <toni@links2linux.de> - 4.0.0-0.pm.1
- update to 4.0.0
- build with gwenhywfar3-3.0.0
* Tue Nov 20 2007 Toni Graffy <toni@links2linux.de> - 3.9.13rc6-0.pm.1
- update to 3.9.13rc6
- build with gwenhywfar3-2.9.15rc6
* Sun Nov 18 2007 Toni Graffy <toni@links2linux.de> - 3.9.11rc4-0.pm.1
- update to 3.9.11rc4
- build with gwenhywfar3-2.9.15rc6
* Sun Nov 11 2007 Toni Graffy <toni@links2linux.de> - 3.9.9rc2-0.pm.1
- update to 3.9.9rc2
- build with gwenhywfar3-2.9.11rc2
* Sat Nov 10 2007 Toni Graffy <toni@links2linux.de> - 3.9.8rc1-0.pm.1
- update to 3.9.8rc1
- build with gwenhywfar3-2.9.10rc1
* Thu Nov 08 2007 Toni Graffy <toni@links2linux.de> - 3.9.7beta-0.pm.1
- update to 3.9.7beta
- build with gwenhywfar3-2.9.9beta
* Sun Nov 04 2007 Toni Graffy <toni@links2linux.de> - 3.9.6beta-0.pm.1
- update to 3.9.6beta
- build with gwenhywfar3-2.9.8beta
- changed licence to LGPL
* Fri Nov 02 2007 Toni Graffy <toni@links2linux.de> - 3.9.5beta-0.pm.1
- update to 3.9.5beta
- build with gwenhywfar3-2.9.7beta
* Sat Oct 27 2007 Toni Graffy <toni@links2linux.de> - 3.9.4beta-0.pm.1
- update to 3.9.4beta
- build with gwenhywfar3-2.9.4beta
* Thu Oct 25 2007 Toni Graffy <toni@links2linux.de> - 3.9.3beta-0.pm.1
- update to 3.9.3beta
- build with gwenhywfar3-2.9.3beta
* Wed Sep 12 2007 Toni Graffy <toni@links2linux.de> - 3.9.2beta-0.pm.1
- update to 3.9.2beta
* Tue May 15 2007 Toni Graffy <toni@links2linux.de> - 3.9.1beta-0.pm.1
- initial package 3.9.1beta
- build with gwenhywfar3-2.9.1beta
- repacked as tar.bz2
openSUSE Build Service is sponsored by