~siretart/gnucash/ubuntu-fullsource

« back to all changes in this revision

Viewing changes to packaging/gnucash.spec.in

  • Committer: Reinhard Tartler
  • Date: 2008-08-03 07:25:46 UTC
  • Revision ID: siretart@tauware.de-20080803072546-y6p8xda8zpfi62ys
import gnucash_2.2.4.orig.tar.gz

The original tarball had the md5sum: 27e660297dc5b8ce574515779d05a5a5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Spec file for FC4
 
3
#
 
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
 
7
%define _with_ofx 0
 
8
%define _with_hbci 0
 
9
 
 
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
 
15
 
 
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
 
23
 
 
24
Name:           gnucash
 
25
Summary:        GnuCash is an application to keep track of your finances.
 
26
Version:        %{version}
 
27
Release:        1.FC%{fc_rel}
 
28
License:        GPL
 
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
 
33
 
 
34
Prereq:         GConf2
 
35
Prereq:         /usr/bin/gconftool-2
 
36
Prereq:         /sbin/ldconfig
 
37
PreReq:         /sbin/install-info
 
38
 
 
39
Requires:       libgnomeui >= %{libgnomeui_version}
 
40
Requires:       libgnomeprintui22 >= %{libgnomeprintui22_version}
 
41
Requires:       guile >= %{guile_version}
 
42
Requires:       gtkhtml3 >= %{gtkhtml3_version}
 
43
 
 
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
 
50
 
 
51
%description
 
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.
 
57
 
 
58
 
 
59
%package devel
 
60
Summary: Header files for GnuCash development.
 
61
Group: Development/Libraries
 
62
Requires: gnucash = %{version}
 
63
 
 
64
%description devel
 
65
This package contains header files for GnuCash development.
 
66
Install this package if you want to use GnuCash libraries
 
67
in C programs.
 
68
 
 
69
 
 
70
%if %{_with_ofx}
 
71
%package ofx
 
72
Summary: Enables OFX importing in GnuCash
 
73
Group: Applications/Finance
 
74
Requires: gnucash = %{version}
 
75
Requires: libofx >= %{libofx_version}
 
76
BuildRequires: libofx
 
77
 
 
78
%description ofx
 
79
This package adds OFX file import support to the base
 
80
GnuCash package. Install this package if you want to
 
81
import OFX files.
 
82
%endif
 
83
 
 
84
%if %{_with_hbci}
 
85
%package hbci
 
86
Summary: Enables HBCI importing in GnuCash
 
87
Group: Applications/Finance
 
88
Requires: gnucash = %{version}
 
89
Requires: aqbanking >= %{aqbanking_version}
 
90
BuildRequires: aqbanking-devel
 
91
 
 
92
%description hbci
 
93
This package adds HBCI file import support to the base
 
94
GnuCash package. Install this package if you want to
 
95
import HBCI files.
 
96
%endif
 
97
 
 
98
%if %{_with_postgres}
 
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
 
105
 
 
106
%description backend-postgres
 
107
 
 
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).
 
112
%endif
 
113
 
 
114
 
 
115
%prep
 
116
%setup -q
 
117
 
 
118
%build
 
119
%configure \
 
120
%if %{_with_ofx}
 
121
 --enable-ofx \
 
122
%endif
 
123
%if %{_with_hbci}
 
124
 --enable-hbci \
 
125
%endif
 
126
%if %{_with_postgres}
 
127
 --enable-sql \
 
128
%endif
 
129
 --enable-gui
 
130
 
 
131
 
 
132
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
 
133
 
 
134
cp -p src/backend/postgres/README README.postgres
 
135
 
 
136
%install
 
137
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 
138
 
 
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
 
142
 
 
143
%find_lang %name
 
144
 
 
145
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/%{_infodir}/dir
 
146
 
 
147
%clean
 
148
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 
149
 
 
150
%post
 
151
/sbin/ldconfig
 
152
/sbin/install-info %{_infodir}/gnucash-design.info.gz %{_infodir}/dir
 
153
 
 
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
 
158
done
 
159
 
 
160
%preun
 
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
 
167
     done
 
168
fi
 
169
 
 
170
%postun
 
171
/sbin/ldconfig
 
172
if [ $1 = 0 ]; then
 
173
   /sbin/install-info --delete %{_infodir}/gnucash-design.info.gz %{_infodir}/dir
 
174
fi
 
175
 
 
176
%files -f %{name}.lang
 
177
%defattr(444,root,root,755)
 
178
%attr(555,root,root) %{_bindir}/*
 
179
%attr(555,root,root) %{_libexecdir}/gnucash
 
180
%{_mandir}/man*/*
 
181
%{_infodir}/gnucash*info*
 
182
%{_libdir}/*
 
183
%{_datadir}/gnucash
 
184
%{_datadir}/applications/*
 
185
%{_datadir}/xml/gnucash/xsl/*
 
186
%{_datadir}/pixmaps/*
 
187
%{_sysconfdir}/gconf/schemas/apps_gnucash*
 
188
%if %{_with_ofx}
 
189
%exclude %{_libdir}/gnucash/libgncmod-ofx*
 
190
%endif
 
191
%if %{_with_hbci}
 
192
%exclude %{_libdir}/gnucash/libgncmod-hbci*
 
193
%exclude %{_datadir}/gnucash/glade/hbci*
 
194
%exclude %{_sysconfdir}/gconf/schemas/apps_gnucash_dialog_hbci.schemas
 
195
%endif
 
196
%if %{_with_postgres}
 
197
%exclude %{_libdir}/libgnc-backend-postgres*
 
198
%endif
 
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
 
202
 
 
203
%files devel
 
204
%defattr(444,root,root,755)
 
205
%{_includedir}/gnucash
 
206
 
 
207
%if %{_with_ofx}
 
208
%files ofx
 
209
%defattr(444,root,root,755)
 
210
%{_libdir}/gnucash/libgncmod-ofx*
 
211
%doc doc/README.OFX
 
212
%endif
 
213
 
 
214
%if %{_with_hbci}
 
215
%files hbci
 
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
 
220
%doc doc/README.HBCI
 
221
%endif
 
222
 
 
223
%if %{_with_postgres}
 
224
%files backend-postgres
 
225
%defattr(444,root,root,755)
 
226
%{_libdir}/libgnc-backend-postgres*
 
227
%doc README.postgres
 
228
%endif