diff options
author | Jakob Odersky <jakob@odersky.com> | 2017-02-09 22:19:01 -0800 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2017-02-09 22:19:01 -0800 |
commit | 05667e53765583fc40eb2f9eedf32511fd528f8a (patch) | |
tree | 5b9d38ec1655c22ccf38e81d6a11e034b6e8ca3a /debian | |
parent | 020a5f26d498aa4a1d2c892899e3802b3487700b (diff) | |
download | mavigator-05667e53765583fc40eb2f9eedf32511fd528f8a.tar.gz mavigator-05667e53765583fc40eb2f9eedf32511fd528f8a.tar.bz2 mavigator-05667e53765583fc40eb2f9eedf32511fd528f8a.zip |
Add debian packaging
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 20 | ||||
-rw-r--r-- | debian/copyright | 28 | ||||
-rw-r--r-- | debian/mavigator-bin.manpages | 1 | ||||
-rw-r--r-- | debian/mavigator.1 | 29 | ||||
-rw-r--r-- | debian/mavigator.postinst | 41 | ||||
-rw-r--r-- | debian/mavigator.service | 11 | ||||
-rwxr-xr-x | debian/rules | 43 | ||||
-rwxr-xr-x | debian/run | 3 | ||||
-rw-r--r-- | debian/source/format | 1 |
11 files changed, 183 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f78231e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +mavigator (0.0.1-3) unstable; urgency=medium + + * Initial release + + -- Jakob Odersky <jakob@odersky.com> Thu, 09 Feb 2017 16:21:34 -0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..34d1a30 --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: mavigator +Section: java +Priority: optional +Maintainer: Jakob Odersky <jakob@odersky.com> +Build-Depends: debhelper (>= 9), dh-systemd, openjdk-8-jdk-headless | jdk8, sbt +Standards-Version: 3.9.8 +Vcs-Git: https://github.com/project-condor/mavigator.git +Vcs-Browser: https://github.com/project-condor/mavigator.git + +Package: mavigator-bin +Architecture: all +Depends: ${misc:Depends}, openjdk-8-jre-headless | java8-runtime-headless +Description: Virtual cockpit for a UAV + View telemetry from a drone in a modern web interface. + +Package: mavigator +Architecture: all +Depends: ${misc:Depends}, mavigator-bin, adduser +Description: Virtual cockpit for a UAV (with systemd init scripts) + View telemetry from a drone in a modern web interface. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..065fa79 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,28 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: mavigator +Source: https://github.com/project-condor/mavigator + +Files: * +Copyright: 2017 Jakob Odersky <jakob@odersky.com> +License: GPL-3.0+ + +Files: debian/* +Copyright: 2017 Jakob Odersky <jakob@odersky.com> +License: GPL-3.0+ + +License: GPL-3.0+ + This program 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 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 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 <https://www.gnu.org/licenses/>. + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
\ No newline at end of file diff --git a/debian/mavigator-bin.manpages b/debian/mavigator-bin.manpages new file mode 100644 index 0000000..c18a6d1 --- /dev/null +++ b/debian/mavigator-bin.manpages @@ -0,0 +1 @@ +debian/mavigator.1
\ No newline at end of file diff --git a/debian/mavigator.1 b/debian/mavigator.1 new file mode 100644 index 0000000..1279cb0 --- /dev/null +++ b/debian/mavigator.1 @@ -0,0 +1,29 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2017 Jakob Odersky <jakob@odersky.com>, +.\" +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH mavigator 1 "February 9 2017" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp <n> insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +mavigator \- virtual cockpit for drones +.SH SYNOPSIS +.B mavigator +.SH DESCRIPTION +Start a webserver for visualizing telemetry data from drones speaking the MAVLink protocol. +.PP +.SH FILES +.B /etc/mavigator/application.conf +Configuration file. diff --git a/debian/mavigator.postinst b/debian/mavigator.postinst new file mode 100644 index 0000000..12708d9 --- /dev/null +++ b/debian/mavigator.postinst @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for mavigator +# +# 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 --disabled-password --disabled-login --home /var/empty \ + --no-create-home --quiet --force-badname --group mavigator + ;; + + 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/mavigator.service b/debian/mavigator.service new file mode 100644 index 0000000..e2c99b9 --- /dev/null +++ b/debian/mavigator.service @@ -0,0 +1,11 @@ +[Unit] +Description=mavigator daemon + +[Service] +ExecStart=/usr/bin/mavigator +Restart=on-failure +User=mavigator +Group=mavigator + +[Install] +WantedBy=multi-user.target
\ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8d27048 --- /dev/null +++ b/debian/rules @@ -0,0 +1,43 @@ +#!/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 + +override_dh_auto_build: + dh_auto_build + sbt mavigator-server/assembly + +override_dh_auto_install: + dh_auto_install + mkdir -p debian/mavigator-bin/usr/share/mavigator/lib + cp mavigator-server/target/scala-2.12/mavigator.jar debian/mavigator-bin/usr/share/mavigator/lib/ + + mkdir -p debian/mavigator-bin/etc/mavigator + cp mavigator-server/src/main/resources/reference.conf debian/mavigator-bin/etc/mavigator/application.conf + + mkdir -p debian/mavigator-bin/usr/bin + cp debian/run debian/mavigator-bin/usr/bin/mavigator + chmod 0755 debian/mavigator-bin/usr/bin/mavigator + +override_dh_installinit: + dh_systemd_enable -pmavigator --name=mavigator mavigator.service + dh_installinit -pmavigator --no-start --noscripts + +%: + dh $@ --with=systemd + +# 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/run b/debian/run new file mode 100755 index 0000000..b178bd9 --- /dev/null +++ b/debian/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec java -cp /usr/share/mavigator/lib/mavigator.jar:/etc/mavigator/application.conf mavigator.Main diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) |