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"
    3e1526c056

[5] totem commit "Use new documentation infrastructure"
    59a6bd6064

Closes !24 - Port to GNOME 3 yelp-tools documentation infrastructure
This commit is contained in:
Mike Fleetwood 2019-02-23 10:39:57 +00:00 committed by Curtis Gedak
parent e62b352eed
commit a725921a22
7 changed files with 29 additions and 20 deletions

2
.gitignore vendored
View file

@ -8,6 +8,7 @@
*.lo *.lo
*.mo *.mo
*.o *.o
*.stamp
.cproject .cproject
.csettings .csettings
.deps .deps
@ -32,6 +33,7 @@ gparted.appdata.xml
gparted.desktop gparted.desktop
gparted.desktop.in gparted.desktop.in
gpartedbin gpartedbin
index.docbook
install-sh install-sh
intltool-* intltool-*
lib/gtest/lib lib/gtest/lib

View file

@ -7,7 +7,7 @@ stages:
image: centos:latest image: centos:latest
before_script: before_script:
- yum update -y - 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 gcc-c++ libuuid-devel parted-devel gtkmm30-devel make
polkit file polkit file
@ -16,7 +16,7 @@ stages:
image: ubuntu:latest image: ubuntu:latest
before_script: before_script:
- apt-get update - 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 uuid-dev libparted-dev libgtkmm-3.0-dev make
policykit-1 policykit-1

7
README
View file

@ -88,6 +88,7 @@ b. Building from Source
gnome-common gnome-common
gtkmm3 gtkmm3
gettext gettext
yelp-tools - required if help documentation is to be built
On Debian or Ubuntu, these dependencies may be obtained by running On Debian or Ubuntu, these dependencies may be obtained by running
one of the following commands: one of the following commands:
@ -96,19 +97,19 @@ b. Building from Source
Or; Or;
sudo apt-get install build-essential e2fsprogs uuid uuid-dev \ sudo apt-get install build-essential e2fsprogs uuid uuid-dev \
gnome-common libparted-dev libgtkmm-3.0-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); On Fedora, you will need to run (as root);
yum install gtkmm30-devel parted-devel e2fsprogs-devel gettext \ yum install gtkmm30-devel parted-devel e2fsprogs-devel gettext \
'perl(XML::Parser)' desktop-file-utils libuuid-devel \ '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' yum groupinstall 'Development Tools'
On openSUSE, these dependencies may be obtained by running the On openSUSE, these dependencies may be obtained by running the
following commands; following commands;
sudo zypper install automake autoconf make gnome-common \ sudo zypper install automake autoconf make gnome-common \
libuuid-devel parted-devel gtkmm3-devel \ libuuid-devel parted-devel gtkmm3-devel \
docbook-xsl-stylesheets yelp-tools docbook-xsl-stylesheets
sudo zypper install -t pattern devel_c_c++ sudo zypper install -t pattern devel_c_c++
Again, build GParted with the default configuration and install into Again, build GParted with the default configuration and install into

View file

@ -25,4 +25,10 @@ if ! test -d $srcdir/m4; then
mkdir $srcdir/m4 mkdir $srcdir/m4
fi 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 REQUIRED_AUTOMAKE_VERSION=1.9 . gnome-autogen.sh

View file

@ -277,9 +277,9 @@ else
fi fi
if test "x$enable_doc" = xyes; then if test "x$enable_doc" = xyes; then
: dnl YELP_HELP_INIT has to start at column 0 for gnome-autogen.sh to detect it
else dnl and automatically required yelp.m4.
: YELP_HELP_INIT
fi fi
AM_CONDITIONAL([BUILD_HELP_DOC], [test "x$enable_doc" = xyes]) AM_CONDITIONAL([BUILD_HELP_DOC], [test "x$enable_doc" = xyes])

View file

@ -19,10 +19,10 @@
<!-- <!--
To generate a single html file of this document, use the command: 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: 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 =================================== --> <!-- ============= Document Header =================================== -->

View file

@ -1,17 +1,17 @@
#The name of the help document to build. @YELP_HELP_RULES@
# This is the filename without the .xml extension.
DOC_MODULE = gparted
#List any files included in the help document using system entities # Name of the directory into which help files are installed:
# Example: <!ENTITY SYSTEM "chapter1.xml"> # ${datadir}/help/${LANG}/${HELP_ID}/
DOC_ENTITIES = HELP_ID = gparted
#List any files that are included in the Xinclude specification # List of help files to install.
DOC_INCLUDES = # 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 #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 #List of all the language codes for the languages in which the
# document is translated # 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