diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33804f42df887e55eda2db3c47b38f94ee766361..8915c7d560da65abda8e174f9ce3736538a40134 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,8 @@ build:ubuntu:meson: ninja-build python3-pip python3-setuptools + xsltproc + docbook-xsl-ns - pip3 install meson script: - meson _build -Dgtk_doc=true -Ddocbook_docs=enabled -Dtests=true diff --git a/docs/meson.build b/docs/meson.build index 6429576fec614ea78340b72d593ee1e5f28969c7..4c5ba640b941c3e9f9e3d4f286d50a781876371a 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -25,3 +25,16 @@ endif if get_option('gtk_doc') subdir('reference') endif + +if get_option('man') + manpages = ['notify-send'] + + foreach page : manpages + custom_target(page + '-man', + input: page + '.xml', + output: page + '.1', + command: xsltproc_command, + install: true, + install_dir: man1dir) + endforeach +endif diff --git a/docs/notify-send.xml b/docs/notify-send.xml new file mode 100644 index 0000000000000000000000000000000000000000..614b48b6fc3cb00c2bf09dcf2fba4390fb6e1db0 --- /dev/null +++ b/docs/notify-send.xml @@ -0,0 +1,102 @@ + + + November 2005 + libnotify + + + Andre Filipe de Assuncao e Brito + decko@noisemakers.org + Original author + + + Paul van Tilburg + paulvt@debian.org + Original author + + + Riccardo Setti + giskard@debian.org + Original author + + + + + notify-send + 1 + User Commands + + + notify-send + a program to send desktop notifications + + + + notify-send + + OPTIONS + + + summary + + + body + + + + + Description + + With notify-send you can send desktop notifications to the user via a notification daemon from the command line. These notifications can be used to inform the user about an event or display some form of information without getting in the user’s way. + + + Options + + + + , + + Show help and exit. + + + + , =LEVEL + + Specifies the urgency level (low, normal, critical). + + + + , =TIME + + + The duration, in milliseconds, for the notification to appear on screen. + (Ubuntu's Notify OSD and GNOME Shell both ignore this parameter.) + + + + , =ICON[,ICON…] + + + Specifies an icon filename or stock icon to display. + + + + , =TYPE[,TYPE…] + + + Specifies the notification category. + + + + , =TYPE:NAME:VALUE + + Specifies basic extra data to pass. Valid types are INT, DOUBLE, STRING and BYTE. + + + + + + See also + + The Desktop Notification Spec on http://www.galago-project.org/specs/notification/. + + diff --git a/meson.build b/meson.build index 82f3bb545884cc050d6a03dbe55a1b089c370351..5063fe5368bb6331fcc3b92fa92a9c40a85fb28a 100644 --- a/meson.build +++ b/meson.build @@ -31,6 +31,7 @@ default_includes = include_directories('.') prefix = get_option('prefix') includedir = join_paths(prefix, get_option('includedir')) docdir = join_paths(prefix, get_option('datadir'), 'doc', meson.project_name()) +man1dir = join_paths(prefix, get_option('mandir'), 'man1') libnotify_deps = [] extra_deps = [] @@ -51,6 +52,27 @@ configure_file(input: 'config.h.meson', output : 'config.h', configuration : conf) +if get_option('man') + xsltproc = find_program('xsltproc', required: true) + stylesheet = 'http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl' + xsltproc_command = [ + xsltproc, + '--nonet', + '--stringparam', 'man.output.quietly', '1', + '--stringparam', 'funcsynopsis.style', 'ansi', + '--stringparam', 'man.th.extra1.suppress', '1', + '-o', '@OUTPUT@', + stylesheet, + '@INPUT@', + ] + + testrun = run_command(xsltproc, '--nonet', stylesheet) + + if testrun.returncode() != 0 + error('DocBook stylesheet for generating man pages not found, you need to install docbook-xsl-ns or similar package.') + endif +endif + subdir('libnotify') subdir('tools') subdir('docs') diff --git a/meson_options.txt b/meson_options.txt index c37f643edcfa3a27d1ed53df7cf82022933e8d08..c57b364e999f3929a4758c0d03996a0ef2b13189 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,6 +6,10 @@ option('introspection', type: 'feature', value: 'enabled', description: 'Enable GObject introspection') +option('man', + type: 'boolean', + value: true, + description: 'Enable generating the manual page (depends on xsltproc)') option('gtk_doc', type: 'boolean', value: true,