Blob Blame History Raw
%define GRISBI_HELP_DIR %{_datadir}/doc/%{name}/help
Name:		grisbi
Version:	0.5.7
Release:	1%{?dist}
Summary:	Personal finances manager

Group:		Applications/Productivity
License:	GPL
URL:		http://www.grisbi.org
Source0:	http://dl.sf.net/grisbi/%{name}-%{version}.tar.bz2
Source1:	%{name}.desktop
Patch0:		%{name}-0.5.5-htmlview.diff
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	gtk2-devel, libxml2-devel, glib2-devel, gettext
BuildRequires:	desktop-file-utils, libofx-devel >= 0.7.0
Requires:	htmlview
# for report generation
Requires:	tetex-unicode, tetex-dvips

%description
Grisbi is a very functional personal financial management program
with a lot of features: checking, cash and liabilities accounts,
several accounts with automatic contra entries, several currencies,
including euro, arbitrary currency for every operation, money
interchange fees, switch to euro account per account, description
of the transactions with third parties, categories, sub-categories,
financial year, notes, breakdown, transfers between accounts, even
for accounts of different currencies, bank reconciliation, scheduled
transactions, automatic recall of last transaction for every third
party, nice and easy user interface, user manual, QIF import/export.

%prep
%setup -q
%patch0

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

for lang in C de fr
do
  mv $RPM_BUILD_ROOT%{GRISBI_HELP_DIR}/${lang}/grisbi-manuel.html $RPM_BUILD_ROOT%{GRISBI_HELP_DIR}/${lang}/grisbi-manuel.bin.html
  touch $RPM_BUILD_ROOT%{GRISBI_HELP_DIR}/${lang}/grisbi-manuel.html
done

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category "Office" \
  --add-category "Finance" \
  --add-category "X-Fedora" \
  %{SOURCE1}

ln -s grisbi/grisbi.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/grisbi.png

%find_lang %{name}

%post
if [ $1 -eq 1 ] ; then
  for lang in C de fr
  do
    alternatives --install %{GRISBI_HELP_DIR}/${lang}/grisbi-manuel.html grisbi-manuel-${lang} %{GRISBI_HELP_DIR}/${lang}/grisbi-manuel.bin.html 10 || :
  done
fi

%postun
if [ $1 -eq 0 ] ; then
  for lang in C de fr
  do
    alternatives --remove grisbi-manuel-${lang} %{GRISBI_HELP_DIR}/${lang}/grisbi-manuel.bin.html || :
  done
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS COPYING NEWS OLDNEWS README ABOUT-NLS
%attr(755,root,root) %{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/mime-info/%{name}.*
%{_datadir}/pixmaps/*
%dir %{_datadir}/doc/%{name}
%dir %{_datadir}/doc/%{name}/help
%dir %{_datadir}/doc/%{name}/help/C
%dir %{_datadir}/doc/%{name}/help/de
%dir %{_datadir}/doc/%{name}/help/fr
%{_datadir}/doc/%{name}/help/C/*.gif
%{_datadir}/doc/%{name}/help/C/grisbi-manuel.bin.html
%{_datadir}/doc/%{name}/help/C/quickstart.html
%{_datadir}/doc/%{name}/help/C/translation.html
%{_datadir}/doc/%{name}/help/C/topic.dat
%{_datadir}/doc/%{name}/help/de/*.gif
%{_datadir}/doc/%{name}/help/de/grisbi-manuel.bin.html
%{_datadir}/doc/%{name}/help/de/quickstart.html
%{_datadir}/doc/%{name}/help/de/translation.html
%{_datadir}/doc/%{name}/help/de/topic.dat
%{_datadir}/doc/%{name}/help/fr/*.gif
%{_datadir}/doc/%{name}/help/fr/grisbi-manuel.bin.html
%{_datadir}/doc/%{name}/help/fr/quickstart.html
%{_datadir}/doc/%{name}/help/fr/translation.html
%{_datadir}/doc/%{name}/help/fr/topic.dat
%{_mandir}/man1/*
%ghost %{_datadir}/doc/%{name}/help/C/grisbi-manuel.html
%ghost %{_datadir}/doc/%{name}/help/de/grisbi-manuel.html
%ghost %{_datadir}/doc/%{name}/help/fr/grisbi-manuel.html

%changelog
* Sat Jun 11 2005 Aurelien Bompard <gauret[AT]free.fr> 0.5.7-1
- version 0.5.7

* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 0.5.5-4.fc4
- rebuild on all arches

* Mon Mar 21 2005 Aurelien Bompard <gauret[AT]free.fr> 0.5.5-3.fc4
- BR libofx-devel >= 0.7.0
- change release tag for FC4

* Sat Feb 26 2005 Aurelien Bompard <gauret[AT]free.fr> 0.5.5-2
- rebuild for new libofx
- drop epoch

* Mon Jan 10 2005 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0:0.5.5-1
  - New version
  - Fix alternatives setup
* Sat Nov 27 2004 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0:0.5.3-0.fdr.1
  - New version
* Tue Nov 2 2004 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0:0.5.2-0.fdr.4
  - Rename htmlview patch
  - Force scriplet to return 0
* Fri Oct 29 2004 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0:0.5.2-0.fdr.3
  - Patch to fix bugs #468, #470
* Fri Oct 22 2004 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0:0.5.2-0.fdr.2
  - %{GRISBI_HELP_DIR}/${lang}/grisbi-manuel.html should be owned by the
    package.
  - Improve %post and %postun scripts depends upon whe are installing or
    upgrading.
* Fri Oct 15 2004 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0:0.5.2-0.fdr.1
  - New version
* Wed Sep 15 2004 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0:0.5.1-0.fdr.2
  - Use "alternatives" to manage separate documentation package
* Sat Jul 31 2004 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 0:0.5.1-0.fdr.1
  - New version
  - Patches to fix some compilation warnings
  - Add %post and %preun scripts to manage separate documentation package
* Fri Jul 23 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.5.0-0.fdr.3
  - Fix typo in summary
  - Change category to "Office"
  - Change Terminal=0 to Terminal=false in desktop file
* Tue Jun 01 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.5.0-0.fdr.2
  - BR: libofx-devel to enable OFX import
* Mon May 31 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.5.0-0.fdr.1
  - Initial Fedora RPM