aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-11-30 08:31:13 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-11-30 08:31:13 -0500
commit2f3633433e2f1d840f3a98ca777d79d658a66e3f (patch)
tree2aa4b96a6070f644c72ec0e7fe5da6e50ca3d1b5
parentmeson: common static library (diff)
downloadsway-2f3633433e2f1d840f3a98ca777d79d658a66e3f.tar.gz
sway-2f3633433e2f1d840f3a98ca777d79d658a66e3f.tar.zst
sway-2f3633433e2f1d840f3a98ca777d79d658a66e3f.zip
add meson install files
-rw-r--r--config.in4
-rw-r--r--meson.build54
-rw-r--r--meson_options.txt3
-rw-r--r--security.d/00-defaults.in18
-rw-r--r--sway/meson.build3
5 files changed, 68 insertions, 14 deletions
diff --git a/config.in b/config.in
index b39a39aa..086b66dc 100644
--- a/config.in
+++ b/config.in
@@ -21,7 +21,7 @@ set $menu dmenu_run
21### Output configuration 21### Output configuration
22# 22#
23# Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/) 23# Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/)
24output * bg __DATADIR__/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill 24output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
25# 25#
26# Example configuration: 26# Example configuration:
27# 27#
@@ -194,4 +194,4 @@ bar {
194 } 194 }
195} 195}
196 196
197include __SYSCONFDIR__/sway/config.d/* 197include @sysconfdir@/sway/config.d/*
diff --git a/meson.build b/meson.build
index ac161987..494f2866 100644
--- a/meson.build
+++ b/meson.build
@@ -11,6 +11,11 @@ project(
11 11
12cc = meson.get_compiler('c') 12cc = meson.get_compiler('c')
13 13
14is_freebsd = host_machine.system().startswith('freebsd')
15datadir = get_option('datadir')
16sysconfdir = get_option('sysconfdir')
17prefix = get_option('prefix')
18
14jsonc = dependency('json-c', version: '>=0.12.1') 19jsonc = dependency('json-c', version: '>=0.12.1')
15pcre = dependency('libpcre') 20pcre = dependency('libpcre')
16wlroots = dependency('wlroots') 21wlroots = dependency('wlroots')
@@ -37,7 +42,6 @@ else
37 git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip() 42 git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip()
38 version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch) 43 version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch)
39endif 44endif
40
41add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c') 45add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c')
42 46
43sway_inc = include_directories('include') 47sway_inc = include_directories('include')
@@ -45,3 +49,51 @@ sway_inc = include_directories('include')
45subdir('common') 49subdir('common')
46subdir('sway') 50subdir('sway')
47 51
52config = configuration_data()
53config.set('sysconfdir', join_paths(prefix, sysconfdir))
54config.set('datadir', join_paths(prefix, datadir))
55config.set('prefix', prefix)
56
57configure_file(
58 configuration: config,
59 input: 'config.in',
60 output: '@BASENAME@',
61 install_dir: sysconfdir + '/sway'
62)
63
64if is_freebsd
65 configure_file(
66 configuration: config,
67 input: 'security.d/10-freebsd.in',
68 output: '@BASENAME@',
69 install_dir: sysconfdir + '/sway/security.d'
70 )
71else
72 configure_file(
73 configuration: config,
74 input: 'security.d/00-defaults.in',
75 output: '@BASENAME@',
76 install_dir: sysconfdir + '/sway/security.d'
77 )
78endif
79
80install_data(
81 'sway.desktop',
82 install_dir: datadir + '/wayland-sessions'
83)
84
85if (get_option('default_wallpaper'))
86 wallpaper_files = files(
87 'assets/Sway_Wallpaper_Blue_768x1024.png',
88 'assets/Sway_Wallpaper_Blue_768x1024_Portrait.png',
89 'assets/Sway_Wallpaper_Blue_1136x640.png',
90 'assets/Sway_Wallpaper_Blue_1136x640_Portrait.png',
91 'assets/Sway_Wallpaper_Blue_1366x768.png',
92 'assets/Sway_Wallpaper_Blue_1920x1080.png',
93 'assets/Sway_Wallpaper_Blue_2048x1536.png',
94 'assets/Sway_Wallpaper_Blue_2048x1536_Portrait.png',
95 )
96 wallpaper_install_dir = datadir + '/backgrounds/sway'
97
98 install_data(wallpaper_files, install_dir: wallpaper_install_dir)
99endif
diff --git a/meson_options.txt b/meson_options.txt
index 5015a986..03bc1986 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,2 @@
1option('sway_version', type : 'string', description : 'The version string reported in `sway --version`.') 1option('sway_version', type : 'string', description: 'The version string reported in `sway --version`.')
2option('default_wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.')
diff --git a/security.d/00-defaults.in b/security.d/00-defaults.in
index 05098dea..e4626477 100644
--- a/security.d/00-defaults.in
+++ b/security.d/00-defaults.in
@@ -6,17 +6,17 @@
6# installation. 6# installation.
7# 7#
8# DO NOT CHANGE THIS FILE. Override these defaults by writing new files in 8# DO NOT CHANGE THIS FILE. Override these defaults by writing new files in
9# __SYSCONFDIR__/sway/security.d/* 9# @sysconfdir@/sway/security.d/*
10 10
11# Configures enabled compositor features for specific programs 11# Configures enabled compositor features for specific programs
12permit * fullscreen keyboard mouse 12permit * fullscreen keyboard mouse
13permit __PREFIX__/bin/swaylock lock 13permit @prefix@/bin/swaylock lock
14permit __PREFIX__/bin/swaybg background 14permit @prefix@/bin/swaybg background
15permit __PREFIX__/bin/swaygrab screenshot 15permit @prefix@/bin/swaygrab screenshot
16permit __PREFIX__/bin/swaybar panel 16permit @prefix@/bin/swaybar panel
17 17
18# Configures enabled IPC features for specific programs 18# Configures enabled IPC features for specific programs
19ipc __PREFIX__/bin/swaymsg { 19ipc @prefix@/bin/swaymsg {
20 * enabled 20 * enabled
21 21
22 events { 22 events {
@@ -24,7 +24,7 @@ ipc __PREFIX__/bin/swaymsg {
24 } 24 }
25} 25}
26 26
27ipc __PREFIX__/bin/swaybar { 27ipc @prefix@/bin/swaybar {
28 bar-config enabled 28 bar-config enabled
29 outputs enabled 29 outputs enabled
30 workspaces enabled 30 workspaces enabled
@@ -36,12 +36,12 @@ ipc __PREFIX__/bin/swaybar {
36 } 36 }
37} 37}
38 38
39ipc __PREFIX__/bin/swaygrab { 39ipc @prefix@/bin/swaygrab {
40 outputs enabled 40 outputs enabled
41 tree enabled 41 tree enabled
42} 42}
43 43
44ipc __PREFIX__/bin/swaylock { 44ipc @prefix@/bin/swaylock {
45 outputs enabled 45 outputs enabled
46} 46}
47 47
diff --git a/sway/meson.build b/sway/meson.build
index b02506c8..cf2aa913 100644
--- a/sway/meson.build
+++ b/sway/meson.build
@@ -26,5 +26,6 @@ executable(
26 sway_sources, 26 sway_sources,
27 include_directories: [sway_inc], 27 include_directories: [sway_inc],
28 dependencies: sway_deps, 28 dependencies: sway_deps,
29 link_with: [lib_sway_common] 29 link_with: [lib_sway_common],
30 install: true
30) 31)