File ledger.spec of Package ledger
#
# spec file for package ledger
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ledger
Version: 3.1
Release: 0
Summary: Double-entry accounting system with a command-line reporting interface
License: BSD-3-Clause
Group: Productivity/Office/Finance
Url: https://github.com/%{name}/%{name}
Source: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz
# PATCH-FIX-UPSTREAM ledger-3.1-convert-boost::optional-objects-to-bool-explicitly.patch -- picked from upstream
Patch0: ledger-3.1-convert-boost::optional-objects-to-bool-explicitly.patch
# PATCH-FIX-UPSTREAM ledger-3.1-fix-build-with-boost-1.58.patch -- picked from upstream
Patch1: ledger-3.1-fix-build-with-boost-1.58.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: mpfr-devel
BuildRequires: python
BuildRequires: utfcpp-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Ledger is a powerful, double-entry accounting system that is accessed
from the UNIX command-line. This may put off some users, since there is
no flashy UI, but for those who want unparalleled reporting access to
their data there are few alternatives.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%cmake -DBUILD_LIBRARY=OFF
make %{?_smp_mflags}
%install
%cmake_install
install -m 644 -D contrib/ledger-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/ledger.sh
%files
%defattr(-,root,root)
%doc README.md doc/LICENSE
%doc %{_mandir}/man1/%{name}.1.gz
%{_bindir}/ledger
%{_sysconfdir}/bash_completion.d/ledger.sh
%changelog