From 49a100bd5fa46ad4b75aa68495345ae691b984ded3d1f68b7144a0bbc5bc07c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Fri, 18 Dec 2020 12:53:24 +0000 Subject: [PATCH 1/3] osc copypac from project:devel:languages:haskell:ghc-8.10.x package:hledger-interest revision:9, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/hledger-interest?expand=0&rev=8 --- hledger-interest.cabal | 127 +++++++++++++++++++++++++++++++++++++++ hledger-interest.changes | 11 ++++ hledger-interest.spec | 8 +++ 3 files changed, 146 insertions(+) create mode 100644 hledger-interest.cabal diff --git a/hledger-interest.cabal b/hledger-interest.cabal new file mode 100644 index 0000000..9c6f33b --- /dev/null +++ b/hledger-interest.cabal @@ -0,0 +1,127 @@ +Name: hledger-interest +Version: 1.6.0 +x-revision: 1 +Synopsis: computes interest for a given account +License: BSD3 +License-file: LICENSE +Author: Peter Simons +Maintainer: Peter Simons +Homepage: https://github.com/peti/hledger-interest +Category: Finance +Build-type: Simple +Cabal-version: >= 1.10 +Extra-source-files: README.md +Stability: stable +tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5 + , GHC == 8.8.4, GHC == 8.10.2 + +Description: + hledger-interest is a small command-line utility based on Simon + Michael's hleder library. Its purpose is to compute interest for a + given ledger account. Using command line flags, the program can be + configured to use various schemes for day-counting, such as act\/act, + 30\/360, 30E\/360, and 30\/360isda. Furthermore, it supports a (small) + number of interest schemes, i.e. annual interest with a fixed rate and + the scheme mandated by the German BGB288 (Basiszins fuer + Verbrauchergeschaefte). Extending support for other schemes is fairly + easy, but currently requires changes to the source code. + . + As an example, consider the following loan, stored in a file called + @test.ledger@: + . + > 2008/09/26 Loan + > Assets:Bank EUR 10000.00 + > Liabilities:Bank + > + > 2008/11/27 Payment + > Assets:Bank EUR -3771.12 + > Liabilities:Bank + > + > 2009/05/03 Payment + > Assets:Bank EUR -1200.00 + > Liabilities:Bank + > + > 2010/12/10 Payment + > Assets:Bank EUR -3700.00 + > Liabilities:Bank + . + Suppose that loan earns 5% interest per year, and payments amortize + interest before amortizing the principal claim, then the resulting + ledger would look like this: + . + > $ hledger-interest --file=test.ledger --source=Expenses:Interest --target=Liabilities:Bank --30-360 --annual=0.05 Liabilities:Bank + > 2008/09/26 Loan + > Assets:Bank EUR 10000.00 + > Liabilities:Bank + > + > 2008/11/27 Payment + > Assets:Bank EUR -3771.12 + > Liabilities:Bank + > + > 2008/11/27 5.00% interest for EUR -10000.00 over 61 days + > Liabilities:Bank EUR -84.72 + > Expenses:Interest + > + > 2008/12/31 5.00% interest for EUR -6313.60 over 34 days + > Liabilities:Bank EUR -29.81 + > Expenses:Interest + > + > 2009/05/03 Payment + > Assets:Bank EUR -1200.00 + > Liabilities:Bank + > + > 2009/05/03 5.00% interest for EUR -6343.42 over 123 days + > Liabilities:Bank EUR -108.37 + > Expenses:Interest + > + > 2009/12/31 5.00% interest for EUR -5251.78 over 238 days + > Liabilities:Bank EUR -173.60 + > Expenses:Interest + > + > 2010/12/10 Payment + > Assets:Bank EUR -3700.00 + > Liabilities:Bank + > + > 2010/12/10 5.00% interest for EUR -5425.38 over 340 days + > Liabilities:Bank EUR -256.20 + > Expenses:Interest + > + > 2010/12/31 5.00% interest for EUR -1981.58 over 21 days + > Liabilities:Bank EUR -5.78 + > Expenses:Interest + . + Running the utility with @--help@ gives a brief overview over the + available options: + . + > Usage: hledger-interest [OPTION...] ACCOUNT + > -h --help print this message and exit + > -V --version show version number and exit + > -v --verbose echo input ledger to stdout (default) + > -q --quiet don't echo input ledger to stdout + > --today compute interest up until today + > -f FILE --file=FILE input ledger file (pass '-' for stdin) + > -s ACCOUNT --source=ACCOUNT interest source account + > -t ACCOUNT --target=ACCOUNT interest target account + > -I --ignore-assertions ignore any failing balance assertions + > --act use 'act' day counting convention + > --30-360 use '30/360' day counting convention + > --30E-360 use '30E/360' day counting convention + > --30E-360isda use '30E/360isda' day counting convention + > --constant=RATE constant interest rate + > --annual-schedule=SCHEDULE schedule of annual interest rates. + > syntax: '[(Date1,Rate1),(Date2,Rate2),...]' + > --annual=RATE annual interest rate + > --bgb288 compute interest according to German BGB288 + +Source-Repository head + Type: git + Location: git://github.com/peti/hledger-interest.git + +Executable hledger-interest + default-language: Haskell2010 + Main-is: Main.hs + Build-depends: base >= 3 && < 5, hledger-lib >= 1.19 && < 1.21, time, mtl, Cabal, Decimal, text + other-modules: Hledger.Interest + Hledger.Interest.DayCountConvention + Hledger.Interest.Rate + Paths_hledger_interest diff --git a/hledger-interest.changes b/hledger-interest.changes index 3278c7c..6b0418b 100644 --- a/hledger-interest.changes +++ b/hledger-interest.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Oct 17 12:20:00 UTC 2020 - Ondřej Súkup + +- force i686 arch on i586 + +------------------------------------------------------------------- +Tue Dec 8 09:22:52 UTC 2020 - psimons@suse.com + +- Update hledger-interest to version 1.6.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + ------------------------------------------------------------------- Fri Sep 4 02:01:38 UTC 2020 - psimons@suse.com diff --git a/hledger-interest.spec b/hledger-interest.spec index bc50b1c..6f623a5 100644 --- a/hledger-interest.spec +++ b/hledger-interest.spec @@ -23,6 +23,7 @@ Summary: Computes interest for a given account License: BSD-3-Clause URL: https://hackage.haskell.org/package/%{name} Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{name}-%{version}/revision/1.cabal#/%{name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-Decimal-devel BuildRequires: ghc-hledger-lib-devel @@ -30,6 +31,12 @@ BuildRequires: ghc-mtl-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-text-devel BuildRequires: ghc-time-devel +# GHC dont support i586 +%ifarch %{ix86} +ExclusiveArch: i586 i686 +ExclusiveArch: i686 +%{expand:%%global optflags %(echo "%{optflags}"|sed -e s/i586/i686/) -march=i686 -mtune=generic} +%endif %description Hledger-interest is a small command-line utility based on Simon Michael's @@ -87,6 +94,7 @@ German BGB288. %prep %autosetup +cp -p %{SOURCE1} %{name}.cabal %build %ghc_bin_build From f7189f2e73305a6660cfd5739f6bbbbff2c159f94726ab3dc41aaf622635f803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 19 Dec 2020 17:49:42 +0000 Subject: [PATCH 2/3] osc copypac from project:devel:languages:haskell:ghc-8.10.x package:hledger-interest revision:11, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/hledger-interest?expand=0&rev=9 --- hledger-interest.changes | 2 +- hledger-interest.spec | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hledger-interest.changes b/hledger-interest.changes index 6b0418b..3ed1a8f 100644 --- a/hledger-interest.changes +++ b/hledger-interest.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Thu Oct 17 12:20:00 UTC 2020 - Ondřej Súkup -- force i686 arch on i586 +- disable %{ix86} build ------------------------------------------------------------------- Tue Dec 8 09:22:52 UTC 2020 - psimons@suse.com diff --git a/hledger-interest.spec b/hledger-interest.spec index 6f623a5..b55dad0 100644 --- a/hledger-interest.spec +++ b/hledger-interest.spec @@ -31,12 +31,7 @@ BuildRequires: ghc-mtl-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-text-devel BuildRequires: ghc-time-devel -# GHC dont support i586 -%ifarch %{ix86} -ExclusiveArch: i586 i686 -ExclusiveArch: i686 -%{expand:%%global optflags %(echo "%{optflags}"|sed -e s/i586/i686/) -march=i686 -mtune=generic} -%endif +ExcludeArch: %{ix86} %description Hledger-interest is a small command-line utility based on Simon Michael's From 0896a0da062d98541eb5458aa7b02a2f549226044af270464fa9370b99c645bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Sat, 19 Dec 2020 18:29:46 +0000 Subject: [PATCH 3/3] osc copypac from project:devel:languages:haskell:ghc-8.10.x package:hledger-interest revision:12, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/hledger-interest?expand=0&rev=10 --- hledger-interest.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-interest.changes b/hledger-interest.changes index 3ed1a8f..0c2810b 100644 --- a/hledger-interest.changes +++ b/hledger-interest.changes @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Thu Oct 17 12:20:00 UTC 2020 - Ondřej Súkup +Thu Dec 17 12:20:00 UTC 2020 - Ondřej Súkup - disable %{ix86} build