File mingw64-aqbanking6.spec of Package mingw64-aqbanking6
#
# spec file for package mingw64-aqbanking
#
# 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
# macro works, but prints a warning, see https://github.com/openSUSE/obs-build/issues/390
%{!?aq_cmake_version: %define aq_cmake_version %(echo %{version} | awk -F. '{gsub(/\+.*$/,""); print $1"."$2}')}
%{!?aq_include_version: %define aq_include_version %(echo %{aq_cmake_version} | awk -F. '{print $1}')}
%{!?gw_version: %define gw_version %(rpm -q %{gw_dev_package} | awk -F"[-+]" '{print $4}')}
%{!?gw_soversion: %define gw_soversion %(rpm -ql %{gw_dev_package} | grep gwenhywfar/plugins | head -1 | awk -F/ '{ print $9}')}
%define _instname aqbanking
%define _name aqbanking6
%define build_ebics 0
%define build_ofx 1
%define aq_plugindir %{_mingw64_libdir}/aqbanking/plugins/44
%define fronts_libdir %{aq_plugindir}/frontends
%define imex_plugindir %{aq_plugindir}/imexporters
%define imex_datadir %{_mingw64_datadir}/%{_instname}/imexporters
%define fronts_datadir %{_mingw64_datadir}/%{_instname}/frontends
%define qb_cfgmoddir %{fronts_libdir}/qbanking/cfgmodules
%define q4b_cfgmoddir %{fronts_libdir}/q4banking/cfgmodules
Name: mingw64-%{_name}
Version: 6.5.11beta
Release: 0
Summary: Library for Online Banking Functions and Financial Data Import and Export
License: GPL-2.0-only or GPL-3.0-only
Group: Productivity/Office/Finance
Url: http://www.aquamaniac.de/aqbanking/
Source: aqbanking-%{version}.tar.gz
Source1: aqbanking6-handbook-20190221.pdf
BuildRequires: automake autoconf libtool
BuildRequires: doxygen
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-cross-wine
BuildRequires: mingw64-gmp-devel
BuildRequires: %{gw_dev_package} >= %{gw_version}
# required by kmymoney
Requires: mingw64-libgwengui5-cpp%{gw_soversion} >= %{gw_version}
Requires: mingw64-libgwenhywfar5%{gw_soversion}-plugins
BuildRequires: mingw64-ktoblzcheck-devel >= 1.10
BuildRequires: mingw64-win_iconv-devel
BuildRequires: mingw64-libintl-devel
#BuildRequires: mingw64-pkg-config
%if %build_ofx
BuildRequires: mingw64-libofx-devel
%endif
%if %build_ebics
BuildRequires: mingw64-libltdl-devel
BuildRequires: mingw64-xmlsec1-gnutls-devel
%endif
Recommends: %{name}-lang
%_mingw64_package_header_debug
BuildArch: noarch
%description
AqBanking is a generic online banking interface. It allows multiple
back-ends (currently HBCI) and multiple front-ends (such as KDE, GNOME,
or console) to be used.
%package devel
Summary: Library for Online Banking Functions and Financial Data Import/Export
License: GPL-2.0-or-later
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: cmake
#Requires: glibc-devel
Requires: mingw64-gwenhywfar5-devel >= %{gw_version}
Requires: mingw64-ktoblzcheck-devel
%if %build_ofx
Requires: mingw64-libofx-devel
%endif
%description devel
AqBanking is a generic OnlineBanking interface. It allows multiple
backends (currently HBCI) and multiple frontends (e.g. KDE, GNOME,
console) to be used.
%package doc
Summary: Library for Online Banking Functions and Financial Data Import/Export
License: SUSE-Free-Art-1.3
Group: Productivity/Office/Finance
Requires: %{name} = %{version}
Conflicts: mingw64-aqbanking
%description doc
AqBanking is a generic OnlineBanking interface. It allows multiple
backends (currently HBCI) and multiple frontends (e.g. KDE, GNOME,
console) to be used.
This package contains a handbook.
%if %build_ofx
%package ofx
Summary: Library for Online Banking Functions and Financial Data Import/Export
License: GPL-2.0-or-later
Group: Productivity/Office/Finance
Requires: %{name} = %{version}
%description ofx
AqBanking is a generic OnlineBanking interface. It allows multiple
backends (currently HBCI) and multiple frontends (e.g. KDE, GNOME,
console) to be used.
%endif
%if %build_ebics
%package ebics
Summary: Library for Online Banking Functions and Financial Data Import/Export
License: GPL-2.0-or-later
Group: Productivity/Office/Finance
Requires: %{name} = %{version}
%description ebics
AqBanking is a generic OnlineBanking interface. It allows multiple
backends (currently HBCI) and multiple frontends (e.g. KDE, GNOME,
console) to be used.
%endif
%lang_package
%_mingw64_debug_package
%prep
%autosetup -p1 -n aqbanking-%{version}
%build
BACKEND_LIST="aqhbci aqnone aqpaypal"
%if %build_ofx
BACKEND_LIST="$BACKEND_LIST aqofxconnect"
%endif
%if %build_ebics
BACKEND_LIST="$BACKEND_LIST aqebics"
%endif
# quick fix for $CPP being unset and configure failing to handle include dirs properly
CPP=`which cpp`
export CPP
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
autoreconf --force --install --symlink
%_mingw64_configure\
--enable-release \
--with-backends="$BACKEND_LIST" \
--enable-full-doc \
--with-docpath=%{_mingw64_docdir}/%{_instname} \
--enable-gui-tests \
--with-xmlmerge=%{_mingw64_bindir}/xmlmerge.exe \
--with-typemaker2-exe=%{_mingw64_bindir}/typemaker2.exe
# required for building from git version
%_mingw64_cross_wine_init
%_mingw64_cross_wine_run make typedefs types
make
%install
%_mingw64_makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
rm %{buildroot}%{aq_plugindir}/dbio/swift*.dll.a
# Install the handbook
mkdir -p %{buildroot}/%{_mingw64_docdir}/%{_instname}
%__install -m 644 %{S:1} %{buildroot}%{_mingw64_docdir}/%{_instname}/aqbanking-handbook.pdf
%_mingw64_find_lang %{_instname} || true
%files
%defattr(-,root,root)
%{_mingw64_docdir}/%{_instname}
%exclude %{_mingw64_docdir}/%{_instname}/aqbanking-handbook.pdf
### The original aqbanking files
%{_mingw64_bindir}/%{_instname}-cli*.exe
%{_mingw64_bindir}/aqebics-tool.exe
%{_mingw64_bindir}/aqofxconnect-tool.exe
%{_mingw64_bindir}/lib%{_instname}*.dll
%dir %{aq_plugindir}
%dir %{aq_plugindir}/dbio
%{aq_plugindir}/dbio/swift*.dll
%{_mingw64_datadir}/%{_instname}/aqbanking/
%{_mingw64_datadir}/%{_instname}/bankinfo/
%{_mingw64_datadir}/%{_instname}/dialogs/
%{_mingw64_datadir}/%{_instname}/typemaker2/
%dir %{_mingw64_datadir}/%{_instname}/backends
%dir %{aq_plugindir}/bankinfo
%dir %{aq_plugindir}/imexporters
%dir %{aq_plugindir}/providers
%{imex_datadir}/camt
%{imex_datadir}/ctxfile
%{imex_datadir}/csv
%{imex_datadir}/eri
%{imex_datadir}/eri2
%{imex_datadir}/openhbci1
%{imex_datadir}/q43
%{imex_datadir}/sepa
%{imex_datadir}/swift
%{imex_datadir}/xml
%{imex_datadir}/xmldb/profiles/*
%{imex_datadir}/yellownet/profiles/*
### The aqhbci files
%{_mingw64_bindir}/aqhbci-tool4.exe
%{_mingw64_datadir}/%{_instname}/backends/aqhbci
### The aqnone files
### The aqpaypal files
%{_mingw64_bindir}/aqpaypal-tool.exe
%{_mingw64_datadir}/%{_instname}/backends/aqpaypal
%{aq_plugindir}/*/*.xml
## Directories
%dir %{_mingw64_libdir}/aqbanking
%dir %{_mingw64_libdir}/aqbanking/plugins
%dir %{_mingw64_datadir}/%{_instname}
%dir %{imex_datadir}
%dir %{imex_datadir}/xmldb
%dir %{imex_datadir}/xmldb/profiles
%dir %{imex_datadir}/yellownet
%dir %{imex_datadir}/yellownet/profiles
%if !%build_ofx
%{imex_datadir}/ofx
%endif
%files devel
%defattr(-,root,root)
### The aqbanking files
%{_mingw64_bindir}/%{_instname}-config
%{_mingw64_includedir}/%{_instname}%{aq_include_version}/
%{_mingw64_libdir}/cmake/%{_instname}-%{aq_cmake_version}/
%{_mingw64_libdir}/libaqbanking*.dll.a
%{_mingw64_libdir}/pkgconfig/%{_instname}.pc
%dir %{_mingw64_datadir}/aclocal
%{_mingw64_datadir}/aclocal/%{_instname}.m4
%files doc
%defattr(-,root,root)
%{_mingw64_docdir}/%{_instname}/aqbanking-handbook.pdf
%files lang -f %{_instname}.lang
%if %build_ofx
%files ofx
%defattr(-,root,root)
%{imex_datadir}/ofx
%{_mingw64_datadir}/aqbanking/backends/aqofxconnect
%endif
%if %build_ebics
%files ebics
%doc README.aqebics
%defattr(-,root,root)
%{_mingw64_bindir}/aqebics-tool.exe
%{_mingw64_datadir}/aqbanking/backends/aqebics
%endif
%changelog