4
# Check whether GnuCash should build optional modules.
5
# To modify parameters, edit the .spec file, 0 is off, 1 is on
6
%define _with_postgres 0
10
# The --whatprovides redhat-release lets us work on RHEL as well as FC
11
# Granted, it will look weird, but at least it wont fail outright.
12
%define fc_rel %(rpm -q --queryformat='%{VERSION}' --whatprovides redhat-release)
13
%define version @-VERSION-@
14
%define __libtoolize /bin/true
16
%define libgnomeui_version 2.8.0
17
%define libgnomeprintui_version 2.8.0
18
%define guile_version 1.6.0
19
%define gtkhtml3_version 3.1
20
%define libofx_version 0.8.0
21
%define aqbanking_version 1.3
22
%define postgresql_version 7.1.3
25
Summary: GnuCash is an application to keep track of your finances.
27
Release: 1.FC%{fc_rel}
29
Group: Applications/Finance
30
URL: http://www.gnucash.org
31
Source: http://www.gnucash.org/pub/gnucash/sources/stable/gnucash-%{version}.tar.gz
32
BuildRoot: %{_tmppath}/%{name}-%{version}-root
35
Prereq: /usr/bin/gconftool-2
36
Prereq: /sbin/ldconfig
37
PreReq: /sbin/install-info
39
Requires: libgnomeui >= %{libgnomeui_version}
40
Requires: libgnomeprintui22 >= %{libgnomeprintui22_version}
41
Requires: guile >= %{guile_version}
42
Requires: gtkhtml3 >= %{gtkhtml3_version}
44
BuildRequires: libgnomeui-devel >= %{libgnomeui_version}
45
BuildRequires: libgnomeprintui22-devel >= %{libgnomeprintui22_version}
46
BuildRequires: gtkhtml3-devel >= %{gtkhtml3_version}
47
BuildRequires: bzip2-devel, expat-devel, guile-devel
48
BuildRequires: libglade2-devel, libgsf-devel
49
BuildRequires: libjpeg-devel, openssl-devel
52
GnuCash is a personal finance manager. A check-book like
53
register GUI allows you to enter and track bank accounts,
54
stocks, income and even currency trades. The interface is
55
designed to be simple and easy to use, but is backed with
56
double-entry accounting principles to ensure balanced books.
60
Summary: Header files for GnuCash development.
61
Group: Development/Libraries
62
Requires: gnucash = %{version}
65
This package contains header files for GnuCash development.
66
Install this package if you want to use GnuCash libraries
72
Summary: Enables OFX importing in GnuCash
73
Group: Applications/Finance
74
Requires: gnucash = %{version}
75
Requires: libofx >= %{libofx_version}
79
This package adds OFX file import support to the base
80
GnuCash package. Install this package if you want to
86
Summary: Enables HBCI importing in GnuCash
87
Group: Applications/Finance
88
Requires: gnucash = %{version}
89
Requires: aqbanking >= %{aqbanking_version}
90
BuildRequires: aqbanking-devel
93
This package adds HBCI file import support to the base
94
GnuCash package. Install this package if you want to
99
%package backend-postgres
100
Summary: Backend for storing GnuCash data in a PostgreSQL database.
101
Group: Applications/Finance
102
Requires: gnucash = %{version}
103
Requires: postgresql >= %{postgresql_version}
104
BuildRequires: postgresql-devel
106
%description backend-postgres
108
This package contains a backend for storing your GnuCash accounts and
109
transactions in a PostgreSQL database. Install this package if you
110
want to keep your financial data in a database instead of a flat file
111
(recommended for large volumes of data and commercial sites).
126
%if %{_with_postgres}
132
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
134
cp -p src/backend/postgres/README README.postgres
137
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
139
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
140
LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$RPM_BUILD_ROOT%{_libdir}/gnucash make DESTDIR=$RPM_BUILD_ROOT install
141
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
145
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/%{_infodir}/dir
148
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
152
/sbin/install-info %{_infodir}/gnucash-design.info.gz %{_infodir}/dir
154
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
155
SCHEMAS=%{_sysconfdir}/gconf/schemas/apps_gnucash*.schemas
156
for S in $SCHEMAS; do
157
gconftool-2 --makefile-install-rule $S > /dev/null
161
if [ "$1" -eq 0 ]; then
162
#deleting the schema on package removal
163
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
164
SCHEMAS=%{_sysconfdir}/gconf/schemas/apps_gnucash*.schemas
165
for S in $SCHEMAS; do
166
gconftool-2 --makefile-uninstall-rule $S > /dev/null
173
/sbin/install-info --delete %{_infodir}/gnucash-design.info.gz %{_infodir}/dir
176
%files -f %{name}.lang
177
%defattr(444,root,root,755)
178
%attr(555,root,root) %{_bindir}/*
179
%attr(555,root,root) %{_libexecdir}/gnucash
181
%{_infodir}/gnucash*info*
184
%{_datadir}/applications/*
185
%{_datadir}/xml/gnucash/xsl/*
186
%{_datadir}/pixmaps/*
187
%{_sysconfdir}/gconf/schemas/apps_gnucash*
189
%exclude %{_libdir}/gnucash/libgncmod-ofx*
192
%exclude %{_libdir}/gnucash/libgncmod-hbci*
193
%exclude %{_datadir}/gnucash/glade/hbci*
194
%exclude %{_sysconfdir}/gconf/schemas/apps_gnucash_dialog_hbci.schemas
196
%if %{_with_postgres}
197
%exclude %{_libdir}/libgnc-backend-postgres*
199
%config %{_sysconfdir}/gnucash
200
%doc AUTHORS COPYING ChangeLog* DOCUMENTERS HACKING LICENSE NEWS README README.patches
201
%doc doc/README.german doc/README.francais doc/guile-hackers.txt
204
%defattr(444,root,root,755)
205
%{_includedir}/gnucash
209
%defattr(444,root,root,755)
210
%{_libdir}/gnucash/libgncmod-ofx*
216
%defattr(444,root,root,755)
217
%{_libdir}/gnucash/libgncmod-hbci*
218
%{_datadir}/gnucash/glade/hbci*
219
%{_sysconfdir}/gconf/schemas/apps_gnucash_dialog_hbci.schemas
223
%if %{_with_postgres}
224
%files backend-postgres
225
%defattr(444,root,root,755)
226
%{_libdir}/libgnc-backend-postgres*