OSDN Git Service

debian: add newslash-utils package
authorhylom <hylom@users.sourceforge.jp>
Tue, 10 Oct 2017 09:22:49 +0000 (18:22 +0900)
committerhylom <hylom@users.sourceforge.jp>
Tue, 10 Oct 2017 09:22:49 +0000 (18:22 +0900)
debian/control
debian/rules

index 5463bec..7c5b359 100644 (file)
@@ -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:
index 84a1e39..6ec7148 100755 (executable)
@@ -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)/{} \;