summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO35
-rw-r--r--PKGBUILD51
-rw-r--r--gnucash.install36
-rw-r--r--xbt.patch38
4 files changed, 160 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7db8b4b897e9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,35 @@
+pkgbase = gnucash-xbt
+ pkgdesc = A personal and small-business financial-accounting application with Bitcoin support
+ pkgver = 2.6.5
+ pkgrel = 1
+ url = http://www.gnucash.org
+ install = gnucash.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = intltool
+ depends = slib
+ depends = goffice0.8
+ depends = libdbi-drivers
+ depends = libmariadbclient
+ depends = postgresql-libs
+ depends = aqbanking
+ depends = desktop-file-utils
+ depends = webkitgtk2
+ depends = libgnome-keyring
+ depends = libgnomecanvas
+ optdepends = evince: for print preview
+ optdepends = perl-finance-quote: for stock information lookups
+ optdepends = perl-date-manip: for stock information lookups
+ provides = gnucash
+ conflicts = gnucash,
+ conflicts = gnucash-devel
+ options = !makeflags
+ options = !emptydirs
+ source = http://downloads.sourceforge.net/sourceforge/gnucash/gnucash-2.6.5.tar.bz2
+ source = xbt.patch
+ sha1sums = c9a5184603e41c6582f8342d4be9e392eceef33f
+ sha1sums = 3556218003a0caa823ea87c8c19e2a8e99c244d5
+
+pkgname = gnucash-xbt
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5ac9c5d1b8f8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Benedykt 'b3niup' Przybyło <b3niup@gmail.com>
+
+pkgname=gnucash-xbt
+pkgver=2.6.5
+pkgrel=1
+pkgdesc="A personal and small-business financial-accounting application with Bitcoin support"
+arch=('i686' 'x86_64')
+url="http://www.gnucash.org"
+license=("GPL")
+depends=('slib' 'goffice0.8' 'libdbi-drivers' 'libmariadbclient' 'postgresql-libs' 'aqbanking' 'desktop-file-utils' 'webkitgtk2' 'libgnome-keyring' 'libgnomecanvas')
+makedepends=('intltool')
+optdepends=('evince: for print preview'
+ 'perl-finance-quote: for stock information lookups'
+ 'perl-date-manip: for stock information lookups')
+options=('!makeflags' '!emptydirs')
+conflicts=('gnucash', 'gnucash-devel')
+provides=('gnucash')
+install=gnucash.install
+source=("http://downloads.sourceforge.net/sourceforge/gnucash/gnucash-${pkgver}.tar.bz2"
+ "xbt.patch")
+sha1sums=('c9a5184603e41c6582f8342d4be9e392eceef33f'
+ '3556218003a0caa823ea87c8c19e2a8e99c244d5')
+
+prepare() {
+ cd "${srcdir}/gnucash-${pkgver}"
+ patch -Np0 -i "${srcdir}/xbt.patch"
+}
+
+build() {
+ cd "${srcdir}/gnucash-${pkgver}"
+ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc \
+ --libexecdir=/usr/lib --disable-schemas-compile --enable-ofx --enable-aqbanking
+ make
+}
+
+package() {
+ cd "${srcdir}/gnucash-${pkgver}"
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
+ cd src/doc/design
+ make DESTDIR="${pkgdir}" install-info
+
+ install -dm755 "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/gnucash.schemas" --domain gnucash "${pkgdir}"/etc/gconf/schemas/*.schemas
+ rm -f "${pkgdir}"/etc/gconf/schemas/*.schemas
+
+ # Delete the gnucash-valgrind executable because the source files
+ # are not included with the package and the executable is hardlinked
+ # to the location that it was built at.
+ rm -f "${pkgdir}"/usr/bin/gnucash-valgrind
+
+}
diff --git a/gnucash.install b/gnucash.install
new file mode 100644
index 000000000000..d9de2f545eb5
--- /dev/null
+++ b/gnucash.install
@@ -0,0 +1,36 @@
+pkgname=gnucash
+info_dir=usr/share/info
+info_files=(gnucash-design.info)
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ update-desktop-database -q
+ [ -x usr/bin/install-info ] || return 0
+ for f in ${info_files[@]}; do
+ usr/bin/install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+ glib-compile-schemas usr/share/glib-2.0/schemas
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+ [ -x usr/bin/install-info ] || return 0
+ for f in ${info_files[@]}; do
+ usr/bin/install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_remove() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ glib-compile-schemas usr/share/glib-2.0/schemas
+}
diff --git a/xbt.patch b/xbt.patch
new file mode 100644
index 000000000000..757c8007b3bc
--- /dev/null
+++ b/xbt.patch
@@ -0,0 +1,38 @@
+--- src/engine/iso-4217-currencies.c.orig 2015-01-02 18:34:12.445021803 +0100
++++ src/engine/iso-4217-currencies.c 2015-01-02 18:38:34.565784519 +0100
+@@ -4142,6 +4142,24 @@
+ }
+
+ {
++ const char *fullname = "Bitcoin";
++ gnc_commodity *c = gnc_commodity_new(book,
++ CUR_I18N(fullname),
++ "ISO4217",
++ "XBT",
++ "nil",
++ 1000000);
++
++ if(!c) {
++ PWARN("failed to create commodity for currency %s", fullname);
++ } else {
++ if(!gnc_commodity_table_insert(table, c)) {
++ PWARN("failed to insert %s into commodity table", fullname);
++ }
++ }
++ }
++
++ {
+ const char *fullname = "Silver";
+ gnc_commodity *c = gnc_commodity_new(book,
+ CUR_I18N(fullname),
+
+--- src/engine/iso-4217-currencies.scm.orig 2015-01-02 18:34:12.448355147 +0100
++++ src/engine/iso-4217-currencies.scm 2015-01-02 18:36:30.718765059 +0100
+@@ -245,6 +245,7 @@
+ ( "CFP Franc" "franc" "centime" "ISO4217" "XPF" "953" 1 100 "" ) ;; Communauté Financière du Pacifique
+ ( "Code for testing purposes" "TEST" "test" "ISO4217" "XTS" "963" 1 1000000 "" ) ;; Code reserved for testing purposes
+ ( "No currency" "" "" "ISO4217" "XXX" "999" 1 1000000 "" )
++( "Bitcoin" "bitcoin" "microbitcoin" "ISO4217" "XBT" "nil" 1000000 1000000 "XBT" )
+
+ ;; precious metals
+ ( "Silver" "ounce" "ounce" "ISO4217" "XAG" "961" 1 1000000 "" )