Name: ledger Version: 2.6.2 Release: 1%{?dist} Summary: Command-line double-entry accounting system Group: Applications/Productivity License: BSD URL: http://wiki.github.com/jwiegley/ledger/ Source0: http://github.com/downloads/jwiegley/ledger/ledger-2.6.2.tar.gz # Adds man page, from Ubuntu package. Source1: ledger.1 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Rquired to build with latest GCC. Fixed in upstream git. Patch0: const-char-2.6.2.patch # Fixes non-UTF8 info page, from Ubuntu package. Patch1: utf8-info-2.6.2.patch BuildRequires: libofx-devel expat-devel gmp-devel pcre-devel Requires: gmp pcre %description Ledger is a powerful, double-entry accounting system that is accessed from the UNIX command-line. %package devel Summary: Development files for the Ledger double-entry accounting system Requires: %{name} = %{version}-%{release} Provides: %{name}-static = %{version}-%{release} %description devel This package contains the C++ header files and static libraries needed to build software that uses the Ledger API. %package -n emacs-common-ledger BuildRequires: emacs Summary: Emacs extensions for the Ledger double-entry accounting system Requires: emacs(bin) >= %{_emacs_version} Requires: %{name} = %{version}-%{release} %description -n emacs-common-ledger This package contains extensions for GNU Emacs for the Ledger double-entry accounting system. %package -n emacs-common-ledger-el Summary: Emacs elisp source for the Ledger double-entry accounting system Requires: %{name} = %{version}-%{release} Requires: emacs-common-%{name} = %{version}-%{release} %description -n emacs-common-ledger-el This package contains the elisp source files for Ledger under GNU Emacs. You do not need to install this package to run Ledger. Install the %{name} package to use Ledger with GNU Emacs. %prep %setup -q %patch0 -p1 %patch1 %build %configure CPPFLAGS=-I/usr/include/libofx make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # install man mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 cp -a %{SOURCE1} $RPM_BUILD_ROOT/%{_mandir}/man1 %clean rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : %preun if [ $1 = 0 ] ; then /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : fi %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %{_bindir}/%{name} %{_libdir}/libamounts.so.0 %{_libdir}/libamounts.so.0.0.0 %{_libdir}/libledger.so %{_libdir}/libledger-2.6.2.so %doc README TODO NEWS LICENSE scripts %doc %{_mandir}/man1/%{name}.* %doc %{_infodir}/%{name}.info.gz %files devel %defattr(-,root,root,-) %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/libamounts.so %{_includedir}/%{name}/*.h %files -n emacs-common-ledger %defattr(-,root,root,-) %{_emacs_sitelispdir}/*.elc %files -n emacs-common-ledger-el %defattr(-,root,root,-) %{_emacs_sitelispdir}/*.el %changelog * Tue Apr 8 2010 Ed Marshall 2.6.2-1 - Initial spec.