File aqbanking.spec of Package aqbanking

#
# spec file for package aqbanking (Version 4.0.0)
#
# Copyright (c) 2009 SUSE LINUX Products 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/
#

# norootforbuild

%define build_ofx 1

Name:           aqbanking
BuildRequires:  doxygen fdupes gmp-devel gwenhywfar-devel ktoblzcheck-devel python-devel pyxml qt3-devel
%if %build_ofx
BuildRequires:  libofx-devel
%endif
Version:        4.0.0
Release:        2
Requires:       %{name}-lang = %{version}
Url:            http://www.aquamaniac.de/aqbanking/
Group:          Productivity/Office/Finance
License:        GPL v2 or later
Summary:        Library for Online Banking Functions and Financial Data Import and Export
Source:         %{name}-%{version}.tar.bz2
Patch5:         %{name}-strncat.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define aq_plugindir   %{_libdir}/aqbanking/plugins/29
%define fronts_libdir  %{aq_plugindir}/frontends
%define imex_plugindir %{aq_plugindir}/imexporters
%define imex_datadir   %{_datadir}/%{name}/imexporters
%define fronts_datadir %{_datadir}/%{name}/frontends
%define qb_cfgmoddir   %{fronts_libdir}/qbanking/cfgmodules

%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
License:        GPL v2 or later
Summary:        Library for Online Banking Functions and Financial Data Import/Export
Group:          Productivity/Office/Finance
Requires:       %{name} = %{version} glibc-devel gwenhywfar-devel ktoblzcheck-devel qt3-devel
%if %build_ofx
Requires:       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 qt3
License:        GPL v2 or later
Summary:        Library for Online Banking Functions and Financial Data Import/Export
Group:          Productivity/Office/Finance
Requires:       %{name} = %{version}

%description qt3
AqBanking is a generic OnlineBanking interface. It allows multiple
backends (currently HBCI) and multiple frontends  (e.g. KDE, GNOME,
console) to be used.

%if %build_ofx

%package ofx
License:        GPL v2 or later
Summary:        Library for Online Banking Functions and Financial Data Import/Export
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.

%package ofx-qt3
License:        GPL v2 or later
Summary:        Library for Online Banking Functions and Financial Data Import/Export
Group:          Productivity/Office/Finance
Requires:       %{name} = %{version}

%description ofx-qt3
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

%prep
%setup -q
%patch5

%build
BACKEND_LIST="aqhbci aqnone"
%if %build_ofx
BACKEND_LIST="$BACKEND_LIST aqofxconnect"
%endif
ACLOCAL="aclocal -I m4" autoreconf -f -i
%configure\
	--enable-release\
	--with-backends="$BACKEND_LIST" \
	--enable-full-doc\
	--with-docpath=%{_docdir}/%{name} \
	--with-qt3-libs=/usr/lib/qt3/%{_lib}
# Does not work with aqbanking-2.2.9:
#make %{?jobs:-j%jobs}
make

%install
%makeinstall idatadir=%{_docdir}/%{name}
cp -a AUTHORS COPYING ChangeLog NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{name}
%find_lang %{name}
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post qt3 -p /sbin/ldconfig

%postun qt3 -p /sbin/ldconfig
%if %build_ofx

%post ofx -p /sbin/ldconfig

%postun ofx -p /sbin/ldconfig
%endif

%files 
%defattr(-,root,root)
%doc %{_docdir}/%{name}
### The original aqbanking files
%{_bindir}/%{name}-cli
%{_libdir}/lib%{name}*.so.*
%{_libdir}/gwenhywfar
%{_datadir}/%{name}/bankinfo
%{_datadir}/%{name}/backends
%{aq_plugindir}/bankinfo
%{imex_plugindir}/ctxfile.*
%{imex_plugindir}/csv.*
%{imex_plugindir}/dtaus.*
%{imex_plugindir}/eri2.*
%{imex_plugindir}/openhbci1.*
%{imex_plugindir}/sepa.*
%{imex_plugindir}/swift.*
%{imex_plugindir}/xmldb.*
%{imex_plugindir}/yellownet.*
%{imex_datadir}/ctxfile
%{imex_datadir}/csv
%{imex_datadir}/dtaus
%{imex_datadir}/eri
%{imex_datadir}/eri2
%{imex_datadir}/openhbci1
%{imex_datadir}/sepa
%{imex_datadir}/swift
%{imex_datadir}/xmldb/profiles/*
%{imex_datadir}/yellownet/profiles/*
### The aqhbci files
%{_bindir}/aqhbci-tool4
%{_libdir}/libaqhbci.so.*
%{aq_plugindir}/providers/aqhbci.*
%{_datadir}/%{name}/backends/aqhbci
#%{_datadir}/doc/aqhbci
### The aqnone files
%{_libdir}/libaqnone.so.*
%{aq_plugindir}/providers/aqnone.*
## Directories
%dir %{_libdir}/aqbanking
%dir %{_libdir}/aqbanking/plugins
%dir %{aq_plugindir}
%dir %{aq_plugindir}/debugger
%dir %{aq_plugindir}/providers
%dir %{fronts_libdir}
%dir %{_datadir}/%{name}
%dir %{imex_plugindir}
%dir %{fronts_libdir}/qbanking
%dir %{fronts_datadir}
%dir %{qb_cfgmoddir}
%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 lang -f %name.lang

%files devel
%defattr(-,root,root)
### The aqbanking files
%{_bindir}/*-config
#%{_bindir}/%{name}-config
%{_includedir}/%{name}
%{_libdir}/*.la
%{_libdir}/libaqbanking.so
%{_libdir}/libaqhbci.so
%{_libdir}/libaqnone.so
%{_libdir}/pkgconfig/%{name}.pc
%{_datadir}/aclocal
### The aqhbci files
#%{_bindir}/aqhbci-config
%{_bindir}/hbcixml3
%{_includedir}/aqhbci
### The qbanking files
#%{_bindir}/qbanking-config
%{_includedir}/qbanking
%if %build_ofx
### The ofx files
%{_includedir}/aqofxconnect
%endif
# .so files from sub-packages
%{_libdir}/libqbanking.so
%if %build_ofx
%{_libdir}/libaqofxconnect.so
%endif

%files qt3
%defattr(-,root,root)
%{_bindir}/qb-help8
%{_libdir}/libqbanking.so.*
%{aq_plugindir}/debugger/aqhbci
%{aq_plugindir}/wizards
%{qb_cfgmoddir}/aqhbci*
%{_datadir}/%{name}/i18n
%{fronts_datadir}/qbanking
%if %build_ofx

%files ofx
%defattr(-,root,root)
#%{_bindir}/aqofxconnect-config
%{_libdir}/libaqofxconnect.so.*
%{aq_plugindir}/providers/aqofxconnect.*
%{imex_plugindir}/ofx.*
%{imex_datadir}/ofx

%files ofx-qt3
%defattr(-,root,root)
%{qb_cfgmoddir}/aqofxconnect*
%endif

%changelog
openSUSE Build Service is sponsored by