gnu: Add java-jboss-jms-api-spec.
[jackhill/guix/guix.git] / gnu / packages / gnucash.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
6 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages gnucash)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix build-system glib-or-gtk)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages docbook)
32 #:use-module (gnu packages documentation)
33 #:use-module (gnu packages gnome)
34 #:use-module (gnu packages gnupg)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gtk)
37 #:use-module (gnu packages guile)
38 #:use-module (gnu packages icu4c)
39 #:use-module (gnu packages multiprecision)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages tls)
43 #:use-module (gnu packages web)
44 #:use-module (gnu packages webkit)
45 #:use-module (gnu packages xml))
46
47 (define-public gnucash
48 (package
49 (name "gnucash")
50 (version "2.6.18")
51 (source
52 (origin
53 (method url-fetch)
54 (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
55 version "/gnucash-" version "-1.tar.bz2"))
56 (sha256
57 (base32
58 "1794qi7lkn1kbnhzk08wawacfcphbln3ngdl3q0qax5drv7hnwv8"))
59 (patches (search-patches "gnucash-price-quotes-perl.patch"))))
60 (build-system glib-or-gtk-build-system)
61 (inputs
62 `(("guile" ,guile-2.0)
63 ("icu4c" ,icu4c)
64 ("glib" ,glib)
65 ("gtk" ,gtk+-2)
66 ("goffice" ,goffice-0.8)
67 ("libgnomecanvas" ,libgnomecanvas)
68 ("libxml2" ,libxml2)
69 ("libxslt" ,libxslt)
70 ("webkitgtk" ,webkitgtk/gtk+-2)
71 ("aqbanking" ,aqbanking)
72 ("perl-date-manip" ,perl-date-manip)
73 ("perl-finance-quote" ,perl-finance-quote)))
74 (native-inputs
75 `(("glib" ,glib "bin") ; glib-compile-schemas, etc.
76 ("intltool" ,intltool)
77 ("gnucash-docs" ,gnucash-docs)
78 ("pkg-config" ,pkg-config)))
79 (outputs '("out" "doc"))
80 (arguments
81 `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
82 #:configure-flags '("--disable-dbi"
83 "--enable-aqbanking")
84 #:phases
85 (modify-phases %standard-phases
86 ;; There are about 100 megabytes of documentation.
87 (add-after
88 'install 'install-docs
89 (lambda* (#:key inputs outputs #:allow-other-keys)
90 (let ((docs (assoc-ref inputs "gnucash-docs"))
91 (doc-output (assoc-ref outputs "doc")))
92 (symlink (string-append docs "/share/gnome")
93 (string-append doc-output "/share/gnome")))))
94 (add-after
95 'install-docs 'wrap-programs
96 (lambda* (#:key inputs outputs #:allow-other-keys)
97 (for-each (lambda (prog)
98 (wrap-program (string-append (assoc-ref outputs "out")
99 "/bin/" prog)
100 `("PERL5LIB" ":" prefix
101 ,(map (lambda (o)
102 (string-append o "/lib/perl5/site_perl/"
103 ,(package-version perl)))
104 (if (string=? prog "gnc-fq-helper")
105 (list
106 ,@(transitive-input-references
107 'inputs
108 (map (lambda (l)
109 (assoc l (inputs)))
110 '("perl-finance-quote"
111 "perl-date-manip"))))
112 (list
113 ,@(transitive-input-references
114 'inputs
115 (map (lambda (l)
116 (assoc l (inputs)))
117 '("perl-finance-quote")))))))))
118 '("gnucash"
119 "gnc-fq-check"
120 "gnc-fq-helper"
121 "gnc-fq-dump")))))))
122 (home-page "https://www.gnucash.org/")
123 (synopsis "Personal and small business financial accounting software")
124 (description
125 "GnuCash is personal and professional financial-accounting software.
126 It can be used to track bank accounts, stocks, income and expenses, based on
127 the double-entry accounting practice. It includes support for QIF/OFX/HBCI
128 import and transaction matching. It also automates several tasks, such as
129 financial calculations or scheduled transactions.")
130 (license license:gpl3+)))
131
132 ;; This package is not public, since we use it to build the "doc" output of
133 ;; the gnucash package (see above). It would be confusing if it were public.
134 (define gnucash-docs
135 (package
136 (name "gnucash-docs")
137 (version (package-version gnucash))
138 (source
139 (origin
140 (method url-fetch)
141 (uri (string-append "mirror://sourceforge/gnucash/gnucash-docs/"
142 version "/gnucash-docs-" version ".tar.gz"))
143 (sha256
144 (base32
145 "0bzc7mvdba2sc8m61yxa1fp2liqs00b64dvfxhv854vdrl1z5vmb"))))
146 (build-system gnu-build-system)
147 ;; These are native-inputs because they are only required for building the
148 ;; documentation.
149 (native-inputs
150 `(("libxml2" ,libxml2)
151 ;; The "check" target needs the docbook xml packages for validating the
152 ;; DocBook XML during the tests.
153 ("docbook-xml-4.4" ,docbook-xml-4.4)
154 ("docbook-xml-4.2" ,docbook-xml-4.2)
155 ("docbook-xml-4.1.2" ,docbook-xml-4.1.2)
156 ("libxslt" ,libxslt)
157 ("docbook-xsl" ,docbook-xsl)
158 ("scrollkeeper" ,scrollkeeper)))
159 (home-page "https://www.gnucash.org/")
160 (synopsis "Documentation for GnuCash")
161 (description
162 "User guide and other documentation for GnuCash in various languages.
163 This package exists because the GnuCash project maintains its documentation in
164 an entirely separate package from the actual GnuCash program. It is intended
165 to be read using the GNOME Yelp program.")
166 (license (list license:fdl1.1+ license:gpl3+))))
167
168 (define-public gwenhywfar
169 (package
170 (name "gwenhywfar")
171 (version "4.15.3")
172 (source
173 (origin
174 (method url-fetch)
175 (uri (string-append "http://www.aquamaniac.de/sites/download/download.php?"
176 "package=01&release=201&file=01"))
177 (file-name (string-append name "-" version ".tar.gz"))
178 (sha256
179 (base32
180 "0fp67s932x66xfljb26zbrn8ambbc5y5c3hllr6l284nr63qf3ka"))))
181 (build-system gnu-build-system)
182 (arguments
183 `(#:configure-flags
184 (list "--disable-network-checks"
185 ;; Both GTK+2 and QT4 are supported.
186 "--with-guis=gtk2"
187 (string-append "--with-openssl-includes="
188 (assoc-ref %build-inputs "openssl") "/include")
189 (string-append "--with-openssl-libs="
190 (assoc-ref %build-inputs "openssl") "/lib"))))
191 (inputs
192 `(("libgcrypt" ,libgcrypt)
193 ("gnutls" ,gnutls)
194 ("openssl" ,openssl)
195 ("gtk+" ,gtk+-2)))
196 (native-inputs
197 `(("pkg-config" ,pkg-config)))
198 (home-page "http://www.aquamaniac.de/sites/aqbanking/index.php")
199 (synopsis "Utility library for networking and security applications")
200 (description
201 "This package provides a helper library for networking and security
202 applications and libraries. It is used by AqBanking.")
203 ;; The license includes an explicit additional permission to compile and
204 ;; distribute this library with the OpenSSL Toolkit.
205 (license license:lgpl2.1+)))
206
207 (define-public aqbanking
208 (package
209 (name "aqbanking")
210 (version "5.6.12")
211 (source
212 (origin
213 (method url-fetch)
214 (uri (string-append "http://www.aquamaniac.de/sites/download/download.php?"
215 "package=03&release=208&file=01"))
216 (file-name (string-append name "-" version ".tar.gz"))
217 (sha256
218 (base32
219 "08jbwmiv6f3v8iqdr44x4szna496fqcjfi6mlx04cnbx91m70lh6"))))
220 (build-system gnu-build-system)
221 (arguments
222 `(;; Parallel building fails because aqhbci is required before it's
223 ;; built.
224 #:parallel-build? #f
225 #:configure-flags
226 (list (string-append "--with-gwen-dir="
227 (assoc-ref %build-inputs "gwenhywfar")))))
228 (propagated-inputs
229 `(("gwenhywfar" ,gwenhywfar)))
230 (inputs
231 `(("gmp" ,gmp)
232 ("xmlsec" ,xmlsec)
233 ("gnutls" ,gnutls)))
234 (native-inputs
235 `(("pkg-config" ,pkg-config)
236 ("libltdl" ,libltdl)))
237 (home-page "http://www.aquamaniac.de/sites/aqbanking/index.php")
238 (synopsis "Interface for online banking tasks")
239 (description
240 "AqBanking is a modular and generic interface to online banking tasks,
241 financial file formats (import/export) and bank/country/currency information.
242 AqBanking uses backend plugins to actually perform the online tasks. HBCI,
243 OFX DirectConnect, YellowNet, GeldKarte, and DTAUS discs are currently
244 supported. AqBanking is used by GnuCash, KMyMoney, and QBankManager.")
245 ;; AqBanking is licensed under the GPLv2 or GPLv3
246 (license (list license:gpl2 license:gpl3))))