aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch
blob: dd4de7321e958a95462d5c40b80140bab2fd2d2b (plain)
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
diff --git a/meson.build b/meson.build
index 86af7243e..e2d48ab94 100644
--- a/meson.build
+++ b/meson.build
@@ -65,6 +65,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')
 
 alsadatadir = get_option('alsadatadir')
@@ -75,6 +80,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 == ''
diff --git a/meson_options.txt b/meson_options.txt
index 824f24e08..59a2b57ab 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -66,6 +66,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
 
diff --git a/src/daemon/meson.build b/src/daemon/meson.build
index 9c9f807e7..425cecb46 100644
--- a/src/daemon/meson.build
+++ b/src/daemon/meson.build
@@ -53,7 +53,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)
@@ -85,7 +85,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()
@@ -111,7 +111,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()
@@ -132,12 +132,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
 
diff --git a/src/pulse/meson.build b/src/pulse/meson.build
index aaebff53e..05a29a0d0 100644
--- a/src/pulse/meson.build
+++ b/src/pulse/meson.build
@@ -130,5 +130,5 @@ client_conf_file = configure_file(
   input : 'client.conf.in',
   output : 'client.conf',
   configuration : client_conf,
-  install_dir : pulsesysconfdir,
+  install_dir : pulsesysconfdir_install,
 )