diff options
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/control | 41 | ||||
-rw-r--r-- | debian/copyright | 48 | ||||
-rw-r--r-- | debian/local/apache2/uptime-kuma.conf | 13 | ||||
-rwxr-xr-x | debian/rules | 23 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/uptime-kuma-backend.install | 1 | ||||
-rwxr-xr-x | debian/uptime-kuma-backend.postinst | 33 | ||||
-rwxr-xr-x | debian/uptime-kuma-backend.postrm | 32 | ||||
-rw-r--r-- | debian/uptime-kuma-backend.service | 15 | ||||
-rw-r--r-- | debian/uptime-kuma-frontend.install | 1 | ||||
-rw-r--r-- | debian/watch | 3 |
12 files changed, 216 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..d93d8c5 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +uptime-kuma (2.0.0~beta.0+dfsg-1) sid; urgency=low + + * Initial upload to sid. + + -- Daniel Baumann <daniel@debian.org> Tue, 26 Nov 2024 11:34:34 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..fd36671 --- /dev/null +++ b/debian/control @@ -0,0 +1,41 @@ +Source: uptime-kuma +Section: web +Priority: optional +Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org> +Build-Depends: + debhelper-compat (= 13), + npm, +Rules-Requires-Root: no +Standards-Version: 4.7.0 +Homepage: https://uptime.kuma.pet + +Package: uptime-kuma +Section: web +Architecture: all +Depends: + uptime-kuma-backend, + uptime-kuma-frontend, + ${misc:Depends}, +Description: FIXME + FIXME. + +Package: uptime-kuma-backend +Section: web +Architecture: all +Depends: + nodejs, + ${misc:Depends}, +Recommends: + mariadb-server, +Description: FIXME + FIXME. + +Package: uptime-kuma-frontend +Section: web +Architecture: all +Depends: + ${misc:Depends}, +Recommends: + apache2, +Description: FIXME + FIXME. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..018baaa --- /dev/null +++ b/debian/copyright @@ -0,0 +1,48 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: uptime-kuma +Upstream-Contact: https://github.com/louislam/uptime-kuma/issues +Source: https://github.com/louislam/uptime-kuma/tags +Files-Excluded: + server/notification-providers/bark.js + +Files: * +Copyright: 2021-2024 LouisLam <louislam@users.noreply.github.com> +License: MIT + +Files: server/modules/apicache +Copyright: 2013 Kevin Whitley <krwhitley@gmail.com> +License: MIT +Comment: https://github.com/kwhitley/apicache + +Files: server/modules/axios-ntlm +Copyright: 2021 CatButtes <catbuttes@outlook.com> +License: MIT +Comment: https://github.com/Catbuttes/axios-ntlm + +Files: server/modules/dayjs +Copyright: 2018 iamkun <kunhello@outlook.com> +License: MIT +Comment: https://github.com/iamkun/dayjs + +Files: debian/* +Copyright: 2024 Daniel Baumann <daniel@debian.org> +License: MIT + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/debian/local/apache2/uptime-kuma.conf b/debian/local/apache2/uptime-kuma.conf new file mode 100644 index 0000000..f4cd384 --- /dev/null +++ b/debian/local/apache2/uptime-kuma.conf @@ -0,0 +1,13 @@ +<VirtualHost *:80> + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + ProxyPass / http://localhost:3001/ + RewriteEngine on + RewriteCond %{HTTP:Upgrade} websocket [NC] + RewriteCond %{HTTP:Connection} upgrade [NC] + RewriteRule ^/?(.*) "ws://localhost:3001/$1" [P,L] + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined +</VirtualHost> diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..dc3f22c --- /dev/null +++ b/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +VERSION := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | cut -d+ -f1) + +%: + dh ${@} + +override_dh_auto_build: + npm run build + +upstream: + git clone --recursive https://github.com/louislam/uptime-kuma uptime-kuma-$(VERSION)+dfsg + cd uptime-kuma-$(VERSION)+dfsg && git checkout -f $$(echo $(VERSION) | sed -e 's|~|-|g') + + # removing undistributable files + rm -f server/notification-providers/bark.js + + # downloading node_modules + cd uptime-kuma-$(VERSION)+dfsg && npm install --production + cd uptime-kuma-$(VERSION)+dfsg && npm install vite + + # removing git metadata + rm -rf uptime-kuma-$(VERSION)+dfsg/.git 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) diff --git a/debian/uptime-kuma-backend.install b/debian/uptime-kuma-backend.install new file mode 100644 index 0000000..277166f --- /dev/null +++ b/debian/uptime-kuma-backend.install @@ -0,0 +1 @@ +server/* /usr/share/uptime-kuma/backend diff --git a/debian/uptime-kuma-backend.postinst b/debian/uptime-kuma-backend.postinst new file mode 100755 index 0000000..95f787f --- /dev/null +++ b/debian/uptime-kuma-backend.postinst @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +case "${1}" in + configure) + # creating group + if ! getent group uptime > /dev/null 2>&1 + then + groupadd --system uptime + fi + + # creating user + if ! getent passwd uptime > /dev/null 2>&1 + then + useradd --system -g uptime --home-dir /var/lib/uptime --no-create-home uptime + mkdir -p /var/lib/uptime + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/uptime-kuma-backend.postrm b/debian/uptime-kuma-backend.postrm new file mode 100755 index 0000000..5c09f6e --- /dev/null +++ b/debian/uptime-kuma-backend.postrm @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +case "${1}" in + purge) + # removing user + if getent passwd uptime > /dev/null 2>&1 + then + userdel uptime || echo "Unable to remove uptime user" + fi + + # removing group + if getent group uptime > /dev/null 2>&1 + then + groupdel uptime || echo "Unable to remove uptime group" + fi + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/uptime-kuma-backend.service b/debian/uptime-kuma-backend.service new file mode 100644 index 0000000..5cbc187 --- /dev/null +++ b/debian/uptime-kuma-backend.service @@ -0,0 +1,15 @@ +[Unit] +Description=Uptime-Kuma - A free and open source uptime monitoring solution +Documentation=https://github.com/louislam/uptime-kuma +After=network.target + +[Service] +Type=simple +User=uptime +Group=uptime +WorkingDirectory=/usr/share/uptime-kuma/backend +ExecStart=/usr/bin/npm run start-server +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/debian/uptime-kuma-frontend.install b/debian/uptime-kuma-frontend.install new file mode 100644 index 0000000..3558934 --- /dev/null +++ b/debian/uptime-kuma-frontend.install @@ -0,0 +1 @@ +dist/* /usr/share/uptime-kuma/frontend diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..46331cc --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/uptime-kuma-$1\.tar\.gz/ \ +https://github.com/louislam/uptime-kuma/tags .*/v?(\d\S+)\.tar\.gz |