gnucash/gnucash.spec

159 lines
5.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gnucash (Version 2.2.9)
#
# 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
Name: gnucash
Version: 2.2.9
Release: 2
Url: http://www.gnucash.org/
Group: Productivity/Office/Finance
License: GPL v2 or later
Summary: Personal Finance Manager
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
Patch: gnucash-desktop.patch
# PATCH-FIX-UPSTREAM gnucash-latest-goffice.patch bgo578212 vuntz@novell.com -- Fix build with goffice 0.7.5
Patch1: gnucash-latest-goffice.patch
Patch3: gnucash-cpan-warning.patch
Requires: guile slib
# Required to make quotes working. Gnucash can run without quotes support:
Requires: perl-Crypt-SSLeay perl-DateManip perl-Finance-Quote perl-HTML-Parser perl-HTML-TableExtract perl-libwww-perl
BuildRequires: doxygen fdupes gconf2-devel glib2-devel goffice-devel graphviz gtk2-devel gtkhtml2-devel guile-devel intltool ktoblzcheck-devel libglade2-devel libgnomeprintui-devel libgnomeui-devel libofx-devel libxml2-devel popt-devel slib swig update-desktop-files
# Optional features:
BuildRequires: aqbanking-devel libchipcard4-devel libofx-devel postgresql-devel
#BuildRequires: callgrind
# tested but unused BuildRequires: readline-devel qt3-devel termcap
Recommends: gnucash-docs
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %install_info_prereq
Requires: %{name}-lang = %{version}
AutoReqProv: on
%gconf_schemas_prereq
%description
GnuCash is a personal finance manager. A check book-like register GUI
allows you to enter and track bank accounts, stocks, income, and even
currency trades. A full set of reports allows you to see the state
ofyour finances. The interface is designed to be simple and easy to
use, but is backed with double-entry accounting principles to
ensurebalanced books.
%package devel
License: GPL v2 or later
Group: Development/Libraries/C and C++
Summary: Personal Finance Manager
Requires: %{name} = %{version} aqbanking-devel gconf2-devel goffice-devel libgsf-devel gtk2-devel gtkhtml2-devel gwenhywfar-devel ktoblzcheck-devel libglade2-devel libgnomeui-devel libgnomeprint-devel libgnomeprintui-devel libofx-devel libtool popt-devel
%description devel
GnuCash is a personal finance manager. A check-book like register GUI
allows you to enter and track bank accounts, stocks, income and even
currency trades. A full set of reports allow you to see the state of
your finances. The interface is designed to be simple and easy to use,
but is backed with double-entry accounting principles to ensure
balanced books.
%lang_package
%prep
%setup -q
%patch
%patch1 -p1
# This patch must be applied:
%patch3
# build fix, G_INLINE_FUNC definition in glib2 is broken again for gcc-4.3
sed -i "s:^\(GNC_DOC_INSTALL_DIR=\).*$:\1'%{_docdir}/%{name}':" configure.in
%build
export GUILE_WARN_DEPRECATED=no
# FIXME: invalid directory somewhere in the source:
mkdir m4
ACLOCAL="aclocal -I macros" autoreconf -f -i
%configure\
--disable-schemas-install\
--with-qt3-wizard-package=aqbanking-qt3\
--libexecdir=%{_prefix}/lib\
--enable-sql\
--enable-ofx\
--enable-aqbanking-test\
--enable-hbci\
--enable-locale-specific-tax\
--enable-html-docs
make %{?jobs:-j%jobs}
%install
%makeinstall
cp AUTHORS COPYING ChangeLog ChangeLog.2003 ChangeLog.2004 ChangeLog.2005 DOCUMENTERS HACKING LICENSE NEWS README README.dependencies README.patches TODO $RPM_BUILD_ROOT%{_docdir}/%{name}/
rm $RPM_BUILD_ROOT%{_docdir}/%{name}/INSTALL
%suse_update_desktop_file gnucash
rm $RPM_BUILD_ROOT%{_infodir}/dir
%find_lang gnucash
%find_gconf_schemas
cat %{name}.schemas_list >%{name}.lst
%fdupes $RPM_BUILD_ROOT%{_datadir}
%clean
rm -rf $RPM_BUILD_ROOT
%pre -f %{name}.schemas_pre
%post
/sbin/ldconfig
%install_info --info-dir=%{_infodir} %{_infodir}/gnucash-design.info.gz
%posttrans -f %{name}.schemas_posttrans
%preun -f %{name}.schemas_preun
%postun
/sbin/ldconfig
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnucash-design.info.gz
%files -f %{name}.lst
%defattr (-, root, root)
%doc %{_docdir}/%{name}
%{_bindir}/gnc-*
%{_bindir}/gnucash
%{_bindir}/*gnucash-[a-bd-z]*
%{_datadir}/applications/*.desktop
%{_datadir}/gnucash
#%{_datadir}/pixmaps/*.png
/usr/share/icons/hicolor/*/apps/gnucash-icon.png
/usr/share/icons/hicolor/scalable/apps/gnucash-icon.svg
%{_datadir}/xml/gnucash
%{_libdir}/*.so.*
# Required by slib for many libraries:
%{_libdir}/*.so
# NOTE: .la files are required by ltdl in the main package (skip-check-libtool-deps)
%{_libdir}/*.la
%{_libdir}/gnucash
%doc %{_infodir}/gnucash-design.info*
%doc %{_mandir}/man?/*.*
%if "%{_libdir}" != "%{_prefix}/lib"
%{_prefix}/lib/gnucash
%endif
%dir %{_sysconfdir}/gnucash
%config %{_sysconfdir}/gnucash/config
%files lang -f %{name}.lang
%files devel
%defattr (-, root, root)
%{_includedir}/gnucash
%changelog