Selaa lähdekoodia

configure version in man pages

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
Stephan Lachnit 4 vuotta sitten
vanhempi
sitoutus
3d49f87308
3 muutettua tiedostoa jossa 10 lisäystä ja 3 poistoa
  1. 1 1
      data/gamemoded.8.in
  2. 1 1
      data/gamemoderun.1.in
  3. 8 1
      data/meson.build

+ 1 - 1
data/gamemoded.8.in

@@ -1,6 +1,6 @@
 .\" Manpage for gamemoded.
 .\" Contact linux-contact@feralinteractive.com to correct errors or typos.
-.TH gamemoded 8 "4 May 2020" "1.6-dev" "gamemoded man page"
+.TH gamemoded 8 "4 May 2020" "@GAMEMODE_VERSION@" "gamemoded man page"
 .SH NAME
 gamemoded \- daemon that optimises system performance on demand
 .SH SYNOPSIS

+ 1 - 1
data/gamemoderun.1 → data/gamemoderun.1.in

@@ -1,6 +1,6 @@
 .\" Manpage for gamemoderun.
 .\" Contact linux-contact@feralinteractive.com to correct errors or typos.
-.TH gamemoded 1 "4 May 2020" "1.6-dev" "gamemoderun man page"
+.TH gamemoded 1 "4 May 2020" "@GAMEMODE_VERSION@" "gamemoderun man page"
 .SH NAME
 gamemoderun \- invoke gamemode into any program
 .SH SYNOPSIS

+ 8 - 1
data/meson.build

@@ -2,6 +2,7 @@ data_conf = configuration_data()
 data_conf.set('BINDIR', path_bindir)
 data_conf.set('LIBEXECDIR', path_libexecdir)
 data_conf.set('GAMEMODE_PREFIX', path_prefix)
+data_conf.set('GAMEMODE_VERSION', meson.project_version())
 
 # Set gamemoderun lib dir
 gamemoderun_lib_dir = get_option('with-gamemoderun-lib-dir')
@@ -68,8 +69,14 @@ install_man(
     install_dir: mandir,
 )
 
+gamemoderun_manpage = configure_file(
+    input: files('gamemoderun.1.in'),
+    output: 'gamemoderun.1',
+    configuration: data_conf,
+)
+
 install_man(
-    files('gamemoderun.1'),
+    gamemoderun_manpage,
     install_dir: mandir,
 )