Files
gentoo/net-proxy/3proxy/files/3proxy-0.9.7-install_systemd_unit.patch
Nicolas PARLANT 8ee4a20a4c net-proxy/3proxy: add 0.9.7
switch to cmake to simplify the build and fix automagic
fix owner in systemd unit

Closes: https://bugs.gentoo.org/979048
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1377
Signed-off-by: Sam James <sam@gentoo.org>
2026-07-14 05:40:01 +01:00

52 lines
1.9 KiB
Diff

Configure the systemd unit anyway, it will then be installed by systemd_dounit
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -728,47 +728,12 @@ if(NOT WIN32)
message(STATUS " rc.d: YES (${RCD_DIR})")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- # Linux - check for systemd
- find_package(PkgConfig QUIET)
- if(PkgConfig_FOUND)
- pkg_check_modules(SYSTEMD QUIET systemd)
- endif()
-
- if(SYSTEMD_FOUND)
- # systemd is available - install systemd service
- # Get systemd unit directory
- pkg_get_variable(SYSTEMD_UNIT_DIR systemd systemdsystemunitdir)
- if(NOT SYSTEMD_UNIT_DIR)
- # Fallback to common location
- set(SYSTEMD_UNIT_DIR "/lib/systemd/system")
- endif()
-
# Configure and install systemd service file
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/scripts/3proxy.service.in
${CMAKE_CURRENT_BINARY_DIR}/3proxy.service
@ONLY
)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.service
- DESTINATION ${SYSTEMD_UNIT_DIR}
- )
-
- message(STATUS " systemd: YES (${SYSTEMD_UNIT_DIR})")
- else()
- # No systemd - install init.d script
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/scripts/init.d/3proxy.in
- ${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
- @ONLY
- )
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
- DESTINATION /etc/init.d
- RENAME 3proxy
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
- )
-
- message(STATUS " systemd: NO (using init.d)")
- endif()
else()
# Other Unix - install init.d script
configure_file(