• R/O
  • HTTP
  • SSH
  • HTTPS

newslash: Commit

newslash


Commit MetaInfo

Revisiónd349fcb54caf03774b6e5d038058c7f72a9d3e16 (tree)
Tiempo2016-12-02 22:15:42
Autorhylom <hylom@user...>
Commiterhylom

Log Message

debian: add packaging scripts

Cambiar Resumen

Diferencia incremental

--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
1+newslash (0.1.0) unstable; urgency=low
2+
3+ * Initial release.
4+
5+-- Hiromichi MATSUSHIMA <hirom@osdn.jp> Fri, 02 Dec 2016 20:21:08 +0900
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
1+5
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
1+Source: newslash
2+Section: web
3+Priority: extra
4+Maintainer: OSDN Corp. <admin@osdn.jp>
5+Build-Depends: debhelper (>= 5), cdbs
6+Standards-Version: 3.7.2
7+Uploaders: Hiromichi MATSUSHIMA <hirom@osdn.jp>
8+
9+Package: newslash-core
10+Architecture: any
11+Depends:
12+ 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}
13+Description: Newslash core files
14+ Newsslash is 'news lashing discussion platform'. This package include core files to use Newslash.
15+
16+Package: newslash-sradjp-assets
17+Architecture: any
18+Depends:
19+ newslash-core
20+Description: Newslash asset files for srad.jp
21+ Newsslash is 'news lashing discussion platform'. This package include assets for srad.jp like images, js, css, templates, etc.
22+
23+Package: newslash-sradjp
24+Architecture: any
25+Depends:
26+ newslash-core, newslash-sradjp-assets
27+Description: Newslash config files for srad.jp
28+ Newsslash is 'news lashing discussion platform'. This package include configuration files for srad.jp.
29+
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,2 @@
1+License: GPL2
2+In Debian, see /usr/share/common-licenses/GPL2 for details
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,57 @@
1+#!/usr/bin/make -f
2+
3+include /usr/share/cdbs/1/rules/debhelper.mk
4+
5+CORE=newslash-core
6+ASSETS=newslash-sradjp-assets
7+SRAD=newslash-sradjp
8+
9+SRCDIR=src/newslash_web
10+CORE_DEST=$(CURDIR)/debian/$(CORE)/usr/share/newslash
11+ASSETS_DEST=$(CURDIR)/debian/$(ASSETS)/usr/share/newslash
12+SRAD_DEST=$(CURDIR)/debian/$(SRAD)/usr/share/newslash
13+
14+install/$(CORE)::
15+ cd $(SRCDIR); \
16+ find ./lib -name '*.pm' \
17+ -exec install -pDm 644 {} $(CORE_DEST)/{} \;
18+ cd $(SRCDIR); \
19+ find ./external/perllib -name '*.pm' \
20+ -exec install -pDm 644 {} $(CORE_DEST)/{} \;
21+ install -pDm 755 $(SRCDIR)/script/newslash_web $(CORE_DEST)/script/newslash_web
22+
23+
24+install/$(ASSETS)::
25+ cd $(SRCDIR); \
26+ find ./templates -name '*.tt2' \
27+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
28+ cd $(SRCDIR); \
29+ find ./css ! -name '*~' ! -type l \
30+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
31+ ln -sf ../external/bootstrap-3.3.7/less $(ASSETS_DEST)/css/bootstrap
32+ cd $(SRCDIR); \
33+ find ./public/img ! -name '*~' ! -type l \
34+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
35+ cd $(SRCDIR); \
36+ find ./public/jquery ! -name '*~' ! -type l \
37+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
38+ cd $(SRCDIR); \
39+ find ./public/js ! -name '*~' ! -type l \
40+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
41+ cd $(SRCDIR); \
42+ find ./public/vue ! -name '*~' ! -type l \
43+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
44+ cd $(SRCDIR); \
45+ find ./external/bootstrap-3.3.7 ! -name '*~' ! -type l \
46+ -exec install -pDm 644 {} $(ASSETS_DEST)/{} \;
47+ ln -sf ../../external/escape-html.js/js/escape-html.js $(ASSETS_DEST)/public/js/escape-html.js
48+ ln -sf ../external/bootstrap-3.3.7/dist $(ASSETS_DEST)/public/bootstrap
49+ ln -sf ../external/bootstrap-3.3.7/fonts $(ASSETS_DEST)/public/fonts
50+ install -pDm 644 $(SRCDIR)/external/escape-html.js/js/escape-html.js $(ASSETS_DEST)/external/escape-html.js/js/escape-html.js
51+ mkdir $(ASSETS_DEST)/public/css
52+
53+install/$(SRAD)::
54+ install -pDm 644 misc/newslash.service $(CURDIR)/debian/$(SRAD)/lib/systemd/system/newslash.service
55+ install -pDm 644 $(SRCDIR)/newslash-web.production.json $(SRAD_DEST)/newslash-web.production.json
56+
57+# todo: restart systemd, add PIDFile dir
--- /dev/null
+++ b/misc/newslash.service
@@ -0,0 +1,13 @@
1+[Unit]
2+Description=Newslash slashing discussion system
3+After=network.target
4+
5+[Service]
6+Type=forking
7+PIDFile=/var/run/newslash/newslash.pid
8+ExecStart=/usr/bin/hypnotoad /usr/share/newslash/script/newslash_web -m production
9+ExecReload=/usr/bin/hypnotoad /usr/share/newslash/script/newslash_web -m production
10+KillMode=process
11+
12+[Install]
13+WantedBy=multi-user.target
Show on old repository browser