File kde3-kmymoney.spec of Package kmymoney
#
# spec file for package kde3-kmymoney (Version 1.0.5)
#
# Copyright (c) 2010 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/
Name: kde3-kmymoney
BuildRequires: cppunit-devel kdelibs3-devel opensp-devel
BuildRequires: kdebase3-devel libofx-devel qt3-devel
BuildRequires: fdupes sqlite3-devel update-desktop-files
%if %suse_version < 1120
# pdf generation does not work on openSUSE >= 11.2
BuildRequires: ghostscript-library html2ps
%endif
Url: http://kmymoney2.sourceforge.net/
License: GPL-2.0-or-later
Group: Productivity/Office/Finance
Summary: A Personal Finance Manager
Version: 1.0.5
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: kmymoney2-%{version}.tar.bz2
Patch1: kmymoney.diff
Patch2: build-fix.diff
Patch3: gcc-45.diff
Obsoletes: kmymoney <= %{version}
Suggests: kmm_kbanking
%description
KMyMoney is a personal finance manager. It does not support online
banking, but it can import and export QIF (Quicken) files.
%package devel
License: GPL-2.0-or-later
Summary: A Personal Finance Manager
Group: Productivity/Office/Finance
Requires: %{name} = %{version}
Requires: kdelibs3-devel
Requires: libofx-devel
Requires: opensp-devel
Requires: qt3-devel
Requires: sqlite3-devel
Obsoletes: kmymoney-devel <= %{version}
%description devel
KMyMoney is a personal finance manager. It does not support online
banking, but it can import and export QIF (Quicken) files.
%package sqlite3-plugin
License: GPL-2.0-or-later
Summary: Sqlite3 plugin for kmymoney
Group: System/Libraries
Obsoletes: kmymoney-sqlite3-plugin <= %{version}
%description sqlite3-plugin
With this driver you can access the files created by sqlite3
through the standard Qt sql module.
The driver name is QSQLITE3.
%lang_package
%prep
%setup -q -n kmymoney2-%{version}
%patch1
%if %suse_version < 1120
%patch2
%endif
%patch3
sed -i 1i\ '#include <unistd.h>' kmymoney2/plugins/ofximport/ofxpartner.cpp
%build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS=$CFLAGS
./configure \
%if %suse_version >= 1120
--disable-pdf-docs \
%else
--enable-pdfdocs \
%endif
--enable-ofxplugin \
--enable-ofxbanking \
--enable-charts \
--enable-sqlite3 \
--enable-pch
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
#%__sed -i -e 's|-L/usr/src/packages/BUILD/kmymoney2-%{version}/kmymoney2/plugins/.libs||g' \
%__sed -i -e "s|-L`pwd`/kmymoney2/plugins/.libs||g" \
%{buildroot}/opt/kde3/%_lib/kde3/kmm_ofximport.la
%suse_update_desktop_file -G "Personal Finance Manager" kmymoney2 Finance
%suse_update_desktop_file %{buildroot}/opt/kde3/share/mimelnk/application/x-kmymoney2.desktop
%suse_update_desktop_file %{buildroot}/opt/kde3/share/servicetypes/kmymoneyplugin.desktop
%suse_update_desktop_file %{buildroot}/opt/kde3/share/servicetypes/kmymoneyimporterplugin.desktop
%suse_update_desktop_file %{buildroot}/opt/kde3/share/services/kmm_ofximport.desktop
%find_lang kmymoney2
#rm -rf $RPM_BUILD_ROOT/opt/kde3/%_lib/*.la
#rm -rf $RPM_BUILD_ROOT/opt/kde3/%_lib/kde3/*.la
%fdupes $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%dir /opt/kde3/share/man
%dir /opt/kde3/share/man/man1
/opt/kde3/bin/*
/opt/kde3/%_lib/libkmm_mymoney.so.*
/opt/kde3/%_lib/libkmm_plugin.so.*
/opt/kde3/%_lib/libkmm_kdchart.so.*
/opt/kde3/share/config.kcfg/kmymoney2.kcfg
/opt/kde3/share/appl*/*/*.desktop
/opt/kde3/share/apps/*
/opt/kde3/share/icons/*
/opt/kde3/share/mimelnk/*/*.desktop
/opt/kde3/share/servicetypes/*.desktop
/opt/kde3/share/man/man1/*
/opt/kde3/%_lib/kde3/kmm_ofximport.so
/opt/kde3/share/services/kmm_ofximport.desktop
%files devel
%defattr(-,root,root)
/opt/kde3/include/kmymoney
/opt/kde3/%_lib/libkmm_mymoney.so
/opt/kde3/%_lib/libkmm_mymoney.la
/opt/kde3/%_lib/libkmm_plugin.so
/opt/kde3/%_lib/libkmm_plugin.la
/opt/kde3/%_lib/libkmm_kdchart.so
/opt/kde3/%_lib/libkmm_kdchart.la
/opt/kde3/%_lib/kde3/kmm_ofximport.la
%files sqlite3-plugin
%defattr(-,root,root)
%doc qt-sqlite3-0.2/README
%dir /usr/lib/qt3/plugins
%dir /usr/lib/qt3/plugins/sqldrivers
/usr/lib/qt3/plugins/sqldrivers/libsqlite3*
%files lang -f kmymoney2.lang
%changelog