File ledger.spec of Package ledger
#
# spec file for package ledger
#
# Copyright (c) 2017 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.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: https://patch-diff.githubusercontent.com/raw/ledger/ledger/pull/465.patch
%if 0%{?suse_version} > 1325
BuildRequires: libboost_date_time-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_iostreams-devel
BuildRequires: libboost_regex-devel
BuildRequires: libboost_test-devel
%else
BuildRequires: boost-devel
%endif
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
%patch -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 LICENSE.md
%doc %{_mandir}/man1/%{name}.1.gz
%{_bindir}/ledger
%{_sysconfdir}/bash_completion.d/ledger.sh
%changelog