3 include /usr/share/cdbs/1/rules/debhelper.mk
6 ASSETS=newslash-sradjp-assets
9 EXPORTER=newslash-prometheus-exporter
10 SEARCHD=newslash-searchd
12 SRCDIR=src/newslash_web
15 CORE_DEST=$(CURDIR)/debian/$(CORE)/usr/share/newslash
16 CORE_ETC=$(CURDIR)/debian/$(CORE)/etc/newslash
17 EXPORTERDIR=src/prometheus-newslash-exporter
18 SEARCHD_DIR=src/ns_search
20 ASSETS_DEST=$(CURDIR)/debian/$(ASSETS)/usr/share/newslash
21 SRAD_DEST=$(CURDIR)/debian/$(SRAD)/usr/share/newslash
22 UTILS_DEST=$(CURDIR)/debian/$(UTILS)/usr/share/newslash-utils
23 EXPORTER_DEST=$(CURDIR)/debian/$(EXPORTER)/usr/share/newslash-prometheus-exporter
24 SEARCHD_DEST=$(CURDIR)/debian/$(SEARCHD)/usr/share/newslash-searchd
25 SEARCHD_ETC=$(CURDIR)/debian/$(SEARCHD)/etc/newslash
29 find ./lib -name '*.pm' \
30 -exec install -pDm 644 {} $(CORE_DEST)/{} \;
32 find ./external/perllib -name '*.pm' \
33 -exec install -pDm 644 {} $(CORE_DEST)/{} \;
34 install -pDm 755 $(SRCDIR)/script/newslash_web $(CORE_DEST)/script/newslash_web
35 install -pDm 755 $(SRCDIR)/script/newslash_eventd $(CORE_DEST)/script/newslash_eventd
36 install -pDm 755 $(SRCDIR)/script/newslash_feed_fetcher $(CORE_DEST)/script/newslash_feed_fetcher
37 mkdir -m 755 -p $(CORE_ETC)
38 install -pDm 644 $(CONFDIR)/newslash.conf.example $(CORE_ETC)/newslash.conf.example
43 find ./templates -name '*.tt2' \
44 -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
46 find ./css ! -name '*~' ! -type l \
47 -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
48 ln -sf ../external/bootstrap-3.3.7/less $(ASSETS_DEST)/css/bootstrap
50 find ./public/img ! -name '*~' ! -type l \
51 -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
53 find ./public/jquery ! -name '*~' ! -type l \
54 -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
56 find ./public/js ! -name '*~' ! -type l \
57 -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
59 find ./public/vue ! -name '*~' ! -type l \
60 -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
62 find ./external/bootstrap-3.3.7 ! -name '*~' ! -type l \
63 -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
64 ln -sf ../../external/escape-html.js/js/escape-html.js $(ASSETS_DEST)/public/js/escape-html.js
65 ln -sf ../external/bootstrap-3.3.7/dist $(ASSETS_DEST)/public/bootstrap
66 ln -sf ../external/bootstrap-3.3.7/fonts $(ASSETS_DEST)/public/fonts
67 install -pDm 644 $(SRCDIR)/external/escape-html.js/js/escape-html.js $(ASSETS_DEST)/external/escape-html.js/js/escape-html.js
68 install -pDm 644 $(SRCDIR)/public/robots.txt $(ASSETS_DEST)/public/robots.txt
69 install -pDm 644 $(SRCDIR)/public/favicon.ico $(ASSETS_DEST)/public/
70 mkdir $(ASSETS_DEST)/public/css
73 install -pDm 644 misc/newslash.service $(CURDIR)/debian/$(SRAD)/lib/systemd/system/newslash.service
74 install -pDm 644 misc/newslash-eventd.service $(CURDIR)/debian/$(SRAD)/lib/systemd/system/newslash-eventd.service
75 # install -pDm 644 $(SRCDIR)/newslash-web.production.json $(SRAD_DEST)/newslash-web.production.json
77 # todo: restart systemd, add PIDFile dir
80 mkdir -p -m 755 $(UTILS_DEST)/tools
81 mkdir -p -m 755 $(UTILS_DEST)/migration_scripts
83 find ./migration_scripts -name '*.pl' \
84 -exec install -pDm 644 {} $(UTILS_DEST)/{} \;
86 find ./migration_scripts -name '*.txt' \
87 -exec install -pDm 644 {} $(UTILS_DEST)/{} \;
89 find ./migration_scripts -name '*.json' \
90 -exec install -pDm 644 {} $(UTILS_DEST)/{} \;
92 find ./tools -name '*.pl' \
93 -exec install -pDm 644 {} $(UTILS_DEST)/{} \;
96 install -pDm 755 $(EXPORTERDIR)/newslash-exporter.py $(EXPORTER_DEST)/newslash-exporter.py
97 install -pDm 644 $(EXPORTERDIR)/newslash-prometheus-exporter.service \
98 $(CURDIR)/debian/$(EXPORTER)/lib/systemd/system/newslash-prometheus-exporter.service
101 mkdir -p -m 755 $(SEARCHD_DEST)/modules
102 mkdir -p -m 755 $(SEARCHD_ETC)
103 cd $(SEARCHD_DIR); for target in newslash_db newslash_searchd newslash_index lucene_wrapper; do \
104 mkdir -p $(SEARCHD_DEST)/modules/$$target ; \
105 find $$target -name '*.py' -exec install -pDm 644 {} $(SEARCHD_DEST)/modules/{} \; ; \
107 install -pDm 755 $(SEARCHD_DIR)/searchd.py $(SEARCHD_DEST)/modules/
108 install -pDm 755 $(SEARCHD_DIR)/searchd_cli.py $(SEARCHD_DEST)/modules/
109 install -pDm 644 $(SEARCHD_DIR)/searchd.conf.example $(SEARCHD_ETC)/
110 install -pDm 644 misc/newslash-searchd.service $(CURDIR)/debian/$(SEARCHD)/lib/systemd/system/newslash-searchd.service