add Debian packaging files

This commit is contained in:
Max Erenberg 2021-02-21 07:16:15 +00:00
parent c738bb44ea
commit d617a300ac
13 changed files with 160 additions and 0 deletions

11
.gitignore vendored
View File

@ -4,9 +4,20 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler vendor build.
/vendor/bundle
# Ignore bundler config.
/.bundle
# Ignore Debian auto-generated files.
/debian/debhelper-build-stamp
/debian/files
/debian/greenlight/**
/debian/*.log
/debian/*.debhelper
/debian/*.substvars
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

20
Makefile Normal file
View File

@ -0,0 +1,20 @@
prefix = /opt/greenlight
BUNDLE = $(HOME)/.gem/ruby/2.5.0/bin/bundle
all:
[ -x $(BUNDLE) ] || gem install --user-install bundler
$(BUNDLE) config --global frozen 1
cp -r ../bundle vendor/bundle
#$(BUNDLE) install --deployment --without development:test:assets -j4 --path=vendor/bundle
#rm -rf vendor/bundle/ruby/2.5.0/cache/*.gem
#find vendor/bundle/ruby/2.5.0/gems/ -name "*.c" -delete
#find vendor/bundle/ruby/2.5.0/gems/ -name "*.o" -delete
install:
cp -r app bin .bundle config config.ru db Gemfile Gemfile.lock greenlight.nginx \
lib log public Rakefile .rspec .rubocop.yml .ruby-version sample.env \
scripts spec vendor $(DESTDIR)$(prefix)/
clean:
rm -rf vendor/bundle

View File

@ -1,5 +1,18 @@
#!/bin/bash
RUBYBIN=$HOME/.gem/ruby/2.5.0/bin
NODEBIN=$PWD/node_modules/.bin
export PATH=$RUBYBIN:$NODEBIN:$PATH
export RAILS_ENV=production
export BUNDLE_APP_CONFIG=$PWD/.bundle
if ! command -v bundle >/dev/null; then
gem install --user-install bundler
fi
if ! command -v yarn >/dev/null; then
npm install yarn
fi
if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52'
do

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
greenlight (2.7.19-1) UNRELEASED; urgency=medium
* Initial release.
-- Max Erenberg <merenber@csclub.uwaterloo.ca> Sat, 20 Feb 2021 20:11:03 +0000

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

41
debian/control vendored Normal file
View File

@ -0,0 +1,41 @@
Source: greenlight
Maintainer: Max Erenberg <merenber@csclub.uwaterloo.ca>
Section: misc
Priority: optional
Standards-Version: 3.9.7
Build-Depends:
debhelper (>= 9),
build-essential (>= 12.1),
libcurl4-gnutls-dev,
ruby2.5,
ruby2.5-dev,
libpq-dev (>= 9.5),
libsqlite3-dev,
libyaml-dev (>= 0.1.6),
zlib1g-dev (>= 1:1.2),
zlib1g-dev (<< 1:1.3)
Package: greenlight
Architecture: amd64
Depends:
${shlibs:Depends},
${misc:Depends},
libcurl3-gnutls,
ruby2.5,
libpq5,
libsqlite3-0,
libyaml-0-2,
zlib1g (>= 1:1.2),
zlib1g (<< 1:1.3),
tzdata,
nodejs (>= 8),
nodejs (<< 9),
npm
Description: simple end-user interface for BigBlueButton
Greenlight is a simple front-end interface for your BigBlueButton server.
At its heart, Greenlight provides a minimalistic web-based application that allows users to:
* Signup/Login with Google, Office365, OpenID Connect, or through the application itself.
* Manage your account settings and user preferences.
* Create and manage your own personal rooms (BigBlueButton sessions).
* Invite others to your room using a simple URL.
* View recordings and share them with others.

24
debian/copyright vendored Normal file
View File

@ -0,0 +1,24 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: greenlight
Source: https://github.com/bigbluebutton/greenlight
Files: *
Copyright: 2021 BigBlueButton Inc.
License: LGPL-3+
License: LGPL-3+
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 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
Lesser 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 <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-3".

2
debian/greenlight.dirs vendored Normal file
View File

@ -0,0 +1,2 @@
opt
opt/greenlight

21
debian/greenlight.postinst vendored Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
set -e
# This script was adapted from
# https://salsa.debian.org/utopia-team/network-manager/-/blob/debian/master/debian/network-manager.postinst
# Make sure this script has the following permissions: 0755
case "$1" in
configure)
adduser --system --quiet --home /opt/greenlight --group --shell /bin/bash greenlight
chown -R greenlight:greenlight /opt/greenlight
;;
abort-upgrade|abort-deconfigure|abort-remove)
;;
*)
echo "$0 called with unknown argument \`$1'" 1>&2
exit 1
;;
esac

15
debian/greenlight.service vendored Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=Web interface for BigBlueButton
Requires=network.target
After=network.target
[Service]
Type=simple
User=greenlight
Group=greenlight
WorkingDirectory=/opt/greenlight
EnvironmentFile=/opt/greenlight/.env
ExecStart=/opt/greenlight/bin/start
[Install]
WantedBy=multi-user.target

3
debian/rules vendored Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/make -f
%:
dh $@

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -1,3 +1,6 @@
# Bind to this port
PORT=5000
# Create a Secret Key for Rails
#
# You can generate a secure one through the Greenlight docker image