1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
From: Andrej Shadura <andrew.shadura@collabora.co.uk>
Date: Fri, 3 Dec 2021 20:59:14 +0100
Subject: Make cmake install config, manpages etc
---
CMakeLists.txt | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b218854..f42ce6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -483,7 +483,7 @@ endif ()
SET ( LIBDIR ${CMAKE_INSTALL_LIBDIR} )
SET ( LOCALSTATEDIR ${CMAKE_INSTALL_FULL_LOCALSTATEDIR} )
-SET ( DATADIR "${LOCALSTATEDIR}/data" )
+SET ( DATADIR "${LOCALSTATEDIR}/lib/manticore" )
SET ( SHAREDIR "${CMAKE_INSTALL_DATADIR}" )
if (WIN32)
# on win name of product is already in full path
@@ -597,6 +597,35 @@ if ( WIN32 )
install ( DIRECTORY DESTINATION data COMPONENT config )
endif ()
+###
+# block below used to patch the minconf and full conf for debian
+file ( READ "sphinx-min.conf.in" _MINCONF )
+file ( READ "sphinx.conf.in" _FULLCONF )
+string ( REPLACE "@CONFDIR@/log/searchd.pid" "@RUNDIR@/searchd.pid" _MINCONF "${_MINCONF}" )
+string ( REPLACE "@CONFDIR@/log/searchd.pid" "@RUNDIR@/searchd.pid" _FULLCONF "${_FULLCONF}" )
+string ( REPLACE "@CONFDIR@/log" "@LOGDIR@" _FULLCONF "${_FULLCONF}" )
+string ( REPLACE "@CONFDIR@/log" "@LOGDIR@" _FULLCONF "${_FULLCONF}" )
+file ( WRITE "${MANTICORE_BINARY_DIR}/sphinx-min.conf.in" "${_MINCONF}" )
+file ( WRITE "${MANTICORE_BINARY_DIR}/sphinx.conf.in" "${_FULLCONF}" )
+unset ( _MINCONF )
+unset ( _FULLCONF )
+
+set ( CONFDIR "${LOCALSTATEDIR}/lib/manticore" )
+set ( RUNDIR "${LOCALSTATEDIR}/run/manticore" )
+set ( LOGDIR "${LOCALSTATEDIR}/log/manticore" )
+configure_file ( "${MANTICORE_BINARY_DIR}/sphinx-min.conf.in" "${MANTICORE_BINARY_DIR}/sphinx-min.conf.dist" @ONLY )
+configure_file ( "${MANTICORE_BINARY_DIR}/sphinx.conf.in" "${MANTICORE_BINARY_DIR}/sphinx.conf.dist" @ONLY )
+
+# Copy a default configuration file
+INSTALL ( FILES ${MANTICORE_BINARY_DIR}/sphinx.conf.dist
+ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sphinxsearch COMPONENT doc RENAME sphinx.conf )
+
+install ( FILES doc/indexer.1 doc/indextool.1 doc/searchd.1 doc/spelldump.1 doc/wordbreaker.1
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT doc )
+
+install ( DIRECTORY misc/stopwords DESTINATION ${CMAKE_INSTALL_DATADIR}/${PACKAGE_NAME} COMPONENT doc)
+###
+
configure_file ( "COPYING" "${MANTICORE_BINARY_DIR}/COPYING.txt" COPYONLY )
set ( CPACK_SOURCE_IGNORE_FILES "/\\\\.idea/" "/\\\\.git/"
|