From f43038dabfb0b67057857f7eadee0731a7bf8109 Mon Sep 17 00:00:00 2001 From: hylom Date: Tue, 10 Oct 2017 18:22:49 +0900 Subject: [PATCH] debian: add newslash-utils package --- debian/control | 7 +++++++ debian/rules | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/debian/control b/debian/control index 5463becd..7c5b3598 100644 --- a/debian/control +++ b/debian/control @@ -13,6 +13,13 @@ Depends: Description: Newslash core files Newsslash is 'news lashing discussion platform'. This package include core files to use Newslash. +Package: newslash-utils +Architecture: any +Depends: + newslash-core +Description: Newslash related utility scripts + Newsslash is 'news lashing discussion platform'. This package include some utility scripts for Newslash. + Package: newslash-sradjp-assets Architecture: any Depends: diff --git a/debian/rules b/debian/rules index 84a1e399..6ec7148d 100755 --- a/debian/rules +++ b/debian/rules @@ -5,13 +5,16 @@ include /usr/share/cdbs/1/rules/debhelper.mk CORE=newslash-core ASSETS=newslash-sradjp-assets SRAD=newslash-sradjp +UTILS=newslash-utils SRCDIR=src/newslash_web +UTILSDIR=utils CONFDIR=src/configs CORE_DEST=$(CURDIR)/debian/$(CORE)/usr/share/newslash CORE_ETC=$(CURDIR)/debian/$(CORE)/etc/newslash 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 install/$(CORE):: cd $(SRCDIR); \ @@ -63,3 +66,19 @@ install/$(SRAD):: # install -pDm 644 $(SRCDIR)/newslash-web.production.json $(SRAD_DEST)/newslash-web.production.json # todo: restart systemd, add PIDFile dir + +install/$(UTILS):: + mkdir -p -m 755 $(UTILS_DEST)/tools + mkdir -p -m 755 $(UTILS_DEST)/migration_scripts + cd $(UTILSDIR); \ + find ./migration_scripts -name '*.pl' \ + -exec install -pDm 644 {} $(UTILS_DEST)/{} \; + cd $(UTILSDIR); \ + find ./migration_scripts -name '*.txt' \ + -exec install -pDm 644 {} $(UTILS_DEST)/{} \; + cd $(UTILSDIR); \ + find ./migration_scripts -name '*.json' \ + -exec install -pDm 644 {} $(UTILS_DEST)/{} \; + cd $(UTILSDIR); \ + find ./tools -name '*.pl' \ + -exec install -pDm 644 {} $(UTILS_DEST)/{} \; -- 2.11.0