about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch
blob: bb56eb13e88a1755d8896cc8c4937e6bf64e2e9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
--- a/meson.build
+++ b/meson.build
@@ -67,6 +67,11 @@ datadir = join_paths(prefix, get_option('datadir'))
 localedir = join_paths(prefix, get_option('localedir'))
 localstatedir = join_paths(prefix, get_option('localstatedir'))
 sysconfdir = join_paths(prefix, get_option('sysconfdir'))
+if get_option('sysconfdir_install') != ''
+  sysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'))
+else
+  sysconfdir_install = sysconfdir
+endif
 privlibdir = join_paths(libdir, 'pulseaudio')
 
 if host_machine.system() == 'windows'
@@ -82,6 +87,11 @@ endif
 pkgconfigdir = join_paths(libdir, 'pkgconfig')
 pulselibexecdir = join_paths(libexecdir, 'pulse')
 pulsesysconfdir = join_paths(sysconfdir, 'pulse')
+if get_option('sysconfdir_install') != ''
+  pulsesysconfdir_install = join_paths(get_option('prefix'),  get_option('sysconfdir_install'), 'pulse')
+else
+  pulsesysconfdir_install = pulsesysconfdir
+endif
 
 modlibexecdir = get_option('modlibexecdir')
 if modlibexecdir == ''
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -72,6 +72,9 @@ option('bashcompletiondir',
 option('zshcompletiondir',
        type : 'string',
        description : 'Directory for zsh completion scripts ["no" disables]')
+option('sysconfdir_install',
+       type: 'string', value: '',
+       description: 'sysconfdir to use during installation')
 
 # Optional features
 
--- a/src/daemon/meson.build
+++ b/src/daemon/meson.build
@@ -52,7 +52,7 @@ if x11_dep.found()
     output : '00-pulseaudio-x11',
     configuration : conf,
     install : true,
-    install_dir : join_paths(sysconfdir, 'xdg', 'Xwayland-session.d'),
+    install_dir : join_paths(sysconfdir_install, 'xdg', 'Xwayland-session.d'),
   )
 
   desktop_file = i18n.merge_file(
@@ -61,7 +61,7 @@ if x11_dep.found()
     po_dir : po_dir,
     type : 'desktop',
     install : true,
-    install_dir : join_paths(sysconfdir, 'xdg', 'autostart'),
+    install_dir : join_paths(sysconfdir_install, 'xdg', 'autostart'),
   )
 
   desktop_utils = find_program('desktop-file-validate', required: false)
@@ -93,7 +93,7 @@ custom_target('daemon.conf',
   command : [m4, '@INPUT@'],
   build_by_default : true,
   install : true,
-  install_dir : pulsesysconfdir,
+  install_dir : pulsesysconfdir_install,
 )
 
 default_conf = configuration_data()
@@ -117,7 +117,7 @@ custom_target('default.pa',
   command : [m4, '@INPUT@'],
   build_by_default : true,
   install : true,
-  install_dir : pulsesysconfdir,
+  install_dir : pulsesysconfdir_install,
 )
 
 system_conf = configuration_data()
@@ -136,12 +136,12 @@ custom_target('system.pa',
   command : [m4, '@INPUT@'],
   build_by_default : true,
   install : true,
-  install_dir : pulsesysconfdir,
+  install_dir : pulsesysconfdir_install,
 )
 
 if dbus_dep.found()
   install_data('pulseaudio-system.conf',
-    install_dir : join_paths(sysconfdir, 'dbus-1', 'system.d')
+    install_dir : join_paths(sysconfdir_install, 'dbus-1', 'system.d')
   )
 endif
 
--- a/src/pulse/meson.build
+++ b/src/pulse/meson.build
@@ -134,5 +134,5 @@ client_conf_file = configure_file(
   input : 'client.conf.in',
   output : 'client.conf',
   configuration : client_conf,
-  install_dir : pulsesysconfdir,
+  install_dir : pulsesysconfdir_install,
 )