diff --git a/CMakeLists.txt b/CMakeLists.txt index 27582dd..64f2d59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,7 @@ if(BUILD_TESTS) target_link_libraries(laminar-tests ${GTEST_BOTH_LIBRARIES} gmock capnp-rpc capnp kj-async kj pthread boost_filesystem boost_system sqlite3 z) endif() +set(SYSTEMD_UNITDIR /lib/systemd/system CACHE PATH "Path to systemd unit files") install(TARGETS laminard laminarc RUNTIME DESTINATION usr/bin) -install(FILES laminar.service DESTINATION lib/systemd/system) +install(FILES laminar.service DESTINATION ${SYSTEMD_UNITDIR}) install(FILES laminar.conf DESTINATION etc) diff --git a/docker-build-centos.sh b/docker-build-centos.sh index cc59415..e782a51 100755 --- a/docker-build-centos.sh +++ b/docker-build-centos.sh @@ -56,7 +56,7 @@ Lightweight Continuous Integration Service %prep %build -cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ %{_sourcedir}/laminar-$VERSION +cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DSYSTEMD_UNITDIR=%{_unitdir} %{_sourcedir}/laminar-$VERSION pwd make