aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2018-10-27 18:45:06 -0700
committerJakob Odersky <jakob@odersky.com>2018-10-27 18:45:06 -0700
commitde095d377859887352c7380e52ea89bcabf662a0 (patch)
tree6cee6eb17c1977b85e01078e926499b33854047d /debian
downloadbyspel-de095d377859887352c7380e52ea89bcabf662a0.tar.gz
byspel-de095d377859887352c7380e52ea89bcabf662a0.tar.bz2
byspel-de095d377859887352c7380e52ea89bcabf662a0.zip
Initial commit
Diffstat (limited to 'debian')
-rw-r--r--debian/byspel.1.md31
-rw-r--r--debian/byspel.install3
-rw-r--r--debian/byspel.manpages1
-rw-r--r--debian/byspel.service12
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat1
-rw-r--r--debian/control15
-rw-r--r--debian/copyright36
-rw-r--r--debian/postinst42
-rwxr-xr-xdebian/rules36
-rw-r--r--debian/source/format1
11 files changed, 183 insertions, 0 deletions
diff --git a/debian/byspel.1.md b/debian/byspel.1.md
new file mode 100644
index 0000000..1be9f09
--- /dev/null
+++ b/debian/byspel.1.md
@@ -0,0 +1,31 @@
+---
+title: byspel
+section: 1
+date: October 2018
+footer: byspel 0.1
+---
+
+
+# NAME
+
+byspel - example webapp written in Scala
+
+# SYNOPSIS
+
+**byspel** CONFIG_FILE
+
+# DESCRIPTION
+
+**byspel** is a simple web application using Akka HTTP and Slick. It
+is designed to demonstrate packaging of Scala applications.
+
+# BUGS
+Report bugs to Jakob Odersky <jakob@odersky.com> or at the project's
+issue tracker <https://github.com/jodersky/byspel/issues>.
+
+# EXAMPLE
+
+```
+byspel /etc/byspel.toml
+
+```
diff --git a/debian/byspel.install b/debian/byspel.install
new file mode 100644
index 0000000..8dbd8e7
--- /dev/null
+++ b/debian/byspel.install
@@ -0,0 +1,3 @@
+misc/byspel.conf etc/nginx/sites-available/
+misc/5xx.html usr/share/byspel/www/error/
+misc/no.svg usr/share/byspel/www/error/ \ No newline at end of file
diff --git a/debian/byspel.manpages b/debian/byspel.manpages
new file mode 100644
index 0000000..aecd56c
--- /dev/null
+++ b/debian/byspel.manpages
@@ -0,0 +1 @@
+debian/byspel.1 \ No newline at end of file
diff --git a/debian/byspel.service b/debian/byspel.service
new file mode 100644
index 0000000..27177f0
--- /dev/null
+++ b/debian/byspel.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Example webapp built with Scala
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/byspel /etc/byspel.toml
+User=byspel
+Group=byspel
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..f809147
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+byspel (0.0.1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Jakob Odersky <jakob@odersky.com> Sat, 27 Oct 2018 15:26:32 -0700
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b4de394
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+11
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..9025234
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,15 @@
+Source: byspel
+Section: net
+Priority: optional
+Maintainer: Jakob Odersky <jakob@odersky.com>
+Build-Depends: debhelper (>= 11), pandoc, sbt
+Standards-Version: 4.1.3
+Homepage: https://github.com/jodersky/byspel
+
+Package: byspel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, openjdk-11-jdk-headless, libdbd-sqlite3-perl, sqitch, sqlite3
+Recommends: nginx
+Description: Example Scala application
+ This application demonstrates how Akka HTTP and Slick can be used to create
+ simple web applications, and how they can be packaged for debian. \ No newline at end of file
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..6fe8243
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,36 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: byspel
+Source: https://gitub.com/jodersky/byspel
+
+Files: *
+Copyright: 2018 Jakob Odersky <jakob@odersky.com>
+License: BSD-3-Clause
+
+Files: debian/*
+Copyright: 2018 Jakob Odersky <jakob@odersky.com>
+License: BSD-3-Clause
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..58b2e36
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postinst script for byspel
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ adduser --system --home /var/lib/byspel --group byspel
+ chown byspel:byspel /var/lib/byspel
+ deb-systemd-invoke restart byspel
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..e7b28a4
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+
+%:
+ dh $@ --with-systemd
+
+override_dh_auto_build:
+ pandoc --standalone debian/byspel.1.md -o debian/byspel.1
+ sbt fhsDist
+ dh_auto_build
+
+override_dh_auto_install:
+ mkdir debian/byspel
+ cp -r target/dist/* debian/byspel
+ dh_auto_install
+
+override_dh_auto_clean:
+ rm -rf target
+ dh_auto_clean
+
+override_dh_strip_nondeterminism:
+ true
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)