From 016af15d5cc0e3c3e1accb2a9873a0811e1850e2 Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Mon, 4 Sep 2023 16:36:49 -0500 Subject: [PATCH 1/2] Generate files from the rc directory and install the trafficserver script --- CMakeLists.txt | 1 + rc/CMakeLists.txt | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 rc/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 97ff35f0225..c181dc0c9d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -424,6 +424,7 @@ endif() if(ENABLE_DOCS) add_subdirectory(doc) endif() +add_subdirectory(rc) if(ENABLE_BENCHMARKS) message(STATUS "Building benchmarks in tools/benchmark") diff --git a/rc/CMakeLists.txt b/rc/CMakeLists.txt new file mode 100644 index 00000000000..651739e0cfe --- /dev/null +++ b/rc/CMakeLists.txt @@ -0,0 +1,26 @@ +####################### +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor license +# agreements. See the NOTICE file distributed with this work for additional information regarding +# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# +####################### + + +configure_file(trafficserver.in trafficserver @ONLY) +configure_file(trafficserver.conf.in trafficserver.conf @ONLY) +configure_file(trafficserver.service.in trafficserver.service @ONLY) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/trafficserver + TYPE BIN + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) From 62d3b49a79b7589e7303062b6ea401868fb43a94 Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Tue, 5 Sep 2023 14:01:35 -0500 Subject: [PATCH 2/2] setup variable for substitution in rc/ files --- rc/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rc/CMakeLists.txt b/rc/CMakeLists.txt index 651739e0cfe..fc278dbb8c2 100644 --- a/rc/CMakeLists.txt +++ b/rc/CMakeLists.txt @@ -15,6 +15,17 @@ # ####################### +set(PACKAGE_NAME "trafficserver") +set(PACKAGE_VERSION ${TS_VERSION_STRING}) +set(PACKAGE_BUGREPORT "dev@trafficserver.apache.org") + +# TODO: Use layouts +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exp_bindir ${CMAKE_INSTALL_PREFIX}/bin) +set(exp_runtimedir ${CMAKE_INSTALL_PREFIX}/var) +set(exp_logdir ${CMAKE_INSTALL_PREFIX}/log) +set(pkgsysuser ${TS_PKGSYSUSER}) +set(pkgsysgroupe ${TS_PKGSYSGROUP}) configure_file(trafficserver.in trafficserver @ONLY) configure_file(trafficserver.conf.in trafficserver.conf @ONLY)