Răsfoiți Sursa

Set up some man page generation

	Start with the example config file
Marc Di Luzio 6 ani în urmă
părinte
comite
440400c2d4
2 a modificat fișierele cu 15 adăugiri și 43 ștergeri
  1. 1 41
      data/gamemoded.8.in
  2. 14 2
      data/meson.build

+ 1 - 41
data/gamemoded.8 → data/gamemoded.8.in

@@ -102,50 +102,10 @@ Behaviour of the config file can be explained by presenting a commented example:
 
 .RS 4
 .nf
-[general]
-; The reaper thread will check every 10 seconds for exited clients
-reaper_freq=10
-
-; The desired governor is used when entering GameMode instead of "performance"
-desiredgov=performance
-; The default governer is used when leaving GameMode instead of restoring the original value
-defaultgov=powersave
-
-; By default, GameMode changes the scheduler policy to SCHED_ISO with 4 or more CPU cores,
-; force enable or disable with "on" or "off"
-softrealtime=auto
-
-; By default, GameMode renices the client to -4, you can put any value between 1 and 20 here,
-; the value will be negated and applied as a nice value
-renice = 4
-
-; By default, GameMode adjusts the iopriority of clients to BE/0, you can put any value
-; between 0 and 7 here (with 0 being highest priority), or one of the special values
-; "off" (to disable) or "reset" (to restore Linux default behavior based on CPU priority),
-; currently, only the best-effort class is supported thus you cannot set it here
-ioprio = 0
-
-[filter]
-; If "whitelist" entry has a value(s)
-; gamemode will reject anything not in the whitelist
-;whitelist=RiseOfTheTombRaider
-
-; Gamemode will always reject anything in the blacklist
-blacklist=HalfLife3
-    glxgears
-
-[custom]
-; Custom scripts (executed using the shell) when gamemode starts and ends
-start=notify-send "GameMode started"
-    /home/me/bin/stop_ethmining.sh
-
-end=notify-send "GameMode ended"
-    /home/me/bin/start_ethmining.sh
+@GAMEMODE_EXAMPLE_CONFIG@
 .fi
 .RE
 
-This config file will currently reject any games that match \fIHalfLife3\fR or \fIglxgears\fR, but can be modified to only accept \fIRiseOfTheTombRaider\fR by removing the semicolon preceding the fourth line.
-
 .SH SEE ALSO
 systemd(1)
 

+ 14 - 2
data/meson.build

@@ -3,6 +3,13 @@ data_conf.set('BINDIR', path_bindir)
 data_conf.set('LIBEXECDIR', path_libexecdir)
 data_conf.set('GAMEMODE_LIB_DIR', path_libdir)
 
+# Pull in the example config
+config_example = run_command(
+    'cat',
+    join_paths(meson.source_root(), 'example', 'gamemode.ini')
+).stdout().strip()
+data_conf.set('GAMEMODE_EXAMPLE_CONFIG', config_example)
+
 if with_systemd == true
     # Install systemd user unit
     configure_file(
@@ -39,5 +46,10 @@ configure_file(
     install_mode: 'rwxr-xr-x',
 )
 
-# Install the man page
-install_man('gamemoded.8')
+# Configure and install the man page
+manpage = configure_file(
+    input: files('gamemoded.8.in'),
+    output: 'gamemoded.8',
+    configuration: data_conf,
+)
+install_man(manpage)