aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-05-04 15:33:34 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-05-12 11:45:53 +0000
commit62fe452cc29d47d6e5d8996f85a04ea9c91ce252 (patch)
treec9b47887e837349e89706d5f8d84cd2de4386861
parentdoc: benchmarks: update with desktop results for 1.12.1 (r9) (diff)
meson: add -Dsystemd-units-dir=<path> meson command line option
This allows package maintainers to override the location to which our systemd service files are installed. It’s value is an *absolute* path, and *not* relative ${prefix}. The default is ${systemduserunitdir}.
-rw-r--r--CHANGELOG.md2
-rw-r--r--INSTALL.md19
-rw-r--r--meson.build8
-rw-r--r--meson_options.txt3
4 files changed, 22 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cf54368d..b03f3f69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,9 +40,11 @@
## Unreleased
+
### Added
* XDG activation support when opening URLs ([#1058][1058]).
+* `-Dsystemd-units-dir=<path>` meson command line option.
[1058]: https://codeberg.org/dnkl/foot/issues/1058
diff --git a/INSTALL.md b/INSTALL.md
index 1ce5260e..ae0598d8 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -140,15 +140,16 @@ mkdir -p bld/release && cd bld/release
Available compile-time options:
-| Option | Type | Default | Description | Extra dependencies |
-|--------------------------------------|---------|-----------------------|------------------------------------------------|--------------------|
-| `-Ddocs` | feature | `auto` | Builds and install documentation | scdoc |
-| `-Dtests` | bool | `true` | Build tests (adds a `ninja test` build target) | none |
-| `-Dime` | bool | `true` | Enables IME support | None |
-| `-Dgrapheme-clustering` | feature | `auto` | Enables grapheme clustering | libutf8proc |
-| `-Dterminfo` | feature | `enabled` | Build and install terminfo files | tic (ncurses) |
-| `-Ddefault-terminfo` | string | `foot` | Default value of `TERM` | none |
-| `-Dcustom-terminfo-install-location` | string | `${datadir}/terminfo` | Value to set `TERMINFO` to | None |
+| Option | Type | Default | Description | Extra dependencies |
+|--------------------------------------|---------|-------------------------|-------------------------------------------------------|--------------------|
+| `-Ddocs` | feature | `auto` | Builds and install documentation | scdoc |
+| `-Dtests` | bool | `true` | Build tests (adds a `ninja test` build target) | none |
+| `-Dime` | bool | `true` | Enables IME support | None |
+| `-Dgrapheme-clustering` | feature | `auto` | Enables grapheme clustering | libutf8proc |
+| `-Dterminfo` | feature | `enabled` | Build and install terminfo files | tic (ncurses) |
+| `-Ddefault-terminfo` | string | `foot` | Default value of `TERM` | none |
+| `-Dcustom-terminfo-install-location` | string | `${datadir}/terminfo` | Value to set `TERMINFO` to | None |
+| `-Dsystemd-units-dir` | string | `${systemduserunitdir}` | Where to install the systemd service files (absolute) | None |
Documentation includes the man pages, readme, changelog and license
files.
diff --git a/meson.build b/meson.build
index 7280a049..e6f4f530 100644
--- a/meson.build
+++ b/meson.build
@@ -252,7 +252,13 @@ if systemd.found()
configuration = configuration_data()
configuration.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
- systemd_units_dir = systemd.get_variable('systemduserunitdir')
+ custom_units_dir = get_option('systemd-units-dir')
+ if (custom_units_dir == '')
+ systemd_units_dir = systemd.get_variable('systemduserunitdir')
+ else
+ systemd_units_dir = custom_units_dir
+ endif
+
configure_file(
configuration: configuration,
input: 'foot-server@.service.in',
diff --git a/meson_options.txt b/meson_options.txt
index 255ca0ae..0c660a75 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,3 +18,6 @@ option('default-terminfo', type: 'string', value: 'foot',
option('custom-terminfo-install-location', type: 'string', value: '',
description: 'Path to foot\'s terminfo, relative to ${prefix}. If set, foot will set $TERMINFO to this value in the client process.')
+
+option('systemd-units-dir', type: 'string', value: '',
+ description: 'Where to install the systemd service files (absolute path). Default: ${systemduserunitdir}')