Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
meson: make docdir configurable
Browse files Browse the repository at this point in the history
The debian package wants to install docs to $datadir/doc/i3-wm.

related to #4086
  • Loading branch information
stapelberg committed May 19, 2020
1 parent aba6ec3 commit 693eee0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions debian/rules
Expand Up @@ -14,8 +14,8 @@ override_dh_auto_test:
# TODO: enable tests

override_dh_auto_configure:
# The default is /usr/share/doc/i3
dh_auto_configure -- --docdir=/usr/share/doc/i3-wm
# Set -Ddocdir; the default is /usr/share/doc/i3
dh_auto_configure -- -Ddocdir=/usr/share/doc/i3-wm

override_dh_builddeb:
# bintray does not support xz currently.
Expand Down
9 changes: 7 additions & 2 deletions meson.build
Expand Up @@ -71,6 +71,11 @@ config_h = declare_dependency(
# docs generation
################################################################################

docdir = get_option('docdir')
if docdir == ''
docdir = join_paths(get_option('datadir'), 'doc', 'i3')
endif

if get_option('docs')
asciidoc = find_program('asciidoc')
doc_toc_inputs = [
Expand All @@ -96,7 +101,7 @@ if get_option('docs')
'@INPUT@',
],
install: true,
install_dir: join_paths(get_option('datadir'), 'doc', 'i3'),
install_dir: docdir,
)
endforeach

Expand All @@ -115,7 +120,7 @@ if get_option('docs')
'@INPUT@',
],
install: true,
install_dir: join_paths(get_option('datadir'), 'doc', 'i3'),
install_dir: docdir,
)
endforeach
endif
Expand Down
3 changes: 3 additions & 0 deletions meson_options.txt
Expand Up @@ -5,3 +5,6 @@ option('docs', type: 'boolean', value: false,

option('mans', type: 'boolean', value: false,
description: 'Build manpages from source (release tarballs contain a generated copy)')

option('docdir', type: 'string', value: '',
description: 'documentation directory (default: $datadir/docs/i3)')

0 comments on commit 693eee0

Please sign in to comment.