diff options
author | Lionel Young <redtricycle@gmail.com> | 2010-09-17 04:36:30 -0400 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-09-21 22:09:37 -0500 |
commit | bdd31d857bae8b7d087079cc8ad1f925f91ddb92 (patch) | |
tree | 812b601885bf1cb14ab0686c36efa1bc3190c43d | |
parent | a8204879991f17470a905286f8da4cba456715c3 (diff) |
business/beancount: Added (command-line double-entry accounting)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
-rw-r--r-- | business/beancount/README | 10 | ||||
-rw-r--r-- | business/beancount/beancount.SlackBuild | 81 | ||||
-rw-r--r-- | business/beancount/beancount.info | 10 | ||||
-rw-r--r-- | business/beancount/beancount_web_fix.diff | 14 | ||||
-rw-r--r-- | business/beancount/slack-desc | 19 |
5 files changed, 134 insertions, 0 deletions
diff --git a/business/beancount/README b/business/beancount/README new file mode 100644 index 0000000000000..73989eaa1b727 --- /dev/null +++ b/business/beancount/README @@ -0,0 +1,10 @@ +Beancount is a double-entry accounting system that uses a simple text +file format as input. A few Python scripts are used to parse the +contents of the file, for example, to serve the contents as a locally +running web server. Scripts are provided to convert from OFX files into +Ledger input format, and other formats (easily extensible). + +Beancount provides a simple web front to view the contents of the +database, so you don't have to parse the entire file everytime you want +to view a different account (this helps mitigate the fact that parsing +is comparatively slow). diff --git a/business/beancount/beancount.SlackBuild b/business/beancount/beancount.SlackBuild new file mode 100644 index 0000000000000..6da48429912e7 --- /dev/null +++ b/business/beancount/beancount.SlackBuild @@ -0,0 +1,81 @@ +#!/bin/sh +# Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST +# Copyright 2009-2010 Eric Hameleers, Eindhoven, Netherlands +# Slackware build script for beancount +# Written by Lionel Young <redtricycle@gmail.com> +# Based on http://slackbuilds.org/template.SlackBuild + +PRGNAM=beancount +VERSION=${VERSION:-1.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION + +# Permissions +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Ensure header images and style sheet is included by bean-web +patch -p1 --verbose < $CWD/beancount_web_fix.diff + +# Build and install +python setup.py build +python setup.py install --root=$PKG + +# Documentation +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING CHANGES README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cp -aR \ + index.html style.css doc examples \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# Install +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/business/beancount/beancount.info b/business/beancount/beancount.info new file mode 100644 index 0000000000000..a9ccc9ebaa4da --- /dev/null +++ b/business/beancount/beancount.info @@ -0,0 +1,10 @@ +PRGNAM="beancount" +VERSION="1.0" +HOMEPAGE="http://furius.ca/beancount/" +DOWNLOAD="http://pypi.python.org/packages/source/b/beancount/beancount-1.0.tar.gz" +MD5SUM="e2492d34d9b2a5218435e95cc428453d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Lionel Young" +EMAIL="redtricycle@gmail.com" +APPROVED="dsomero" diff --git a/business/beancount/beancount_web_fix.diff b/business/beancount/beancount_web_fix.diff new file mode 100644 index 0000000000000..1388de5836010 --- /dev/null +++ b/business/beancount/beancount_web_fix.diff @@ -0,0 +1,14 @@ +Patch to allow bean-web to find stylesheet and images without requiring them to be in +the local directory. + +diff -Nur beancount-1.0.orig/setup.py beancount-1.0/setup.py > beancount_web_fix.diff +--- beancount-1.0.orig/setup.py 2009-03-31 13:40:55.000000000 -0700 ++++ beancount-1.0/setup.py 2010-09-12 14:54:36.521745100 -0700 +@@ -63,6 +63,7 @@ + 'beancount.fallback', + 'beancount.fallback.elementtree', + ], ++ package_data = {'beancount.web': ['*jpg', '*png', 'robots.txt', 'treetable.js', 'style.css']}, + scripts=scripts + ) + diff --git a/business/beancount/slack-desc b/business/beancount/slack-desc new file mode 100644 index 0000000000000..cb45be3f168eb --- /dev/null +++ b/business/beancount/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +beancount: beancount (command-line double-entry accounting) +beancount: +beancount: Beancount is a double-entry accounting system that uses a simple text +beancount: file format as input. The ideas and syntax is entirely inspired by +beancount: John Wiegley's ledger, and the syntax is pretty much compatible +beancount: with it. A few Python scripts are used to parse the contents of +beancount: the file, for example, to serve the contents as a locally running +beancount: web server. Scripts are provided to convert from OFX files into +beancount: Ledger input format, and other formats (easily extensible). +beancount: +beancount: Home: http://furius.ca/beancount/ |