[git] gnupg-doc - branch, master, updated. 212ca849806b6eeda852f52bc9548e42ece0116e

by Werner Koch cvs at cvs.gnupg.org
Sat Jul 16 13:51:18 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GnuPG website and other docs".

The branch, master has been updated
       via  212ca849806b6eeda852f52bc9548e42ece0116e (commit)
      from  b7ffbb9799f83295ae3a14973bdc833c6476e8a8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 212ca849806b6eeda852f52bc9548e42ece0116e
Author: Werner Koch <wk at gnupg.org>
Date:   Sat Jul 16 13:48:57 2016 +0200

    web: Prepare for auto-builder
    
    * web/share/setup.inc: Remove setupfile swdb.mac.
    * web/index.org: Add keyword +GPGWEB-NEED_SWDB
    * web/download/index.org: Ditto.
    * web/download/cvs_access.org: Ditto.
    * web/download/integrity_check.org: Ditto.
    * web/download/release_notes.org: Ditto.
    * web/related_software/libgcrypt/index.org: Ditto.
    * web/share/gpgweb.el (gpgweb-setup-project): Install preprocess hook.
    (gpgweb-preprocess): New.
    (gpgweb-postprocess-html): Adjust RE.
    * tools/build-website.sh: New.

diff --git a/tools/build-website.sh b/tools/build-website.sh
new file mode 100755
index 0000000..1190dab
--- /dev/null
+++ b/tools/build-website.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+pgm=build-website.sh
+root_dir="$(pwd)/gnupg-doc/web"
+stage_dir="$(pwd)/gpgweb-stage"
+
+if [ ! -d "${root_dir}" ]; then
+   echo "$pgm: directory '${root_dir}' missing" >&2;
+   exit 1
+fi
+if [ ! -d "${stage_dir}" ]; then
+   echo "$pgm: directory '${stage_dir}' missing" >&2;
+   exit 1
+fi
+cd "${root_dir}"
+
+echo "========================================================"
+echo "gpgweb site building started on $(date -u -Iseconds)"
+echo "========================================================"
+
+emacs23 -q --batch  \
+  --eval "(require 'assoc)" \
+  --eval "(require 'org)" \
+  --eval "(setq make-backup-files nil)" \
+  --eval "(setq gpgweb-root-dir  \"${root_dir}/\")" \
+  --eval "(setq gpgweb-stage-dir \"${stage_dir}/\")" \
+  --eval "(require 'gpgweb (concat gpgweb-root-dir \"share/gpgweb.el\"))" \
+  --eval "(setq org-publish-use-timestamps-flag nil)" \
+  --eval "(setq org-export-html-toplevel-hlevel 1)" \
+  --eval "(setq org-export-html-coding-system 'utf-8)" \
+  --eval "(gpgweb-setup-project)" \
+  --eval "(org-publish-initialize-cache \"gpgweb\")" \
+  --eval "(message \"root=(%s)\" gpgweb-root-dir)" \
+  --eval "(org-publish \"gpgweb\" t nil)"
+
+echo "========================================================="
+echo "gpgweb site building finished on $(date -u -Iseconds)"
+echo "========================================================="
diff --git a/web/download/cvs_access.org b/web/download/cvs_access.org
index ac2323b..6e62328 100644
--- a/web/download/cvs_access.org
+++ b/web/download/cvs_access.org
@@ -1,6 +1,7 @@
 #+TITLE: GnuPG - GIT Access
 #+STARTUP: showall
 #+SETUPFILE: "../share/setup.inc"
+#+GPGWEB-NEED-SWDB
 
 * GIT Access
 
diff --git a/web/download/index.org b/web/download/index.org
index 2a5fa82..3e1d602 100644
--- a/web/download/index.org
+++ b/web/download/index.org
@@ -1,6 +1,7 @@
 #+TITLE: GnuPG - Download
 #+STARTUP: showall align
 #+SETUPFILE: "../share/setup.inc"
+#+GPGWEB-NEED-SWDB
 #+OPTIONS: ^:{}
 #+macro: check_sig_note  GnuPG distributions are signed. It is wise and more secure to check out for their [[integrity_check.org][@@html:<a href="integrity_check.html">@@integrity@@html:</a>@@]].
 #+macro: ftpopen  @@html:<a href="@@
diff --git a/web/download/integrity_check.org b/web/download/integrity_check.org
index 5989351..ba4d393 100644
--- a/web/download/integrity_check.org
+++ b/web/download/integrity_check.org
@@ -1,6 +1,7 @@
 #+TITLE: GnuPG - Integrity Check
 #+STARTUP: showall
 #+SETUPFILE: "../share/setup.inc"
