osc copypac from project:devel:languages:haskell:ghc-9.10.x package:hledger-interest revision:3, using keep-link
OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/hledger-interest?expand=0&rev=43
This commit is contained in:
commit
b302237ce0
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
14
_constraints
Normal file
14
_constraints
Normal file
@ -0,0 +1,14 @@
|
||||
<constraints>
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<arch>ppc64</arch>
|
||||
<arch>ppc64le</arch>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">6</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
</constraints>
|
||||
|
3
hledger-interest-1.6.6.tar.gz
Normal file
3
hledger-interest-1.6.6.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a891f3786f0bb63818786bddffd1d67c1a265176f3fc97e76619bea7d3bb7442
|
||||
size 8578
|
3
hledger-interest-1.6.7.tar.gz
Normal file
3
hledger-interest-1.6.7.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e45a53e31d6e4074768627e3c976423448e63e2e4402133e8a5f200edff339ca
|
||||
size 8678
|
127
hledger-interest.cabal
Normal file
127
hledger-interest.cabal
Normal file
@ -0,0 +1,127 @@
|
||||
Name: hledger-interest
|
||||
Version: 1.6.6
|
||||
x-revision: 5
|
||||
Synopsis: computes interest for a given account
|
||||
License: BSD3
|
||||
License-file: LICENSE
|
||||
Author: Peter Simons <simons@cryp.to>
|
||||
Maintainer: Peter Simons <simons@cryp.to>
|
||||
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.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7,
|
||||
GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.7, GHC == 9.6.1
|
||||
|
||||
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: https://github.com/peti/hledger-interest.git
|
||||
|
||||
Executable hledger-interest
|
||||
default-language: Haskell2010
|
||||
Main-is: Main.hs
|
||||
Build-depends: base >= 3 && < 5, hledger-lib >= 1.26 && < 1.41, time, mtl, Cabal, Decimal, text
|
||||
other-modules: Hledger.Interest
|
||||
Hledger.Interest.DayCountConvention
|
||||
Hledger.Interest.Rate
|
||||
Paths_hledger_interest
|
133
hledger-interest.changes
Normal file
133
hledger-interest.changes
Normal file
@ -0,0 +1,133 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 10 11:14:38 UTC 2024 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.7.
|
||||
Upstream does not provide a change log file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 26 13:10:24 UTC 2024 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.6 revision 5.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 3 16:16:58 UTC 2024 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.6 revision 4.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 21 14:27:30 UTC 2024 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.6 revision 3.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 5 08:50:28 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.6 revision 2.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 4 18:01:18 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.6 revision 1.
|
||||
Upstream does not provide a change log file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 6 17:55:18 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.5 revision 2.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 30 17:09:17 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Updated spec file to conform with ghc-rpm-macros-2.5.2.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 14 07:36:02 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.5 revision 1.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 16 11:44:38 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.5.
|
||||
Upstream does not provide a change log file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 3 15:05:10 UTC 2022 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.4 revision 1.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 6 09:43:46 UTC 2022 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.4.
|
||||
Upstream does not provide a change log file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 14 13:03:36 UTC 2022 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.3 revision 2.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 5 21:47:52 UTC 2021 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update hledger-interest to version 1.6.3 revision 1.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 27 13:52:50 UTC 2021 - psimons@suse.com
|
||||
|
||||
- Update hledger-interest to version 1.6.3.
|
||||
Upstream does not provide a change log file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 17 08:49:48 UTC 2021 - psimons@suse.com
|
||||
|
||||
- Update hledger-interest to version 1.6.2.
|
||||
Upstream does not provide a change log file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 12 20:37:23 UTC 2021 - psimons@suse.com
|
||||
|
||||
- Update hledger-interest to version 1.6.1.
|
||||
Upstream does not provide a change log file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 17 12:20:00 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- disable %{ix86} build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
- Update hledger-interest to version 1.6.0.
|
||||
Upstream does not provide a change log file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 19 07:42:01 UTC 2020 - Michel Normand <normand@linux.vnet.ibm.com>
|
||||
|
||||
- Add _constraints with 6GB min disk space for ppc64/ppc64le
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 18 10:46:51 UTC 2020 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Replace %setup -q with the more modern %autosetup macro.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 9 09:26:20 UTC 2020 - psimons@suse.com
|
||||
|
||||
- Add hledger-interest at version 1.5.5.
|
||||
|
111
hledger-interest.spec
Normal file
111
hledger-interest.spec
Normal file
@ -0,0 +1,111 @@
|
||||
#
|
||||
# spec file for package hledger-interest
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# 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 https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: hledger-interest
|
||||
Version: 1.6.7
|
||||
Release: 0
|
||||
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
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
BuildRequires: ghc-Cabal-prof
|
||||
BuildRequires: ghc-Decimal-devel
|
||||
BuildRequires: ghc-Decimal-prof
|
||||
BuildRequires: ghc-base-devel
|
||||
BuildRequires: ghc-base-prof
|
||||
BuildRequires: ghc-hledger-lib-devel
|
||||
BuildRequires: ghc-hledger-lib-prof
|
||||
BuildRequires: ghc-mtl-devel
|
||||
BuildRequires: ghc-mtl-prof
|
||||
BuildRequires: ghc-rpm-macros
|
||||
BuildRequires: ghc-text-devel
|
||||
BuildRequires: ghc-text-prof
|
||||
BuildRequires: ghc-time-devel
|
||||
BuildRequires: ghc-time-prof
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
%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.
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%ghc_bin_build
|
||||
|
||||
%install
|
||||
%ghc_bin_install
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/%{name}
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user