Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Rework portals.conf manpage #1145

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions doc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,24 @@ if build_docbook
endif

if rst2man.found()
manpage_conf = configuration_data()
manpage_conf.set('DATADIR', datadir)
manpage_conf.set('SYSCONFDIR', sysconfdir)

rst2man_flags = [
'--syntax-highlight=none',
]

man_pages = [
{ 'input': 'portals-conf.rst', 'output': 'portals.conf', 'section': '5' },
{ 'input': 'portals.conf.rst.in', 'output': 'portals.conf', 'section': '5' },
]

foreach man_page: man_pages
man_input = man_page.get('input')
man_input = configure_file(
input: man_page.get('input'),
output: man_page.get('input').split('.in').get(0),
configuration: manpage_conf,
)
man_output = man_page.get('output', man_input)
man_section = man_page.get('section', '1')
man_full = '@0@.@1@'.format(man_output, man_section)
Expand Down
24 changes: 21 additions & 3 deletions doc/portals-conf.rst → doc/portals.conf.rst.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _portals.conf(5):

============
portals.conf
============
Expand All @@ -8,8 +6,28 @@ portals.conf
XDG desktop portal configuration
--------------------------------

:Manual section: 5
:Manual group: File Formats Manual

.. _synopsis:

SYNOPSIS
========

*$XDG_CONFIG_HOME/xdg-desktop-portal/{\*-}portals.conf*

*$XDG_CONFIG_DIRS/xdg-desktop-portal/{\*-}portals.conf*

*@SYSCONFDIR@/xdg-desktop-portal/{\*-}portals.conf*

*$XDG_DATA_HOME/xdg-desktop-portal/{\*-}portals.conf*

*$XDG_DATA_DIRS/xdg-desktop-portal/{\*-}portals.conf*

*@DATADIR@/xdg-desktop-portal/{\*-}portals.conf*

DESCRIPTION
-----------
===========

xdg-desktop-portal uses a configuration file to determine which portal backend
should be used to provide the implementation for the requested interface.
Expand Down
Loading