mirror of
https://github.com/swaywm/sway.git
synced 2025-01-27 13:28:13 +01:00
Run config files through sed and install to /etc
This commit is contained in:
parent
751e6d2ab2
commit
25a4a85a59
4 changed files with 31 additions and 11 deletions
|
@ -6,10 +6,10 @@
|
||||||
# installation.
|
# installation.
|
||||||
|
|
||||||
# Configures which programs are allowed to use which sway features
|
# Configures which programs are allowed to use which sway features
|
||||||
permit __PREFIX__/swaylock lock
|
permit __PREFIX__/bin/swaylock lock
|
||||||
permit __PREFIX__/swaybar panel
|
permit __PREFIX__/bin/swaybar panel
|
||||||
permit __PREFIX__/swaybg background
|
permit __PREFIX__/bin/swaybg background
|
||||||
permit __PREFIX__/swaygrab screenshot
|
permit __PREFIX__/bin/swaygrab screenshot
|
||||||
|
|
||||||
permit * fullscreen keyboard mouse
|
permit * fullscreen keyboard mouse
|
||||||
|
|
||||||
|
|
|
@ -195,4 +195,4 @@ bar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include __SYSCONFDIR__/etc/sway/config.d/*
|
include __SYSCONFDIR__/sway/config.d/*
|
||||||
|
|
|
@ -63,11 +63,31 @@ install(
|
||||||
DESTINATION bin
|
DESTINATION bin
|
||||||
COMPONENT runtime
|
COMPONENT runtime
|
||||||
)
|
)
|
||||||
install(
|
|
||||||
FILES ${PROJECT_SOURCE_DIR}/config
|
add_custom_target(configs ALL)
|
||||||
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sway/
|
|
||||||
COMPONENT configuration
|
function(add_config name source destination)
|
||||||
)
|
add_custom_command(
|
||||||
|
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
|
||||||
|
COMMAND sed -r
|
||||||
|
's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g'
|
||||||
|
${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
|
||||||
|
DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in
|
||||||
|
COMMENT "Generating config file ${source}"
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination}
|
||||||
|
COMPONENT configuration
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name})
|
||||||
|
add_dependencies(configs config-${name})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
add_config(config config sway)
|
||||||
|
add_config(security config.d/security sway/config.d)
|
||||||
|
|
||||||
add_manpage(sway 1)
|
add_manpage(sway 1)
|
||||||
add_manpage(sway 5)
|
add_manpage(sway 5)
|
||||||
|
|
|
@ -42,7 +42,7 @@ install(
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock
|
FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock
|
||||||
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/pam.d/
|
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d/
|
||||||
COMPONENT data
|
COMPONENT data
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue