File: cmake-install-config-manpages-etc.patch

package info (click to toggle)
sphinxsearch 2.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 23,028 kB
  • sloc: cpp: 129,264; xml: 78,187; ansic: 9,422; sh: 8,843; php: 3,710; yacc: 2,300; java: 1,334; ruby: 1,287; python: 1,253; pascal: 1,111; lex: 291; makefile: 186; perl: 150; sql: 77; cs: 38
file content (57 lines) | stat: -rw-r--r-- 2,440 bytes parent folder | download
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/"