diff options
author | Nils Gillmann <ng0@n0.is> | 2018-10-14 12:53:28 +0000 |
---|---|---|
committer | Nils Gillmann <ng0@n0.is> | 2018-10-14 12:53:28 +0000 |
commit | 4a75668a10f098e25aff8f5d8b2a941ce7788929 (patch) | |
tree | a814997d333d1d5e39cf393d07f1a31ce7232dbe | |
parent | 9a7bca87c59a9d3116fe7a854bfa81aff617a06a (diff) | |
download | www-4a75668a10f098e25aff8f5d8b2a941ce7788929.tar.gz www-4a75668a10f098e25aff8f5d8b2a941ce7788929.zip |
build-system: make it build on more systems.
Signed-off-by: Nils Gillmann <ng0@n0.is>
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | config.mk | 5 | ||||
-rw-r--r-- | guix-env.scm | 29 |
3 files changed, 27 insertions, 17 deletions
@@ -3,17 +3,17 @@ | |||
3 | # All: build HTML pages in all languages and compile the | 3 | # All: build HTML pages in all languages and compile the |
4 | # TypeScript logic in web-common. | 4 | # TypeScript logic in web-common. |
5 | 5 | ||
6 | PYTHONPATH="$PYTHONPATH:$(pwd)" | 6 | include config.mk |
7 | 7 | ||
8 | all: locale template | 8 | all: locale template |
9 | 9 | ||
10 | # Extract translateable strings from jinga2 templates. | 10 | # Extract translateable strings from jinja2 templates. |
11 | locale/messages.pot: *.j2 common/*.j2.inc | 11 | locale/messages.pot: *.j2 common/*.j2.inc |
12 | pybabel extract -F locale/babel.map -o locale/messages.pot . | 12 | pybabel extract -F locale/babel.map -o locale/messages.pot . |
13 | 13 | ||
14 | # Update translation (.po) files with new strings. | 14 | # Update translation (.po) files with new strings. |
15 | locale-update: locale/messages.pot | 15 | locale-update: locale/messages.pot |
16 | msgmerge -U -m --previous locale/en/LC_MESSAGES/messages.po locale/messages.pot | 16 | msgmerge -U -m --previous locale/en/LC_MESSAGES/messages.po locale/messages.pot |
17 | msgmerge -U -m --previous locale/de/LC_MESSAGES/messages.po locale/messages.pot | 17 | msgmerge -U -m --previous locale/de/LC_MESSAGES/messages.po locale/messages.pot |
18 | msgmerge -U -m --previous locale/fr/LC_MESSAGES/messages.po locale/messages.pot | 18 | msgmerge -U -m --previous locale/fr/LC_MESSAGES/messages.po locale/messages.pot |
19 | msgmerge -U -m --previous locale/es/LC_MESSAGES/messages.po locale/messages.pot | 19 | msgmerge -U -m --previous locale/es/LC_MESSAGES/messages.po locale/messages.pot |
@@ -32,9 +32,9 @@ locale-compile: | |||
32 | # Process everything related to gettext translations. | 32 | # Process everything related to gettext translations. |
33 | locale: locale-update locale-compile | 33 | locale: locale-update locale-compile |
34 | 34 | ||
35 | # Run the jinga2 templating engine to expand templates to HTML | 35 | # Run the jinja2 templating engine to expand templates to HTML |
36 | # incorporating translations. | 36 | # incorporating translations. |
37 | template: locale-compile | 37 | template: locale-compile |
38 | ./template.py | 38 | $(PYTHON) ./template.py |
39 | 39 | ||
40 | it: template | 40 | it: template |
diff --git a/config.mk b/config.mk new file mode 100644 index 00000000..0b183e9b --- /dev/null +++ b/config.mk | |||
@@ -0,0 +1,5 @@ | |||
1 | #PYTHONPATH="$PYTHONPATH:$(pwd)" | ||
2 | |||
3 | DEBUG=0 | ||
4 | |||
5 | PYTHON=python3 | ||
diff --git a/guix-env.scm b/guix-env.scm index 588aa3ad..92a7845a 100644 --- a/guix-env.scm +++ b/guix-env.scm | |||
@@ -33,9 +33,11 @@ | |||
33 | (gnu packages base) | 33 | (gnu packages base) |
34 | (gnu packages compression) | 34 | (gnu packages compression) |
35 | (gnu packages curl) | 35 | (gnu packages curl) |
36 | (gnu packages check) | ||
36 | (gnu packages databases) | 37 | (gnu packages databases) |
37 | (gnu packages file) | 38 | (gnu packages file) |
38 | (gnu packages gettext) | 39 | (gnu packages gettext) |
40 | (gnu packages less) | ||
39 | (gnu packages glib) | 41 | (gnu packages glib) |
40 | (gnu packages gnome) | 42 | (gnu packages gnome) |
41 | (gnu packages gnunet) | 43 | (gnu packages gnunet) |
@@ -83,11 +85,14 @@ | |||
83 | (inputs | 85 | (inputs |
84 | `(("python-jinja2" ,python-jinja2) | 86 | `(("python-jinja2" ,python-jinja2) |
85 | ("python-babel" ,python-babel) | 87 | ("python-babel" ,python-babel) |
88 | ("python-pylint" ,python-pylint) | ||
86 | ("python-oslo.i18n" ,python-oslo.i18n) | 89 | ("python-oslo.i18n" ,python-oslo.i18n) |
90 | ("python-future" ,python-future) | ||
87 | ("gettext-minimal" ,gettext-minimal) | 91 | ("gettext-minimal" ,gettext-minimal) |
88 | ("python" ,python) | 92 | ("python" ,python) |
89 | ("coreutils" ,coreutils) | 93 | ("coreutils" ,coreutils) |
90 | ("which" ,which) | 94 | ("which" ,which) |
95 | ("less" ,less) | ||
91 | ("git" ,git) | 96 | ("git" ,git) |
92 | ("automake" ,automake) | 97 | ("automake" ,automake) |
93 | ("autoconf" ,autoconf-wrapper))) | 98 | ("autoconf" ,autoconf-wrapper))) |
@@ -100,18 +105,18 @@ | |||
100 | (for-each (lambda (po) | 105 | (for-each (lambda (po) |
101 | (chmod po #o666)) | 106 | (chmod po #o666)) |
102 | (find-files "." "\\.po$")))) | 107 | (find-files "." "\\.po$")))) |
103 | (replace 'configure | 108 | ;; (replace 'configure |
104 | (lambda* (#:key outputs inputs #:allow-other-keys) | 109 | ;; (lambda* (#:key outputs inputs #:allow-other-keys) |
105 | (let ((pystore (assoc-ref inputs "python")) | 110 | ;; (let ((pystore (assoc-ref inputs "python")) |
106 | (pyver ,(version-major+minor (package-version python)))) | 111 | ;; (pyver ,(version-major+minor (package-version python)))) |
107 | (substitute* "Makefile" | 112 | ;; (substitute* "Makefile" |
108 | (("env PYTHONPATH=\".\"") | 113 | ;; (("env PYTHONPATH=\".\"") |
109 | (string-append | 114 | ;; (string-append |
110 | "env PYTHONPATH=\"" | 115 | ;; "env PYTHONPATH=\"" |
111 | (getenv "PYTHONPATH") | 116 | ;; (getenv "PYTHONPATH") |
112 | ":" | 117 | ;; ":" |
113 | "." | 118 | ;; "." |
114 | "\"")))))) | 119 | ;; "\"")))))) |
115 | ;; FIXME: Implement small testsuite. | 120 | ;; FIXME: Implement small testsuite. |
116 | (delete 'check)))) | 121 | (delete 'check)))) |
117 | (synopsis "GNUnet website generation") | 122 | (synopsis "GNUnet website generation") |