1 ;;; This file is part of GNUnet.
2 ;;; Copyright (C) 2016, 2017, 2018 GNUnet e.V.
4 ;;; GNUnet is free software; you can redistribute it and/or modify
5 ;;; it under the terms of the GNU General Public License as published
6 ;;; by the Free Software Foundation; either version 3, or (at your
7 ;;; option) any later version.
9 ;;; GNUnet is distributed in the hope that it will be useful, but
10 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ;;; General Public License for more details.
14 ;;; You should have received a copy of the GNU General Public License
15 ;;; along with GNUnet; see the file COPYING. If not, write to the
16 ;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 ;;; Boston, MA 02110-1301, USA.
24 (guix build-system gnu)
26 ((guix build utils) #:select (with-directory-excursion))
28 (guix utils) ; current-source-directory
31 (gnu packages autotools)
34 (gnu packages compression)
36 (gnu packages databases)
38 (gnu packages gettext)
43 (gnu packages gnuzilla)
45 (gnu packages gstreamer)
49 (gnu packages image-viewers)
51 (gnu packages libunistring)
54 (gnu packages multiprecision)
56 (gnu packages pkg-config)
57 (gnu packages pulseaudio)
60 (gnu packages texinfo)
67 (ports app-text mandoc mandoc)
68 (ports app-text texi2mdoc texi2mdoc)
69 ((guix licenses) #:prefix license:))
71 (define %source-dir (current-source-directory))
73 (define gnunet-dev-env
75 (select? (delay (or (git-predicate
76 (current-source-directory))
81 (version (string-append "git" revision))
84 (string-append (getcwd))
89 ("gstreamer" ,gstreamer)
90 ("gst-plugins-base" ,gst-plugins-base)
91 ("gnutls/dane" ,gnutls/dane)
92 ("iptables" ,iptables)
93 ("libextractor" ,libextractor)
94 ("libgcrypt" ,libgcrypt)
96 ("libmicrohttpd" ,libmicrohttpd)
98 ("libunistring" ,libunistring)
101 ("pulseaudio" ,pulseaudio)
103 ("postgresql" ,postgresql)
107 ("python-2" ,python-2) ; tests and gnunet-qr
112 ("bluez" ,bluez) ; for optional bluetooth feature
114 ;; ("texlive" ,texlive) ;FIXME: minimize.
115 ("texlive-tiny" ,texlive-tiny) ;; Seems to be enough for _just_ info output.
116 ("miniupnpc" ,miniupnpc)
119 `(("pkg-config" ,pkg-config)
120 ("autoconf" ,autoconf)
121 ("automake" ,automake)
122 ("gnu-gettext" ,gnu-gettext)
125 ("texi2mdoc" ,texi2mdoc)
126 ("texinfo" ,texinfo-5) ; Debian stable: 5.2
127 ("libtool" ,libtool)))
128 (outputs '("out" "debug"))
130 ;;(list (string-append "--with-nssdir=" %output "/lib")
131 ;;"--enable-gcc-hardening"
132 ;;"--enable-linker-hardening"
133 ;;;;"--enable-documentation-only")
134 ;;;"--enable-logging=verbose"
135 ;;;"CFLAGS=-ggdb -O0")
137 `(#:configure-flags (list "--enable-section7")
139 ;; swap check and install phases and set paths to installed bin
140 (modify-phases %standard-phases
141 (add-after 'unpack 'patch-bin-sh
143 (for-each (lambda (f) (chmod f #o755))
144 (find-files "po" ""))
146 (add-after 'patch-bin-sh 'bootstrap
148 (invoke "sh" "bootstrap")))
149 (add-after 'build 'install-section7
151 (with-directory-excursion "doc/documentation"
152 (invoke "make" "gnunet-c-tutorial.7")
153 (invoke "make" "gnunet-documentation.7")
154 (mkdir-p (string-append (assoc-ref %outputs "out")
156 (copy-file "../man/gnunet-c-tutorial.7"
157 (string-append (assoc-ref %outputs "out")
158 "/share/man/man7/gnunet-c-tutorial.7"))
159 (copy-file "../man/gnunet-documentation.7"
160 (string-append (assoc-ref %outputs "out")
161 "/share/man/man7/gnunet-documentation.7")))))
162 ;;(add-before 'build 'chdir
164 ;; (chdir "doc/documentation")))
165 (delete 'check)))))))
166 ;; XXX: https://gnunet.org/bugs/view.php?id=4619