mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-12-01 04:38:35 -05:00
The rc.d script and Apache config hard-coded the /usr/local paths the FreeBSD/OpenBSD distro target uses, so any build with other paths got files pointing at the wrong place. Make the rc.d script a template filled with CMAKE_INSTALL_FULL_BINDIR and PERL_EXECUTABLE, generated into misc/ when building on OpenBSD. Drop the OpenBSD Apache config: misc/apache.conf is already generated from the configured web, cgi and cache paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
3.3 KiB
CMake
44 lines
3.3 KiB
CMake
# CMakeLists.txt for the ZoneMinder misc files
|
|
|
|
# Create files from the .in files
|
|
configure_file(apache.conf.in "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" @ONLY)
|
|
configure_file(nginx.conf.in "${CMAKE_CURRENT_BINARY_DIR}/nginx.conf" @ONLY)
|
|
configure_file(logrotate.conf.in "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" @ONLY)
|
|
configure_file(syslog.conf.in "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" @ONLY)
|
|
configure_file(com.zoneminder.systemctl.policy.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" @ONLY)
|
|
configure_file(com.zoneminder.systemctl.rules.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" @ONLY)
|
|
configure_file(com.zoneminder.dnsmasq.policy.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.dnsmasq.policy" @ONLY)
|
|
configure_file(com.zoneminder.dnsmasq.rules.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.dnsmasq.rules" @ONLY)
|
|
configure_file(com.zoneminder.arp-scan.policy.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.arp-scan.policy" @ONLY)
|
|
configure_file(com.zoneminder.arp-scan.rules.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.arp-scan.rules" @ONLY)
|
|
configure_file(zoneminder.service.in "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.service" @ONLY)
|
|
if(APPLE)
|
|
# The launchd counterpart to the systemd unit. Generated but not installed,
|
|
# the same as the unit above: /Library/LaunchDaemons is loaded at boot, so
|
|
# putting a job there is the installer's decision, not the build's.
|
|
configure_file(com.zoneminder.zoneminder.plist.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.zoneminder.plist" @ONLY)
|
|
endif()
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
|
# rc.d script. Generated but not installed, like the systemd unit above.
|
|
# Serve the web interface with the apache.conf generated here.
|
|
configure_file("${CMAKE_SOURCE_DIR}/distros/openbsd/zm.in" "${CMAKE_CURRENT_BINARY_DIR}/zm" @ONLY)
|
|
endif()
|
|
configure_file(zoneminder-tmpfiles.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zoneminder-tmpfiles.conf" @ONLY)
|
|
configure_file(zoneminder.desktop.in "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.desktop" @ONLY)
|
|
configure_file(MacVendors.json "${CMAKE_CURRENT_BINARY_DIR}/MacVendors.json" @ONLY)
|
|
configure_file(zm-sudo.in "${CMAKE_CURRENT_BINARY_DIR}/zm-sudo" @ONLY)
|
|
|
|
# Do not install the misc files by default
|
|
#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/misc")
|
|
|
|
# Install Policykit rules and actions into the proper folders only on systems with systemd
|
|
if(WITH_SYSTEMD)
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions")
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d")
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.arp-scan.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions")
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.arp-scan.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d")
|
|
endif()
|
|
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.desktop" DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/MacVendors.json" DESTINATION "${PKGDATADIR}")
|