File mingw64-libchipcard.spec of Package mingw64-libchipcard
#
# spec file for package libchipcard
#
# Copyright (c) 2017 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/
#
%global gw_dev_package mingw64-gwenhywfar5-devel
%{!?gw_soversion: %define gw_soversion %(rpm -ql %{gw_dev_package} | grep gwenhywfar/plugins | head -1 | awk -F/ '{ print $9}')}
%define _name libchipcard
Name: mingw64-%{_name}
Version: 5.1.6
Release: 0
Summary: Library That Allows Easy Access to Smart Cards (Chipcards)
License: GPL-2.0-or-later
Group: Hardware/Other
Url: https://www.aquamaniac.de/rdm/projects/libchipcard
Source: %{_name}-%{version}.tar.gz
Source100: mingw64-libchipcard-rpmlintrc
Patch0: libchipcard-buildsrcdoc.patch
Patch1: find-mklistdoc.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: libtool
BuildRequires: mingw64-cross-gcc-c++
#BuildRequires: graphviz
#BuildRequires: graphviz-gd
BuildRequires: mingw64-gwenhywfar5-devel
BuildRequires: gwenhywfar-tools
BuildRequires: mingw64-zlib-devel
%_mingw64_package_header_debug
BuildArch: noarch
%description
Libchipcard allows easy access to smart cards. It provides basic access
to memory and processor cards and has special support for German
medical cards, German "Geldkarten," and HBCI (home banking) cards (both
type 0 and type 1). It accesses the readers via CTAPI or PC/SC
interfaces and has successfully been tested with Towitoko, Kobil, and
Reiner-SCT readers.
%package -n mingw64-libchipcard6
Summary: Library That Allows Easy Access to Smart Cards (Chipcards)
Group: System/Libraries
# moving to mingw64-filesystem requires requild of all packages
Provides: mingw64(winscard.dll)
%description -n mingw64-libchipcard6
This package contains all necessary include files and libraries needed
to develop applications that require these.
%package devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: %{gw_dev_package}
Requires: mingw64-libchipcard6 = %{version}
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%_mingw64_debug_package
%prep
%autosetup -p1 -n %{_name}-%{version}
autoreconf
%build
echo "lt_cv_deplibs_check_method='pass_all'" >> %{_mingw64_cache}
%_mingw64_configure\
--enable-release\
--disable-static
#--enable-full-doc\
make %{?_smp_mflags}
#make srcdoc
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mkdir -p %{buildroot}%{_mingw64_docdir}/%{name}
cp -a AUTHORS COPYING ChangeLog NEWS README TODO %{buildroot}%{_mingw64_docdir}/%{name}
# cp -a apidoc %{buildroot}%{_mingw64_docdir}/%{name}
%clean
rm -rf %{buildroot}
%files
%defattr (-, root, root)
%doc %{_mingw64_docdir}/%{name}
## %exclude %{_mingw64_docdir}/%{name}/apidoc
%{_mingw64_bindir}/*.exe
%exclude %{_mingw64_bindir}/*-config
%{_mingw64_datadir}/chipcard
# Own dirs to fix build.
%dir %{_mingw64_libdir}/gwenhywfar/
%dir %{_mingw64_libdir}/gwenhywfar/plugins/
%dir %{_mingw64_libdir}/gwenhywfar/plugins/%{gw_soversion}
%dir %{_mingw64_libdir}/gwenhywfar/plugins/%{gw_soversion}/ct
%{_mingw64_libdir}/gwenhywfar/plugins/%{gw_soversion}/ct/*.dll
%{_mingw64_libdir}/gwenhywfar/plugins/%{gw_soversion}/ct/*.xml
%dir %{_mingw64_sysconfdir}
%config %{_mingw64_sysconfdir}/chipcard
%files -n mingw64-libchipcard6
%defattr (-, root, root)
%{_mingw64_bindir}/libchipcard*.dll
%files devel
%defattr (-, root, root)
## %doc %{_docdir}/%{name}/apidoc
%{_mingw64_bindir}/*-config
%{_mingw64_libdir}/*.dll.a
%{_mingw64_libdir}/pkgconfig/*.pc
%{_mingw64_datadir}/aclocal/*.m4
%{_mingw64_includedir}/*
%dir %{_mingw64_libdir}/gwenhywfar/
%dir %{_mingw64_libdir}/gwenhywfar/plugins/
%dir %{_mingw64_libdir}/gwenhywfar/plugins/%{gw_soversion}
%dir %{_mingw64_libdir}/gwenhywfar/plugins/%{gw_soversion}/ct
%{_mingw64_libdir}/gwenhywfar/plugins/%{gw_soversion}/ct/*.dll.a
%changelog