[gparted] Add use of new GNOME 3 yelp-tools documentation infrastructure (!24)



commit a725921a228d48c9f018d2ade3a9baf8add0bd2f
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Feb 23 10:39:57 2019 +0000

    Add use of new GNOME 3 yelp-tools documentation infrastructure (!24)
    
    Second part is to use yelp-tools to build and install the documentation.
    Have to rename the help Manual from help/C/gparted.xml to
    help/C/index.docbook in accordance with this note from the GNOME Goal:
    Port to New Documentation Infrastructure [1]:
        IMPORTANT: If this is for a DocBook document, the top-level DocBook
        file MUST be renamed to index.docbook.  Do a "git mv" and include
        index.docbook in HELP_FILES.
    
    Commits from gucharmap [4] and totem [5], projects which have DocBook
    documentation, making this same change are also useful references.
    
    [1] GNOME Goal: Port To New Documentation Infrastructure
        https://wiki.gnome.org/Initiatives/GnomeGoals/NewDocumentationInfrastructure
    
    [2] Yelp > Yelp Tools > yelp.m4
        http://yelp.io/tools/yelp.m4.html
    
    [3] GNOME application developement overview / User help / Set up your
        build system
        https://developer.gnome.org/platform-overview/stable/dev-help-build.html.en
    
    [4] gucharmap commit "Port to new documentation infrastructure"
        https://gitlab.gnome.org/GNOME/gucharmap/commit/3e1526c0568f0b395fce68f9d9e09431dfcaef35
    
    [5] totem commit "Use new documentation infrastructure"
        https://gitlab.gnome.org/GNOME/totem/commit/59a6bd6064fe7dd047f7b61642aba73e0ba72acf
    
    Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure

 .gitignore                            |  2 ++
 .gitlab-ci.yml                        |  4 ++--
 README                                |  7 ++++---
 autogen.sh                            |  6 ++++++
 configure.ac                          |  6 +++---
 help/C/{gparted.xml => index.docbook} |  4 ++--
 help/Makefile.am                      | 20 ++++++++++----------
 7 files changed, 29 insertions(+), 20 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 87d8b214..6a366eb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
 *.lo
 *.mo
 *.o
+*.stamp
 .cproject
 .csettings
 .deps
@@ -32,6 +33,7 @@ gparted.appdata.xml
 gparted.desktop
 gparted.desktop.in
 gpartedbin
+index.docbook
 install-sh
 intltool-*
 lib/gtest/lib
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7437ca0f..a81cc834 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,7 +7,7 @@ stages:
   image: centos:latest
   before_script:
     - yum update -y
-    - yum install -y which gnome-common glib2-devel intltool
+    - yum install -y which gnome-common yelp-tools glib2-devel intltool
                      gcc-c++ libuuid-devel parted-devel gtkmm30-devel make
                      polkit file
 
@@ -16,7 +16,7 @@ stages:
   image: ubuntu:latest
   before_script:
     - apt-get update
-    - apt-get install -y gnome-common libglib2.0-dev-bin
+    - apt-get install -y gnome-common yelp-tools libglib2.0-dev-bin
                          uuid-dev libparted-dev libgtkmm-3.0-dev make
                          policykit-1
 
diff --git a/README b/README
index 959ddf24..12443d19 100644
--- a/README
+++ b/README
@@ -88,6 +88,7 @@ b. Building from Source
       gnome-common
       gtkmm3
       gettext
+      yelp-tools          - required if help documentation is to be built
 
    On Debian or Ubuntu, these dependencies may be obtained by running
    one of the following commands:
@@ -96,19 +97,19 @@ b. Building from Source
      Or;
       sudo apt-get install build-essential e2fsprogs uuid uuid-dev \
                            gnome-common libparted-dev libgtkmm-3.0-dev \
-                           libdevmapper-dev docbook-xml
+                           libdevmapper-dev yelp-tools docbook-xml
 
    On Fedora, you will need to run (as root);
       yum install gtkmm30-devel parted-devel e2fsprogs-devel gettext \
                   'perl(XML::Parser)' desktop-file-utils libuuid-devel \
-                  docbook-dtds intltool gnome-common gcc-c++
+                  yelp-tools docbook-dtds intltool gnome-common gcc-c++
       yum groupinstall 'Development Tools'
 
    On openSUSE, these dependencies may be obtained by running the
    following commands;
       sudo zypper install automake autoconf make gnome-common \
                           libuuid-devel parted-devel gtkmm3-devel \
-                          docbook-xsl-stylesheets
+                          yelp-tools docbook-xsl-stylesheets
       sudo zypper install -t pattern devel_c_c++
 
    Again, build GParted with the default configuration and install into
diff --git a/autogen.sh b/autogen.sh
index 7feb6796..3573315e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -25,4 +25,10 @@ if ! test -d $srcdir/m4; then
        mkdir $srcdir/m4
 fi
 
+which yelp-build || {
+       echo "ERROR: Command 'yelp-build' not found"
+       echo "ERROR: Package 'yelp-tools' needs to be installed"
+       exit 1
+}
+
 REQUIRED_AUTOMAKE_VERSION=1.9 . gnome-autogen.sh
diff --git a/configure.ac b/configure.ac
index 9485eb4e..40ae777d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -277,9 +277,9 @@ else
 fi
 
 if test "x$enable_doc" = xyes; then
-       :
-else
-       :
+dnl YELP_HELP_INIT has to start at column 0 for gnome-autogen.sh to detect it
+dnl and automatically required yelp.m4.
+YELP_HELP_INIT
 fi
 
 AM_CONDITIONAL([BUILD_HELP_DOC], [test "x$enable_doc" = xyes])
diff --git a/help/C/gparted.xml b/help/C/index.docbook
similarity index 99%
rename from help/C/gparted.xml
rename to help/C/index.docbook
index 21541ab3..baf305e5 100644
--- a/help/C/gparted.xml
+++ b/help/C/index.docbook
@@ -19,10 +19,10 @@
 
 <!--
       To generate a single html file of this document, use the command:
-        xmlto html-nochunks gparted.xml
+        xmlto html-nochunks index.docbook
 
       To test this document in a viewer, use the command:
-        gnome-help file:/full-path-to-gparted.xml
+        yelp file:/full-path-to-index.docbook
  -->
 
 <!-- ============= Document Header =================================== -->
diff --git a/help/Makefile.am b/help/Makefile.am
index 96c43de9..0c8540b9 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -1,17 +1,17 @@
-#The name of the help document to build.
-#  This is the filename without the .xml extension.
-DOC_MODULE = gparted
+@YELP_HELP_RULES@
 
-#List any files included in the help document using system entities
-#  Example:  <!ENTITY SYSTEM "chapter1.xml">
-DOC_ENTITIES =
+# Name of the directory into which help files are installed:
+# ${datadir}/help/${LANG}/${HELP_ID}/
+HELP_ID = gparted
 
-#List any files that are included in the Xinclude specification
-DOC_INCLUDES =
+# List of help files to install.
+# NOTE: Top-level DocBook file NUST be named index.docbook.
+# https://wiki.gnome.org/Initiatives/GnomeGoals/NewDocumentationInfrastructure
+HELP_FILES = index.docbook
 
 #List of all the figures that are referenced in the help document
-DOC_FIGURES = figures/gparted_window.png
+HELP_MEDIA = figures/gparted_window.png
 
 #List of all the language codes for the languages in which the
 #  document is translated
-DOC_LINGUAS = cs de el es fr gd it pt_BR ro ru sl sr sr@latin sv te th
+HELP_LINGUAS = cs de el es fr gd it pt_BR ro ru sl sr sr@latin sv te th


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]