From ef16d74bf069cbb6c89bf652cb53d2e2e75c55eb Mon Sep 17 00:00:00 2001 From: Chris Lyttle Date: Mon, 3 Feb 2003 05:47:33 +0000 Subject: [PATCH] add build options git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7931 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 4 ++ rpm/gnucash.spec.in | 140 +++++++++++++++++++++++++++++++------------- 2 files changed, 102 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4791fe5ad2..15f8cac319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-02-02 Chris Lyttle + + * rpm/gnucash.spec.in: add options to build ofx,hbci and postgresql + 2003-02-02 Benoit Grégoire * doc/README.OFX: I've quickly put together some docs for the ofx module and transaction matching. Also includes a FAQ. Not perfect, but should closebug 99478. diff --git a/rpm/gnucash.spec.in b/rpm/gnucash.spec.in index ac0d564997..bc35942f57 100644 --- a/rpm/gnucash.spec.in +++ b/rpm/gnucash.spec.in @@ -1,21 +1,17 @@ -# Check whether GnuCash should be build with or without the Postgres backend. -# When building GnuCash, pass "--with postgres" or "--without postgres" -# options, as in -# rpmbuild --with postgres -bb gnucash.spec -%if "%{_with_postgres}" == "--with-postgres" - %define _with_postgres 1 - %define sql_config --enable-sql -%else - %define _with_postgres 0 - %define sql_config --disable-sql -%endif +# Check whether GnuCash should build optional modules. +# To modify parameters, edit the .spec file, 0 is off, 1 is on +%define _with_postgres 0 +%define _with_ofx 0 +%define _with_hbci 0 + +%define rh_rel %(rpm -q --queryformat='%{VERSION}' redhat-release) %define version @-VERSION-@ %define __libtoolize /bin/true Name: gnucash Summary: GnuCash is an application to keep track of your finances. Version: %{version} -Release: 1 +Release: 1.RH%{rh_rel} Copyright: Free Software Foundation Group: Applications/Finance URL: http://www.gnucash.org @@ -38,12 +34,50 @@ designed to be simple and easy to use, but is backed with double-entry accounting principles to ensure balanced books. +%package devel +Summary: Header files for GnuCash development. +Group: Development/Libraries +Requires: gnucash = %{version} + +%description devel +This package contains header files for GnuCash development. +Install this package if you want to use GnuCash libraries +in C programs. + + +%if %{_with_ofx} +%package ofx +Summary: Enables OFX importing in GnuCash +Group: Applications/Finance +Requires: gnucash = %{version} libofx >= 0.6.2 +BuildPrereq: libofx + +%description ofx +This package adds OFX file import support to the base +GnuCash package. Install this package if you want to +import OFX files. +%endif + +%if %{_with_hbci} +%package hbci +Summary: Enables HBCI importing in GnuCash +Group: Applications/Finance +Requires: gnucash = %{version} openhbci >= 0.9.6 +BuildPrereq: openhbci + +%description hbci +This package adds HBCI file import support to the base +GnuCash package. Install this package if you want to +import HBCI files. +%endif + %if %{_with_postgres} %package backend-postgres Summary: Backend for storing GnuCash data in a PostgreSQL database. Group: Applications/Finance Requires: gnucash = %{version} -Requires: postgres >= 7.1.3 +Requires: postgresql >= 7.1.3 +BuildPrereq: postgresql-devel %description backend-postgres @@ -54,22 +88,23 @@ want to keep your financial data in a database instead of a flat file %endif -%package devel -Summary: Header files for GnuCash development. -Group: Development/Libraries -Requires: gnucash = %{version} - -%description devel -This package contains header files for GnuCash development. -Install this package if you want to use GnuCash libraries -in C programs. - %prep %setup -q %build autoconf -%configure %{sql_config} +%configure \ +%if %{_with_ofx} + --enable-ofx \ +%endif +%if %{_with_hbci} + --enable-hbci \ +%endif +%if %{_with_postgres} + --enable-sql \ +%endif + --enable-gui + make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" @@ -82,6 +117,8 @@ LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$RPM_BUILD_ROOT%{_libdir}/gnucash make DE %find_lang %name +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/%{_infodir}/dir + %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT @@ -101,35 +138,54 @@ fi %attr(555,root,root) %{_libexecdir}/gnucash %attr(555,root,root) %{_datadir}/gnucash/finance-quote-helper %attr(555,root,root) %{_datadir}/gnucash/finance-quote-check -%{_mandir}/man1/* +%{_mandir}/man*/* %{_infodir}/*.gz -%{_libdir}/gnucash/libgnc-* -%{_libdir}/gnucash/libgncmod-[a,c-z]* -%{_libdir}/gnucash/libgncmod-b[b-z]* -%{_libdir}/gnucash/libgncmod-backend-file* -%{_libdir}/gnucash/libgw* -%{_libdir}/lib* -%dir %{_datadir}/gnucash -%{_datadir}/gnucash/accounts -%{_datadir}/gnucash/doc -%{_datadir}/gnucash/glade -%{_datadir}/gnucash/guile-modules -%{_datadir}/gnucash/scm +%{_libdir}/* +%{_datadir}/gnucash %{_datadir}/gnome/apps/Applications/* %{_datadir}/pixmaps/gnucash %{_datadir}/mime-info/gnucash.* +%if %{_with_ofx} +%exclude %{_libdir}/gnucash/libgncmod-ofx* +%exclude %{_datadir}/gnucash/scm/ofx/* +%endif +%if %{_with_hbci} +%exclude %{_libdir}/gnucash/libgncmod-hbci* +%exclude %{_datadir}/gnucash/glade/hbci* +%exclude %{_datadir}/gnucash/scm/hbci/* +%endif +%if %{_with_postgres} +%exclude %{_libdir}/gnucash/libgncmod-backend-postgres* +%endif %config %{_sysconfdir}/gnucash %doc AUTHORS COPYING ChangeLog ChangeLog.1 HACKING NEWS README README.patches %doc doc/README.german doc/README.francais doc/guile-hackers.txt +%files devel +%defattr(444,root,root,755) +%{_includedir}/gnucash +%{_datadir}/aclocal/gnucash.m4 + +%if %{_with_ofx} +%files ofx +%defattr(444,root,root,755) +%{_libdir}/gnucash/libgncmod-ofx* +%{_datadir}/gnucash/scm/ofx/* +%doc doc/README.OFX +%endif + +%if %{_with_hbci} +%files hbci +%defattr(444,root,root,755) +%{_libdir}/gnucash/libgncmod-hbci* +%{_datadir}/gnucash/glade/hbci* +%{_datadir}/gnucash/scm/hbci/* +%doc doc/README.HBCI +%endif %if %{_with_postgres} %files backend-postgres +%defattr(444,root,root,755) %{_libdir}/gnucash/libgncmod-backend-postgres* %doc README.postgres %endif - -%files devel -%defattr(444,root,root,755) -%{_includedir}/gnucash -%{_datadir}/aclocal/gnucash.m4