pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/finance ledger2beancount: Import version 2.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/29bcfe47a1e3
branches:  trunk
changeset: 425654:29bcfe47a1e3
user:      riastradh <riastradh%pkgsrc.org@localhost>
date:      Mon Mar 23 02:29:49 2020 +0000

description:
ledger2beancount: Import version 2.0

diffstat:

 finance/Makefile                                      |   3 +-
 finance/ledger2beancount/DESCR                        |   6 ++
 finance/ledger2beancount/Makefile                     |  50 +++++++++++++++++++
 finance/ledger2beancount/PLIST                        |   4 +
 finance/ledger2beancount/distinfo                     |   7 ++
 finance/ledger2beancount/patches/patch-tests_runtests |  30 +++++++++++
 6 files changed, 99 insertions(+), 1 deletions(-)

diffs (134 lines):

diff -r a0c834ab3088 -r 29bcfe47a1e3 finance/Makefile
--- a/finance/Makefile  Mon Mar 23 02:29:17 2020 +0000
+++ b/finance/Makefile  Mon Mar 23 02:29:49 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.71 2020/03/22 21:27:51 riastradh Exp $
+# $NetBSD: Makefile,v 1.72 2020/03/23 02:29:49 riastradh Exp $
 #
 
 COMMENT=       Monetary, financial and related applications
@@ -19,6 +19,7 @@
 SUBDIR+=       gnucash-docs
 SUBDIR+=       homebank
 SUBDIR+=       ledger
+SUBDIR+=       ledger2beancount
 SUBDIR+=       libofx
 SUBDIR+=       magento
 SUBDIR+=       moneyguru
diff -r a0c834ab3088 -r 29bcfe47a1e3 finance/ledger2beancount/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/ledger2beancount/DESCR    Mon Mar 23 02:29:49 2020 +0000
@@ -0,0 +1,6 @@
+A script to automatically convert ledger-based textual ledgers
+(finance/ledger) to beancount-based ones (finance/py-beancount).
+
+Conversion is based on (concrete) syntax, so that information that is
+not meaningful for accounting reasons but still valuable (e.g.,
+comments, formatting, etc.) can be preserved.
diff -r a0c834ab3088 -r 29bcfe47a1e3 finance/ledger2beancount/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/ledger2beancount/Makefile Mon Mar 23 02:29:49 2020 +0000
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.1 2020/03/23 02:29:49 riastradh Exp $
+
+DISTNAME=      ledger2beancount-2.0
+CATEGORIES=    finance
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=zacchiro/}
+GITHUB_PROJECT=        ledger2beancount
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/zacchiro/ledger2beancount/
+COMMENT=       Script to convert ledger to beancount
+LICENSE=       gnu-gpl-v3
+
+USE_TOOLS+=    gmake
+USE_TOOLS+=    perl:run
+
+TOOL_DEPENDS+= scdoc>=0:../../textproc/scdoc
+
+DEPENDS+=      p5-Config-Onion>=0:../../devel/p5-Config-Onion
+DEPENDS+=      p5-Date-Calc>=0:../../devel/p5-Date-Calc
+DEPENDS+=      p5-DateTime-Format-Strptime>=1.58:../../time/p5-DateTime-Format-Strptime
+DEPENDS+=      p5-File-BaseDir>=0:../../devel/p5-File-BaseDir
+DEPENDS+=      p5-Getopt-Long-Descriptive>=0:../../devel/p5-Getopt-Long-Descriptive
+DEPENDS+=      p5-String-Interpolate>=0:../../textproc/p5-String-Interpolate
+
+REPLACE_PERL+= bin/ledger2beancount
+
+BUILD_TARGET=  man
+
+INSTALLATION_DIRS+=    bin
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man1
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man5
+
+do-install:
+       ${INSTALL_SCRIPT} ${WRKSRC}/bin/ledger2beancount ${DESTDIR}${PREFIX}/bin/.
+       ${INSTALL_MAN} ${WRKSRC}/docs/ledger2beancount.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/.
+       ${INSTALL_MAN} ${WRKSRC}/docs/ledger2beancount.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/.
+
+TEST_DEPENDS+= coreutils>=0:../../sysutils/coreutils
+TEST_DEPENDS+= ledger>=3.0.0:../../finance/ledger
+TEST_DEPENDS+= ${PYPKGPREFIX}-beancount>=0:../../finance/py-beancount
+TEST_DEPENDS+= p5-YAML-Syck>=0:../../textproc/p5-YAML-Syck
+
+USE_TOOLS+=    gsed:test
+
+TEST_ENV+=     SORT=gsort
+
+TEST_TARGET=   test
+
+.include "../../lang/python/pyversion.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r a0c834ab3088 -r 29bcfe47a1e3 finance/ledger2beancount/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/ledger2beancount/PLIST    Mon Mar 23 02:29:49 2020 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2020/03/23 02:29:49 riastradh Exp $
+bin/ledger2beancount
+man/man1/ledger2beancount.1
+man/man5/ledger2beancount.5
diff -r a0c834ab3088 -r 29bcfe47a1e3 finance/ledger2beancount/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/ledger2beancount/distinfo Mon Mar 23 02:29:49 2020 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/03/23 02:29:49 riastradh Exp $
+
+SHA1 (ledger2beancount-2.0.tar.gz) = f323279e3e1e467b9f40ebc3d26b31d11799b4c0
+RMD160 (ledger2beancount-2.0.tar.gz) = f81bba80803c3b7235aff03ae6c7c05b6397d96e
+SHA512 (ledger2beancount-2.0.tar.gz) = a5a741b8af1bb26d0c01673c70e0aee49926d3acfe36b5f160e01d0038f459902beaed89c69bd6179ade09798a0c6103c960796d8bf9a23897791bdefc51e360
+Size (ledger2beancount-2.0.tar.gz) = 67729 bytes
+SHA1 (patch-tests_runtests) = d856c35d7bef8193618c09c6fb8b6e91b52abb0b
diff -r a0c834ab3088 -r 29bcfe47a1e3 finance/ledger2beancount/patches/patch-tests_runtests
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/ledger2beancount/patches/patch-tests_runtests     Mon Mar 23 02:29:49 2020 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-tests_runtests,v 1.1 2020/03/23 02:29:49 riastradh Exp $
+
+- Let the environment specify SORT so we can set it from the makefile.
+- Avoid C.UTF-8 locale.
+
+--- tests/runtests.orig        2020-02-22 07:25:00.000000000 +0000
++++ tests/runtests
+@@ -3,11 +3,13 @@
+ status=0
+ 
+ # We need sort from coreutils for -V
++if [ -z "${SORT-}" ]; then
+ case `uname -s` in
+       Linux*) SORT=sort ;;
+       Darwin*) SORT=gsort ;;
+       *) SORT=sort ;;
+ esac
++fi
+ 
+ test_conversion () {
+       test=$1
+@@ -68,7 +70,7 @@ test_validity_beancount () {
+       fi
+ }
+ 
+-export LC_ALL=C.UTF-8
++export LC_ALL=en_US.UTF-8
+ 
+ ledger_version=$(ledger --version 2>/dev/null | grep "^Ledger [0-9]" | cut -d " " -f 2 | cut -d . -f 1)
+ if [ -z $ledger_version ]; then



Home | Main Index | Thread Index | Old Index