From e2db63b071feb7ba252dd6815e6298dd363c8d88 Mon Sep 17 00:00:00 2001 From: hylom Date: Fri, 2 Mar 2018 20:40:14 +0900 Subject: [PATCH] debian: add newslash-searchd package --- debian/control | 6 ++++++ debian/rules | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/debian/control b/debian/control index 0797444d..d5967c1b 100644 --- a/debian/control +++ b/debian/control @@ -41,3 +41,9 @@ Depends: Description: Newslash's statics exporter for prometheus Newsslash is 'news lashing discussion platform'. This package include configuration files for srad.jp. +Package: newslash-searchd +Architecture: any +Depends: + python, gunicorn, python-lucene, python-mysql.connector +Description: Newslash's search daemon + Newsslash is 'news lashing discussion platform'. This package include configuration files for srad.jp. diff --git a/debian/rules b/debian/rules index e7ab2336..29453f2a 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,7 @@ ASSETS=newslash-sradjp-assets SRAD=newslash-sradjp UTILS=newslash-utils EXPORTER=newslash-prometheus-exporter +SEARCHD=newslash-searchd SRCDIR=src/newslash_web UTILSDIR=src/utils @@ -14,11 +15,14 @@ CONFDIR=src/configs CORE_DEST=$(CURDIR)/debian/$(CORE)/usr/share/newslash CORE_ETC=$(CURDIR)/debian/$(CORE)/etc/newslash EXPORTERDIR=src/prometheus-newslash-exporter +SEARCHD_DIR=src/ns_search ASSETS_DEST=$(CURDIR)/debian/$(ASSETS)/usr/share/newslash SRAD_DEST=$(CURDIR)/debian/$(SRAD)/usr/share/newslash UTILS_DEST=$(CURDIR)/debian/$(UTILS)/usr/share/newslash-utils EXPORTER_DEST=$(CURDIR)/debian/$(EXPORTER)/usr/share/newslash-prometheus-exporter +SEARCHD_DEST=$(CURDIR)/debian/$(SEARCHD)/usr/share/newslash-searchd +SEARCHD_ETC=$(CURDIR)/debian/$(SEARCHD)/etc/newslash install/$(CORE):: cd $(SRCDIR); \ @@ -92,3 +96,16 @@ install/$(EXPORTER):: install -pDm 755 $(EXPORTERDIR)/newslash-exporter.py $(EXPORTER_DEST)/newslash-exporter.py install -pDm 644 $(EXPORTERDIR)/newslash-prometheus-exporter.service \ $(CURDIR)/debian/$(EXPORTER)/lib/systemd/system/newslash-prometheus-exporter.service + +install/$(SEARCHD):: + mkdir -p -m 755 $(SEARCHD_DEST)/modules + mkdir -p -m 755 $(SEARCHD_ETC) + cd $(SEARCHD_DIR); for target in newslash_db newslash_searchd newslash_index lucene_wrapper; do \ + mkdir -p $(SEARCHD_DEST)/modules/$$target ; \ + find $$target -name '*.py' -exec install -pDm 644 {} $(SEARCHD_DEST)/modules/{} \; ; \ + done + install -pDm 755 $(SEARCHD_DIR)/searchd.py $(SEARCHD_DEST)/modules/ + install -pDm 755 $(SEARCHD_DIR)/searchd_cli.py $(SEARCHD_DEST)/modules/ + install -pDm 644 $(SEARCHD_DIR)/searchd.conf.example $(SEARCHD_ETC)/ + + -- 2.11.0