From 60562e281e3f5d422b0e9692a55563b7424138ca Mon Sep 17 00:00:00 2001 From: jeon Date: Fri, 15 Jan 2021 13:11:41 +0900 Subject: packaging: make a option to select enable/disable tools Change-Id: Ie6fad921bb51cf8ae52359096ea9e425dd4e2c2c --- meson.build | 6 +++++- meson_options.txt | 7 ++++++- packaging/libxkbcommon.spec | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c675d6b..6c23121 100644 --- a/meson.build +++ b/meson.build @@ -407,8 +407,12 @@ endif man_pages = [] # Tools -#build_tools = have_getopt_long +if get_option('enable-tools') +build_tools = have_getopt_long +else build_tools = false +endif + if build_tools libxkbcommon_tools_internal = static_library( 'tools-internal', diff --git a/meson_options.txt b/meson_options.txt index a4c7b2a..ac874a7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -67,4 +67,9 @@ option( value: true, description: 'Enable building libxkbregistry', ) - +option( + 'enable-tools', + type: 'boolean', + value: true, + description: 'Building libxkbcommon tools', +) diff --git a/packaging/libxkbcommon.spec b/packaging/libxkbcommon.spec index ced4a49..186a061 100644 --- a/packaging/libxkbcommon.spec +++ b/packaging/libxkbcommon.spec @@ -58,6 +58,7 @@ meson setup \ -Denable-docs=false \ -Denable-wayland=false \ -Denable-xkbregistry=false \ + -Denable-tools=false \ --prefix /usr \ --libdir %{_libdir} \ builddir @@ -80,6 +81,11 @@ ninja -C builddir install ## disable xkbregistry ## #%{_libdir}/libxkbregistry.so.0* +## diable tools ## +#%{_bindir}/* +#/usr/libexec/xkbcommon/* +#%doc %{_mandir}/man?/* + %files devel %manifest %{name}.manifest %defattr(-,root,root) -- cgit v1.2.3