diff options
-rw-r--r-- | config.d/security.in | 8 | ||||
-rw-r--r-- | config.in | 2 | ||||
-rw-r--r-- | sway/CMakeLists.txt | 30 | ||||
-rw-r--r-- | swaylock/CMakeLists.txt | 2 |
4 files changed, 31 insertions, 11 deletions
diff --git a/config.d/security.in b/config.d/security.in index a1efb98f..b5690dc7 100644 --- a/config.d/security.in +++ b/config.d/security.in | |||
@@ -6,10 +6,10 @@ | |||
6 | # installation. | 6 | # installation. |
7 | 7 | ||
8 | # Configures which programs are allowed to use which sway features | 8 | # Configures which programs are allowed to use which sway features |
9 | permit __PREFIX__/swaylock lock | 9 | permit __PREFIX__/bin/swaylock lock |
10 | permit __PREFIX__/swaybar panel | 10 | permit __PREFIX__/bin/swaybar panel |
11 | permit __PREFIX__/swaybg background | 11 | permit __PREFIX__/bin/swaybg background |
12 | permit __PREFIX__/swaygrab screenshot | 12 | permit __PREFIX__/bin/swaygrab screenshot |
13 | 13 | ||
14 | permit * fullscreen keyboard mouse | 14 | permit * fullscreen keyboard mouse |
15 | 15 | ||
@@ -195,4 +195,4 @@ bar { | |||
195 | } | 195 | } |
196 | } | 196 | } |
197 | 197 | ||
198 | include __SYSCONFDIR__/etc/sway/config.d/* | 198 | include __SYSCONFDIR__/sway/config.d/* |
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index 89388220..15fa1720 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt | |||
@@ -63,11 +63,31 @@ install( | |||
63 | DESTINATION bin | 63 | DESTINATION bin |
64 | COMPONENT runtime | 64 | COMPONENT runtime |
65 | ) | 65 | ) |
66 | install( | 66 | |
67 | FILES ${PROJECT_SOURCE_DIR}/config | 67 | add_custom_target(configs ALL) |
68 | DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sway/ | 68 | |
69 | COMPONENT configuration | 69 | function(add_config name source destination) |
70 | ) | 70 | add_custom_command( |
71 | OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
72 | COMMAND sed -r | ||
73 | 's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g' | ||
74 | ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
75 | DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in | ||
76 | COMMENT "Generating config file ${source}" | ||
77 | ) | ||
78 | |||
79 | install( | ||
80 | FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
81 | DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination} | ||
82 | COMPONENT configuration | ||
83 | ) | ||
84 | |||
85 | add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}) | ||
86 | add_dependencies(configs config-${name}) | ||
87 | endfunction() | ||
88 | |||
89 | add_config(config config sway) | ||
90 | add_config(security config.d/security sway/config.d) | ||
71 | 91 | ||
72 | add_manpage(sway 1) | 92 | add_manpage(sway 1) |
73 | add_manpage(sway 5) | 93 | add_manpage(sway 5) |
diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt index febbd1af..4aec6424 100644 --- a/swaylock/CMakeLists.txt +++ b/swaylock/CMakeLists.txt | |||
@@ -42,7 +42,7 @@ install( | |||
42 | 42 | ||
43 | install( | 43 | install( |
44 | FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock | 44 | FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock |
45 | DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/pam.d/ | 45 | DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d/ |
46 | COMPONENT data | 46 | COMPONENT data |
47 | ) | 47 | ) |
48 | 48 | ||