diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2021-07-29 23:27:11 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-09-07 10:55:43 +0000 |
commit | 77d1c243614d385027ca11f75aa5d688b01c2969 (patch) | |
tree | dc39670de7b80b887f539480153334c25ea75e88 /data | |
parent | fa19b2b9b1412d3eeb515afe41c55ac414acc982 (diff) |
build: Port to meson
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
Diffstat (limited to 'data')
-rw-r--r-- | data/meson.build | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 00000000..bfa60053 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com> + +service_conf = { + 'sbindir': mm_prefix / mm_sbindir, + 'MM_POLKIT_SERVICE': (enable_polkit ? 'polkit.service' : ''), +} + +# DBus Service file +configure_file( + input: 'org.freedesktop.ModemManager1.conf.@0@polkit'.format(enable_polkit ? '' : 'no'), + output: '@BASENAME@', + copy: true, + install_dir: dbus_policy_dir, +) + +# DBus Activation file +configure_file( + input: 'org.freedesktop.ModemManager1.service.in', + output: '@BASENAME@', + configuration: service_conf, + install_dir: dbus_system_bus_services_dir, +) + +# systemd unit file +if install_systemdunitdir + configure_file( + input: 'ModemManager.service.in', + output: '@BASENAME@', + configuration: service_conf, + install_dir: systemd_systemdsystemunitdir, + ) +endif + +# Polkit +if enable_polkit + policy = 'org.freedesktop.ModemManager1.policy' + + # build file with translations, which we will include in dist + i18n.merge_file( + policy, + input: configure_file( + input: policy + '.in.in', + output: '@BASENAME@', + configuration: policy_conf, + ), + output: '@BASENAME@', + po_dir: po_dir, + install: true, + install_dir: polkit_gobject_policydir, + ) +endif + +if enable_gtk_doc + # Logos + logos_pngs = files( + 'ModemManager-logo-square.png', + 'ModemManager-logo-wide.png', + 'ModemManager-logo-wide-text.png', + ) + + # Diagrams + diagrams_pngs = files( + 'ModemManager-interface-initialization-sequence.png', + 'ModemManager-interface-initialization-sequence-subclassed.png', + 'ModemManager-states.png', + ) +endif + +# Icon +install_data( + 'ModemManager.png', + install_dir: mm_datadir / 'icons/hicolor/22x22/apps', +) |