summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisenmann <4240-p3732@users.noreply.gitlab.freedesktop.org>2022-09-07 14:24:43 +0000
committerJan Rybar <jrybar@redhat.com>2022-09-07 14:24:43 +0000
commita405b3e00ac24ae21ea36834cfc61cbae041bf39 (patch)
tree3679c33ed7cc9cf6d05f61e84afa22b6135871cb
parent91597f08929ddf1bc3a90a7122f9e23ea96d6e11 (diff)
downloadpolkit-a405b3e00ac24ae21ea36834cfc61cbae041bf39.tar.gz
build: add option to skip building polkitd
-rw-r--r--meson.build8
-rw-r--r--meson_options.txt1
-rw-r--r--src/meson.build8
-rw-r--r--test/meson.build4
4 files changed, 17 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 8bab9ce..aeb0002 100644
--- a/meson.build
+++ b/meson.build
@@ -137,6 +137,11 @@ assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t fin
duktape_req_version = '>= 2.2.0'
js_engine = get_option('js_engine')
+libs_only = get_option('libs-only')
+if libs_only
+ js_engine = ''
+endif
+
if js_engine == 'duktape'
js_dep = dependency('duktape', version: duktape_req_version, required: false)
if not js_dep.found()
@@ -387,6 +392,9 @@ endif
output += ' polkitd user: ' + polkitd_user + ' \n'
output += ' Javascript engine: ' + js_engine + '\n'
output += ' PAM support: ' + enable_pam.to_string() + '\n\n'
+if libs_only
+ output += ' !!! Only building polkit libraries, not polkitd !!!\n\n'
+endif
if enable_pam
output += ' PAM file auth: ' + pam_conf['PAM_FILE_INCLUDE_AUTH'] + '\n'
output += ' PAM file acount: ' + pam_conf['PAM_FILE_INCLUDE_ACCOUNT'] + '\n'
diff --git a/meson_options.txt b/meson_options.txt
index d648148..9066bb2 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,7 @@
option('session_tracking', type: 'combo', choices: ['libsystemd-login', 'libelogind', 'ConsoleKit'], value: 'ConsoleKit', description: 'session tracking (libsystemd-login/libelogind/ConsoleKit)')
option('systemdsystemunitdir', type: 'string', value: '', description: 'custom directory for systemd system units')
+option('libs-only', type: 'boolean', value: false, description: 'Only build libraries (skips building polkitd)')
option('polkitd_user', type: 'string', value: 'polkitd', description: 'User for running polkitd (polkitd)')
option('authfw', type: 'combo', choices: ['pam', 'shadow', 'bsdauth'], value: 'pam', description: 'Authentication framework (pam/shadow)')
diff --git a/src/meson.build b/src/meson.build
index 4073333..985d0b0 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -4,9 +4,11 @@ symbol_map = meson.current_source_dir() / 'symbol.map'
ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map))
subdir('polkit')
-subdir('polkitbackend')
-subdir('polkitagent')
-subdir('programs')
+if not get_option('libs-only')
+ subdir('polkitbackend')
+ subdir('polkitagent')
+ subdir('programs')
+endif
enable_examples = get_option('examples')
if enable_examples
diff --git a/test/meson.build b/test/meson.build
index 3f02d35..3acdbd4 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -23,4 +23,6 @@ test_env.set('MOCK_NETGROUP', test_etc_dir / 'netgroup')
test_env.set('POLKIT_TEST_DATA', test_data_dir)
subdir('polkit')
-subdir('polkitbackend')
+if not get_option('libs-only')
+ subdir('polkitbackend')
+endif