diff options
author | ml | 2020-01-30 17:44:34 +0100 |
---|---|---|
committer | ml | 2020-01-30 17:44:34 +0100 |
commit | ca4fbbd0f4ec3de1b92f8e49b47b2b9206a30e03 (patch) | |
tree | cbc4256381ecaaa079d85707feeea55904367de9 | |
parent | 6a62b2bcef9cc74b876edd2f0accda0915b9baa4 (diff) | |
download | aur-ca4fbbd0f4ec3de1b92f8e49b47b2b9206a30e03.tar.gz |
upgpkg: gotify-server 2.0.13-2
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | config.yml | 41 | ||||
-rw-r--r-- | gotify-server.service | 12 | ||||
-rw-r--r-- | sysusers.d | 2 | ||||
-rw-r--r-- | tmpfiles.d | 1 |
6 files changed, 85 insertions, 6 deletions
@@ -1,14 +1,22 @@ pkgbase = gotify-server pkgdesc = A simple server for sending and receiving messages in real-time per WebSocket. pkgver = 2.0.13 - pkgrel = 1 + pkgrel = 2 url = https://gotify.net/ arch = x86_64 license = MIT makedepends = git makedepends = go source = gotify-server-2.0.13.tar.gz::https://github.com/gotify/server/archive/v2.0.13.tar.gz + source = sysusers.d + source = tmpfiles.d + source = config.yml + source = gotify-server.service sha256sums = a18177dce403df17e21d8b15551d0525d7c0140a5f8a06148df1db1bc2749639 + sha256sums = 2052ac82ceb607701bd505c9df4170bb65c14601a4c8dda3c4ee36fd399c3dfa + sha256sums = 6d90cb466122331b983fac2d20a53f82c96db3e340297ec218cf296d0083dbc5 + sha256sums = 4023cd8e241accc8e650dd5a93fbad0c3f9c3ca87b1a83d1fd39c83178216dfa + sha256sums = 9c187715b12269ff4bf6768b1e7813daafb5812df1f3bc010c894c7b736743fa pkgname = gotify-server @@ -1,16 +1,26 @@ # Maintainer: ml <ml@visu.li> -# @TODO config, systemd service/socket, sysusers.d/*.conf, tmpfiles.d/*.conf +# @TODO systemd socket, ui pkgname=gotify-server pkgver=2.0.13 _commit=b2b56e09af0ec937a74291d2582cc038fde950e8 -pkgrel=1 +pkgrel=2 pkgdesc='A simple server for sending and receiving messages in real-time per WebSocket.' arch=(x86_64) url='https://gotify.net/' license=('MIT') makedepends=('git' 'go') -source=("$pkgname-$pkgver.tar.gz::https://github.com/gotify/server/archive/v${pkgver}.tar.gz") -sha256sums=('a18177dce403df17e21d8b15551d0525d7c0140a5f8a06148df1db1bc2749639') +source=( + "$pkgname-$pkgver.tar.gz::https://github.com/gotify/server/archive/v${pkgver}.tar.gz" + 'sysusers.d' + 'tmpfiles.d' + 'config.yml' + 'gotify-server.service' +) +sha256sums=('a18177dce403df17e21d8b15551d0525d7c0140a5f8a06148df1db1bc2749639' + '2052ac82ceb607701bd505c9df4170bb65c14601a4c8dda3c4ee36fd399c3dfa' + '6d90cb466122331b983fac2d20a53f82c96db3e340297ec218cf296d0083dbc5' + '4023cd8e241accc8e650dd5a93fbad0c3f9c3ca87b1a83d1fd39c83178216dfa' + '9c187715b12269ff4bf6768b1e7813daafb5812df1f3bc010c894c7b736743fa') build() { cd "server-$pkgver" @@ -34,7 +44,12 @@ check() { } package() { + install -Dm644 sysusers.d "$pkgdir/usr/lib/sysusers.d/gotify.conf" + install -Dm644 tmpfiles.d "$pkgdir/usr/lib/tmpfiles.d/gotify.conf" + install -Dm644 config.yml "$pkgdir/etc/gotify/config.yml" + install -Dm644 gotify-server.service "$pkgdir/usr/lib/systemd/system/gotify-server.service" + cd "server-$pkgver" install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" - install -Dm755 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/config.yml b/config.yml new file mode 100644 index 000000000000..4cbcca432ff6 --- /dev/null +++ b/config.yml @@ -0,0 +1,41 @@ +# Example configuration file for the server. +# Save it to `config.yml` when edited + +server: + listenaddr: "" # the address to bind on, leave empty to bind on all addresses + port: 8080 # the port the HTTP server will listen on + + ssl: + enabled: false # if https should be enabled + redirecttohttps: true # redirect to https if site is accessed by http + listenaddr: "" # the address to bind on, leave empty to bind on all addresses + port: 443 # the https port + certfile: # the cert file (leave empty when using letsencrypt) + certkey: # the cert key (leave empty when using letsencrypt) + letsencrypt: + enabled: false # if the certificate should be requested from letsencrypt + accepttos: false # if you accept the tos from letsencrypt + cache: /var/lib/gotify-server/certs # the directory of the cache from letsencrypt + hosts: # the hosts for which letsencrypt should request certificates +# - mydomain.tld +# - myotherdomain.tld + + responseheaders: # response headers are added to every response (default: none) +# Access-Control-Allow-Origin: "*" +# Access-Control-Allow-Methods: "GET,POST" + + stream: + allowedorigins: # allowed origins for websocket connections (same origin is always allowed) +# - ".+.example.com" +# - "otherdomain.com" + +database: # for database see (configure database section) + dialect: sqlite3 + connection: /var/lib/gotify-server/gotify.db + +defaultuser: # on database creation, gotify creates an admin user + name: admin # the username of the default user + pass: admin # the password of the default user +passstrength: 10 # the bcrypt password strength (higher = better but also slower) +uploadedimagesdir: /var/lib/gotify-server/images # the directory for storing uploaded images +pluginsdir: /var/lib/gotify-server/plugins # the directory where plugin resides diff --git a/gotify-server.service b/gotify-server.service new file mode 100644 index 000000000000..4e87bab05dc1 --- /dev/null +++ b/gotify-server.service @@ -0,0 +1,12 @@ +[Unit] +Description=Gotify Server +After=network.target + +[Service] +Type=simple +User=gotify +Group=gotify +ExecStart=/usr/bin/gotify-server + +[Install] +WantedBy=multi-user.target diff --git a/sysusers.d b/sysusers.d new file mode 100644 index 000000000000..992aa3899d3b --- /dev/null +++ b/sysusers.d @@ -0,0 +1,2 @@ +u gotify - - /var/lib/gotify +g gotify - - diff --git a/tmpfiles.d b/tmpfiles.d new file mode 100644 index 000000000000..11858fdd7896 --- /dev/null +++ b/tmpfiles.d @@ -0,0 +1 @@ +d /var/lib/gotify-server 0700 gotify gotify |