--- /dev/null
+newslash (0.1.0) unstable; urgency=low
+
+ * Initial release.
+
+-- Hiromichi MATSUSHIMA <hirom@osdn.jp> Fri, 02 Dec 2016 20:21:08 +0900
--- /dev/null
+Source: newslash
+Section: web
+Priority: extra
+Maintainer: OSDN Corp. <admin@osdn.jp>
+Build-Depends: debhelper (>= 5), cdbs
+Standards-Version: 3.7.2
+Uploaders: Hiromichi MATSUSHIMA <hirom@osdn.jp>
+
+Package: newslash-core
+Architecture: any
+Depends:
+ libmojolicious-perl, libjs-bootstrap, libdbd-mysql, libdbi-perl, libdbd-mysql-perl, libtemplate-perl, node-less, libcrypt-openssl-random-perl, libemail-valid-perl, tinymce, libredis-perl, libhtml-tidy-perl, liburi-perl, libdate-calc-perl, libdatetime-perl, liburi-perl, libjson-perl, libcache-memcached-fast-perl, libdata-javascript-anon-perl, libwww-perl, ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
+Description: Newslash core files
+ Newsslash is 'news lashing discussion platform'. This package include core files to use Newslash.
+
+Package: newslash-sradjp-assets
+Architecture: any
+Depends:
+ newslash-core
+Description: Newslash asset files for srad.jp
+ Newsslash is 'news lashing discussion platform'. This package include assets for srad.jp like images, js, css, templates, etc.
+
+Package: newslash-sradjp
+Architecture: any
+Depends:
+ newslash-core, newslash-sradjp-assets
+Description: Newslash config files for srad.jp
+ Newsslash is 'news lashing discussion platform'. This package include configuration files for srad.jp.
+
--- /dev/null
+License: GPL2
+In Debian, see /usr/share/common-licenses/GPL2 for details
--- /dev/null
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+CORE=newslash-core
+ASSETS=newslash-sradjp-assets
+SRAD=newslash-sradjp
+
+SRCDIR=src/newslash_web
+CORE_DEST=$(CURDIR)/debian/$(CORE)/usr/share/newslash
+ASSETS_DEST=$(CURDIR)/debian/$(ASSETS)/usr/share/newslash
+SRAD_DEST=$(CURDIR)/debian/$(SRAD)/usr/share/newslash
+
+install/$(CORE)::
+ cd $(SRCDIR); \
+ find ./lib -name '*.pm' \
+ -exec install -pDm 644 {} $(CORE_DEST)/{} \;
+ cd $(SRCDIR); \
+ find ./external/perllib -name '*.pm' \
+ -exec install -pDm 644 {} $(CORE_DEST)/{} \;
+ install -pDm 755 $(SRCDIR)/script/newslash_web $(CORE_DEST)/script/newslash_web
+
+
+install/$(ASSETS)::
+ cd $(SRCDIR); \
+ find ./templates -name '*.tt2' \
+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
+ cd $(SRCDIR); \
+ find ./css ! -name '*~' ! -type l \
+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
+ ln -sf ../external/bootstrap-3.3.7/less $(ASSETS_DEST)/css/bootstrap
+ cd $(SRCDIR); \
+ find ./public/img ! -name '*~' ! -type l \
+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
+ cd $(SRCDIR); \
+ find ./public/jquery ! -name '*~' ! -type l \
+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
+ cd $(SRCDIR); \
+ find ./public/js ! -name '*~' ! -type l \
+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
+ cd $(SRCDIR); \
+ find ./public/vue ! -name '*~' ! -type l \
+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
+ cd $(SRCDIR); \
+ find ./external/bootstrap-3.3.7 ! -name '*~' ! -type l \
+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
+ ln -sf ../../external/escape-html.js/js/escape-html.js $(ASSETS_DEST)/public/js/escape-html.js
+ ln -sf ../external/bootstrap-3.3.7/dist $(ASSETS_DEST)/public/bootstrap
+ ln -sf ../external/bootstrap-3.3.7/fonts $(ASSETS_DEST)/public/fonts
+ install -pDm 644 $(SRCDIR)/external/escape-html.js/js/escape-html.js $(ASSETS_DEST)/external/escape-html.js/js/escape-html.js
+ mkdir $(ASSETS_DEST)/public/css
+
+install/$(SRAD)::
+ install -pDm 644 misc/newslash.service $(CURDIR)/debian/$(SRAD)/lib/systemd/system/newslash.service
+ install -pDm 644 $(SRCDIR)/newslash-web.production.json $(SRAD_DEST)/newslash-web.production.json
+
+# todo: restart systemd, add PIDFile dir
--- /dev/null
+[Unit]
+Description=Newslash slashing discussion system
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/newslash/newslash.pid
+ExecStart=/usr/bin/hypnotoad /usr/share/newslash/script/newslash_web -m production
+ExecReload=/usr/bin/hypnotoad /usr/share/newslash/script/newslash_web -m production
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target