+#+GPGWEB-NEED-SWDB
 #+OPTIONS:  ^:{}
 
 * Integrity Check
diff --git a/web/download/release_notes.org b/web/download/release_notes.org
index cf94abd..61be7f4 100644
--- a/web/download/release_notes.org
+++ b/web/download/release_notes.org
@@ -1,6 +1,7 @@
 #+TITLE: GnuPG - Release Notes
 #+STARTUP: showall
 #+SETUPFILE: "../share/setup.inc"
+#+GPGWEB-NEED-SWDB
 #+macro: announce  [[http://lists.gnupg.org/pipermail/gnupg-announce/$1.html][Announcement]]
 
 * Release Notes
diff --git a/web/index.org b/web/index.org
index e007a31..c11c0af 100644
--- a/web/index.org
+++ b/web/index.org
@@ -1,6 +1,7 @@
 #+TITLE: The GNU Privacy Guard
 #+STARTUP: showall
 #+SETUPFILE: "share/setup.inc"
+#+GPGWEB-NEED-SWDB
 
 * The GNU Privacy Guard
 #+index: GnuPG
diff --git a/web/related_software/libgcrypt/index.org b/web/related_software/libgcrypt/index.org
index 366c4a3..4bfd79d 100644
--- a/web/related_software/libgcrypt/index.org
+++ b/web/related_software/libgcrypt/index.org
@@ -1,5 +1,6 @@
 #+STARTUP: showall
 #+SETUPFILE: "../../share/setup.inc"
+#+GPGWEB-NEED-SWDB
 
 * Libgcrypt
 
diff --git a/web/share/gpgweb.el b/web/share/gpgweb.el
index 0b6091f..a1e9556 100644
--- a/web/share/gpgweb.el
+++ b/web/share/gpgweb.el
@@ -37,7 +37,21 @@
      :completion-function gpgweb-upload))
 
    (aput 'org-publish-project-alist "gpgweb"
-   '(:components ("gpgweb-org" "gpgweb-other")))))
+   '(:components ("gpgweb-org" "gpgweb-other")))
+
+   (add-hook 'org-export-before-processing-hook 'gpgweb-preprocess)))
+
+
+(defun gpgweb-preprocess (backend)
+  "Insert certain stuff before processing."
+  (let ()
+    (goto-char (point-min))
+    (when (re-search-forward
+           "^#\\+GPGWEB-NEED-SWDB\\b" 2048 t)
+      (beginning-of-line)
+      (kill-line 1)
+      (insert (org-file-contents (concat gpgweb-root-dir "swdb.mac")
+                                 'noerror)))))
 
 
 (defun gpgweb-insert-header (title committed-at)
@@ -348,7 +362,7 @@ string of the source file or nil if not available."
     (prog1 (with-current-buffer work-buffer
              (let ((fname (file-name-nondirectory htmlfile))
                    (fname-2 (replace-regexp-in-string
-                              ".*/stage\\(/.*\\)$" "\\1" htmlfile t))
+                              ".*/gpgweb-stage\\(/.*\\)$" "\\1" htmlfile t))
                    (title (org-publish-find-title orgfile)))
                ;; Insert header, menu, and footer.
                (gpgweb-insert-header title committed-at)
diff --git a/web/share/setup.inc b/web/share/setup.inc
index 71afb88..c5517df 100644
--- a/web/share/setup.inc
+++ b/web/share/setup.inc
@@ -1,9 +1,11 @@
 # Setup file for this site.
 #
-# Include the version macros.
-# FIXME: Figure out a way to use SETUPFILE based on the directory of
-#        the currently SETUPFILE loaded file.
-#+SETUPFILE: "/home/wk/s/gnupg-doc/web/swdb.mac"
+# Note: To include swdb.org in an org file add the line
+#   #+GPGWEB-NEED-SWDB
+# in the first 2k of the file.  It is not possible to include that file
+# from here because we don't have a way to specify gpgweb-root-dir as
+# part of the filename.  A dedicated pre-process feature like above is
+# probably more efficient anyway.
 
 
 # Org version 8 does not anymore expand macros in all places.  We use

-----------------------------------------------------------------------

Summary of changes:
 tools/build-website.sh                   | 40 ++++++++++++++++++++++++++++++++
 web/download/cvs_access.org              |  1 +
 web/download/index.org                   |  1 +
 web/download/integrity_check.org         |  1 +
 web/download/release_notes.org           |  1 +
 web/index.org                            |  1 +
 web/related_software/libgcrypt/index.org |  1 +
 web/share/gpgweb.el                      | 18 ++++++++++++--
 web/share/setup.inc                      | 10 ++++----
 9 files changed, 68 insertions(+), 6 deletions(-)
 create mode 100755 tools/build-website.sh


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list