packaging: make a option to select enable/disable tools
authorjeon <jhyuni.kang@samsung.com>
Fri, 15 Jan 2021 04:11:41 +0000 (13:11 +0900)
committerDuna Oh <duna.oh@samsung.com>
Mon, 7 Feb 2022 05:50:29 +0000 (14:50 +0900)
Change-Id: Ie6fad921bb51cf8ae52359096ea9e425dd4e2c2c

meson.build
meson_options.txt
packaging/libxkbcommon.spec

index c675d6b..6c23121 100644 (file)
@@ -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',
index a4c7b2a..ac874a7 100644 (file)
@@ -67,4 +67,9 @@ option(
     value: true,
     description: 'Enable building libxkbregistry',
 )
-
+option(
+    'enable-tools',
+    type: 'boolean',
+    value: true,
+    description: 'Building libxkbcommon tools',
+)
index ced4a49..186a061 100644 (file)
@@ -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)