diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 00000000..74c36c86 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,2 @@ +*~ +\#*\# diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000..9a471a1d --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,10 @@ +workadventure for Debian +----------------------- + +To install: + - Install workadventure-back workadventure-front workadventure-pusher + - Go to "/var/lib/workadvenure/{back,pusher}" and run "yarn install --production" + - Serve "/usr/src/workadventure/front" as web page + - Provide configuration for the UI in "/usr/src/workadventure/front/config.js" + + -- unknown Sat, 17 Apr 2021 14:06:51 +0200 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..cc7a7b2c --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +workadventure (1.2.4-1) unstable; urgency=medium + + * Initial release + + -- unknown Sat, 17 Apr 2021 14:06:51 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..e32a2014 --- /dev/null +++ b/debian/control @@ -0,0 +1,32 @@ +Source: workadventure +Section: unknown +Priority: optional +Maintainer: unknown +Build-Depends: debhelper-compat (= 12), yarnpkg +Standards-Version: 4.5.1 +Homepage: +Rules-Requires-Root: no + +Package: workadventure-back +Architecture: all +Depends: ${misc:Depends}, yarnpkg +Description: + + +Package: workadventure-pusher +Architecture: all +Depends: ${misc:Depends}, yarnpkg +Description: + + +Package: workadventure-front +Architecture: all +Depends: ${misc:Depends} +Description: + + +Package: workadventure-front-map +Architecture: all +Depends: ${misc:Depends}, workadventure-front +Description: + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..62f28e63 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,32 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: workadventure +Upstream-Contact: +Source: + +Files: * +Copyright: 2021 TheCodingMachine +License: AGPL-3 with Commons Clause + + + . + + +Files: debian/* +Copyright: 2021 unknown +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..7099b5eb --- /dev/null +++ b/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_install: + install -Dt debian/workadventure-front/usr/src/workadventure/front front/dist/index.html + install -d debian/workadventure-front/usr/src/workadventure/front/js + cp -r front/dist/static front/dist/resources front/dist/*.js front/dist/style*.css debian/workadventure-front/usr/src/workadventure/front + cp -r front/dist/js/*.js debian/workadventure-front/usr/src/workadventure/front/js + + + install -d debian/workadventure-front-map/usr/src/workadventure/front/js + cp -r front/dist/*.js.map front/dist/style*.css.map debian/workadventure-front-map/usr/src/workadventure/front + cp -r front/dist/js/*.js.map debian/workadventure-front-map/usr/src/workadventure/front/js + + install -d debian/workadventure-back/usr/src/workadventure/back + cp -r back/dist/server.js back/dist/src debian/workadventure-back/usr/src/workadventure/back + cp back/yarn.lock back/package.json debian/workadventure-back/usr/src/workadventure/back + install -d debian/workadventure-back/var/lib/workadventure/back + ln -s /usr/src/workadventure/back/package.json /usr/src/workadventure/back/yarn.lock /usr/src/workadventure/back/src /usr/src/workadventure/back/server.js debian/workadventure-back/var/lib/workadventure/back/ + + install -d debian/workadventure-pusher/usr/src/workadventure/pusher + cp -r pusher/dist/server.js pusher/dist/src debian/workadventure-pusher/usr/src/workadventure/pusher + cp pusher/yarn.lock pusher/package.json debian/workadventure-pusher/usr/src/workadventure/pusher + install -d debian/workadventure-back/var/lib/workadventure/pusher + ln -s /usr/src/workadventure/pusher/package.json /usr/src/workadventure/pusher/yarn.lock /usr/src/workadventure/pusher/src /usr/src/workadventure/pusher/server.js debian/workadventure-back/var/lib/workadventure/pusher/ + + +front/src/Messages/generated: + ln -s ../../../messages/generated front/src/Messages + +back/src/Messages/generated: + ln -s ../../../messages/generated back/src/Messages + +pusher/src/Messages/generated: + ln -s ../../../messages/generated pusher/src/Messages + +override_dh_auto_build: front/src/Messages/generated back/src/Messages/generated pusher/src/Messages/generated + cd messages && yarnpkg install && yarnpkg run proto + rm -Rf front/dist/js + cd front && ./templater.sh && yarnpkg install && yarnpkg run build + cd back && yarnpkg install && yarnpkg run tsc + cd pusher && yarnpkg install && yarnpkg run tsc + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- \ +# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/workadventure-back.service b/debian/workadventure-back.service new file mode 100644 index 00000000..b5c2d1f3 --- /dev/null +++ b/debian/workadventure-back.service @@ -0,0 +1,11 @@ +[Unit] +Description="Workadventure Backend" + +[Service] +User=webspace-user +WorkingDirectory=/var/lib/workadventure/back +Environment=NODE_PATH=node_modules +ExecStart=node --max-old-space-size=4096 server.js + +[Install] +WantedBy=multi-user.target diff --git a/debian/workadventure-docs.docs b/debian/workadventure-docs.docs new file mode 100644 index 00000000..73190411 --- /dev/null +++ b/debian/workadventure-docs.docs @@ -0,0 +1,2 @@ +README.source +README.Debian diff --git a/debian/workadventure-pusher.service b/debian/workadventure-pusher.service new file mode 100644 index 00000000..ebe3ce5f --- /dev/null +++ b/debian/workadventure-pusher.service @@ -0,0 +1,15 @@ +[Unit] +Description="Workadventure Pusher" + +[Service] +User=webspace-user +WorkingDirectory=/var/lib/workadventure/pusher +Environment=NODE_PATH=node_modules +Environment=PUSHER_HTTP_PORT=8081 +Environment=API_URL=localhost:50051 +ExecStart=node --max-old-space-size=4096 server.js +ProtectSystem=Full +ProtectHome=true + +[Install] +WantedBy=multi-user.target