meson: make docdir configurable
The debian package wants to install docs to $datadir/doc/i3-wm. related to #4086
This commit is contained in:
parent
aba6ec3e52
commit
693eee0c03
4
debian/rules
vendored
4
debian/rules
vendored
@ -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.
|
||||
|
@ -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 = [
|
||||
@ -96,7 +101,7 @@ if get_option('docs')
|
||||
'@INPUT@',
|
||||
],
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'doc', 'i3'),
|
||||
install_dir: docdir,
|
||||
)
|
||||
endforeach
|
||||
|
||||
@ -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
|
||||
|
@ -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)')
|
||||
|
Loading…
x
Reference in New Issue
Block a user