aboutsummaryrefslogtreecommitdiff
path: root/contrib/scripts/documentation/gnunet-doc.scm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/scripts/documentation/gnunet-doc.scm')
-rw-r--r--contrib/scripts/documentation/gnunet-doc.scm182
1 files changed, 182 insertions, 0 deletions
diff --git a/contrib/scripts/documentation/gnunet-doc.scm b/contrib/scripts/documentation/gnunet-doc.scm
new file mode 100644
index 000000000..077efacad
--- /dev/null
+++ b/contrib/scripts/documentation/gnunet-doc.scm
@@ -0,0 +1,182 @@
1;;; This file is part of GNUnet.
2;;; Copyright (C) 2016, 2017 GNUnet e.V.
3;;;
4;;; GNUnet is free software: you can redistribute it and/or modify it
5;;; under the terms of the GNU Affero General Public License as published
6;;; by the Free Software Foundation, either version 3 of the License, or
7;;; (at your option) any later version.
8;;;
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;;; Affero General Public License for more details.
13;;;
14;;; You should have received a copy of the GNU Affero General Public License
15;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
16;;;
17
18(use-modules
19 (ice-9 popen)
20 (ice-9 match)
21 (ice-9 rdelim)
22 (guix packages)
23 (guix build-system gnu)
24 (guix gexp)
25 ((guix build utils) #:select (with-directory-excursion))
26 (guix git-download)
27 (guix utils) ; current-source-directory
28 (gnu packages)
29 (gnu packages aidc)
30 (gnu packages autotools)
31 (gnu packages backup)
32 (gnu packages base)
33 (gnu packages compression)
34 (gnu packages curl)
35 (gnu packages databases)
36 (gnu packages file)
37 (gnu packages gettext)
38 (gnu packages glib)
39 (gnu packages gnome)
40 (gnu packages gnunet)
41 (gnu packages gnupg)
42 (gnu packages gnuzilla)
43 (gnu packages groff)
44 (gnu packages gstreamer)
45 (gnu packages gtk)
46 (gnu packages guile)
47 (gnu packages graphviz)
48 (gnu packages image)
49 (gnu packages image-viewers)
50 (gnu packages libidn)
51 (gnu packages libunistring)
52 (gnu packages linux)
53 (gnu packages maths)
54 (gnu packages multiprecision)
55 (gnu packages perl)
56 (gnu packages pkg-config)
57 (gnu packages pulseaudio)
58 (gnu packages python)
59 (gnu packages tex)
60 (gnu packages texinfo)
61 (gnu packages tex)
62 (gnu packages tls)
63 (gnu packages video)
64 (gnu packages web)
65 (gnu packages xiph)
66 ;;(gnunet packages texlive) ;GNUnet module including texlive-2012 WIP
67 ((guix licenses) #:prefix license:))
68
69;;(define %source-dir (string-append (current-source-directory)
70;; "/../../../"))
71(define %source-dir (dirname (current-filename)))
72
73(define gnunet-doc
74 (let* ((revision "2")
75 (select? (delay (or (git-predicate
76 (string-append (current-source-directory)
77 "/../../../"))
78 source-file?))))
79 (package
80 (name "gnunet-doc")
81 (version (string-append "0.10.1-" revision "." "dev"))
82 (source
83 (local-file ;;"../../.."
84 ;;%source-dir
85 ;;(string-append (getcwd) "/../../../")
86 (string-append (getcwd)) ;drrty hack and this assumes one static position FIXME!
87 #:recursive? #t))
88 ;;#:select? (git-predicate %source-dir)))
89 ;;#:select? (force select?)))
90 (build-system gnu-build-system)
91 (inputs
92 `(("glpk" ,glpk)
93 ("gnurl" ,gnurl)
94 ("gstreamer" ,gstreamer)
95 ("gst-plugins-base" ,gst-plugins-base)
96 ("gnutls/dane" ,gnutls/dane)
97 ("libextractor" ,libextractor)
98 ("libgcrypt" ,libgcrypt)
99 ("libidn" ,libidn)
100 ("libmicrohttpd" ,libmicrohttpd)
101 ("libltdl" ,libltdl)
102 ("libunistring" ,libunistring)
103 ("openssl" ,openssl)
104 ("opus" ,opus)
105 ("pulseaudio" ,pulseaudio)
106 ("sqlite" ,sqlite)
107 ("postgresql" ,postgresql)
108 ("mysql" ,mariadb)
109 ("zlib" ,zlib)
110 ("perl" ,perl)
111 ("python-2" ,python-2) ; tests and gnunet-qr
112 ("jansson" ,jansson)
113 ("nss" ,nss)
114 ("glib" ,glib "bin")
115 ("gmp" ,gmp)
116 ("bluez" ,bluez) ; for optional bluetooth feature
117 ("glib" ,glib)
118 ;;("texlive-minimal" ,texlive-minimal) ; optional.
119 ("texlive" ,texlive) ;TODO: Stabilize Texlive-2012 package
120 ("libogg" ,libogg)))
121 (native-inputs
122 `(("pkg-config" ,pkg-config)
123 ("autoconf" ,autoconf)
124 ("automake" ,automake)
125 ("gnu-gettext" ,gnu-gettext)
126 ("graphviz" ,graphviz) ; dot
127 ("texinfo-5" ,texinfo-5) ; Debian stable
128 ("which" ,which)
129 ("libtool" ,libtool)))
130 (arguments
131 `(#:configure-flags
132 (list "--enable-documentation")
133 #:tests? #f ;Don't run tests
134 #:phases
135 (modify-phases %standard-phases
136 (add-after 'unpack 'autoconf
137 (lambda _
138 (substitute* "bootstrap"
139 (("contrib/pogen.sh") "sh contrib/pogen.sh"))
140 (for-each (lambda (f) (chmod f #o755))
141 (find-files "po" ""))
142 (zero? (system* "sh" "bootstrap"))))
143 (add-after 'build 'run-gendocs
144 (lambda _
145 (chdir "doc/documentation")
146 ;;(zero? (system* "make" "dev-build"))))
147 (zero? (system* "sh" "run-gendocs.sh"))))
148 ;; (zero? (system* "make" "pdf"))
149 ;; (zero? (system* "make" "html"))
150 ;; (zero? (system* "make" "info"))))
151 ;;(zero? (system* "make" "doc-all-give-me-the-noise"))))
152 (replace 'install
153 (lambda _
154 (zero? (system* "make" "doc-gendoc-install")))))))
155 ;;(lambda* (#:key outputs #:allow-other-keys)
156 ;; (let* ((out (assoc-ref outputs "out"))
157 ;; (doc (string-append out "/share/doc/gnunet")))
158 ;; (mkdir-p doc)
159 ;; (copy-recursively "images"
160 ;; (string-append doc
161 ;; "/images"))
162 ;; (mkdir-p (string-append doc "/gnunet"))
163 ;; (install-file "gnunet.pdf" doc)
164 ;; (install-file "gnunet.info" doc)
165 ;; (install-file "gnunet.log" doc) ;TODO: Move to 'dev' output?
166 ;; (copy-recursively "gnunet"
167 ;; (string-append doc
168 ;; "/gnunet"))
169 ;; (install-file "gnunet-c-tutorial.pdf" doc)
170 ;; (install-file "gnunet-c-tutorial.info" doc)
171 ;; (install-file "gnunet-c-tutorial.log" doc) ;TODO: Move to 'dev' output?
172 ;; (copy-recursively "gnunet-c-tutorial"
173 ;; (string-append doc
174 ;; "/gnunet-c-tutorial")))
175 ;; #t)))))
176 (synopsis "Documentation of GNUnet")
177 (description
178 "GNUnet documentation build")
179 (license (list license:fdl1.3+ license:gpl3+))
180 (home-page "https://gnunet.org/"))))
181
182gnunet-doc