mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-22 09:01:39 +01:00
testing/xandikos: new aport
https://xandikos.org a lightweight yet complete CardDAV/CalDAV server that backs onto a Git repository testing/
This commit is contained in:
parent
4d11807a0c
commit
ea665225fd
43
testing/xandikos/APKBUILD
Normal file
43
testing/xandikos/APKBUILD
Normal file
@ -0,0 +1,43 @@
|
||||
# Contributor: Galen Abell <galen@galenabell.com>
|
||||
# Maintainer: Galen Abell <galen@galenabell.com>
|
||||
pkgname=xandikos
|
||||
pkgver=0.2.5
|
||||
pkgrel=0
|
||||
pkgdesc="a lightweight yet complete CardDAV/CalDAV server that backs onto a Git repository"
|
||||
url="https://xandikos.org"
|
||||
arch="noarch"
|
||||
license="GPL-3.0-or-later"
|
||||
depends="python3 py3-aiohttp py3-icalendar py3-dulwich py3-defusedxml py3-jinja2 py3-multidict"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
install="$pkgname.pre-install"
|
||||
subpackages="$pkgname-doc $pkgname-openrc"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/jelmer/xandikos/archive/v$pkgver.tar.gz
|
||||
xandikos.initd
|
||||
xandikos.confd
|
||||
"
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="." pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
|
||||
install -m644 -D $pkgname.1 \
|
||||
"$pkgdir"/usr/share/man/man1/$pkgname
|
||||
|
||||
install -m755 -D "$srcdir"/$pkgname.initd \
|
||||
"$pkgdir"/etc/init.d/$pkgname
|
||||
install -m644 -D "$srcdir"/$pkgname.confd \
|
||||
"$pkgdir"/etc/conf.d/$pkgname
|
||||
}
|
||||
|
||||
sha512sums="dbaf483bd4a8e267a667e46079f7c84d13e010c42879f9656a43460f215c02da5a8ff515b192268498b533993ef22e1062687be9ef7057211ce8206785af299e xandikos-0.2.5.tar.gz
|
||||
8d49ef3ce004a666d4e9b1e97114d5bf381aa75538518ce7b15202bacf73ef90cd3ad751d6aae73b2b5768b37f58045ed3f34db0d004a8c5f479c1a79cbbcd60 xandikos.initd
|
||||
8e1ef71e22809c9c7424dd518949e936d09d1da7f2911862d7943b71976554d74f72f186ea76bf8510b8fd95a75028fe369e5907c20695211425cf50c911388a xandikos.confd"
|
||||
25
testing/xandikos/xandikos.confd
Normal file
25
testing/xandikos/xandikos.confd
Normal file
@ -0,0 +1,25 @@
|
||||
# Xandikos options
|
||||
|
||||
#
|
||||
# Directory where xandikos should store data
|
||||
#
|
||||
|
||||
ROOT_DIR="/var/lib/xandikos"
|
||||
|
||||
#
|
||||
# Default listening address
|
||||
#
|
||||
|
||||
LISTEN_ADDRESS="127.0.0.1"
|
||||
|
||||
#
|
||||
# Default listening port
|
||||
#
|
||||
|
||||
LISTEN_PORT="8080"
|
||||
|
||||
#
|
||||
# The name of the principal user.
|
||||
#
|
||||
|
||||
USER_PRINCIPAL=""
|
||||
32
testing/xandikos/xandikos.initd
Normal file
32
testing/xandikos/xandikos.initd
Normal file
@ -0,0 +1,32 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
LOGS=/var/log/xandikos.log
|
||||
USER=xandikos
|
||||
|
||||
name=xandikos
|
||||
description="xandikos caldav/carddav server"
|
||||
|
||||
supervisor=supervise-daemon
|
||||
supervise_daemon_args="-1 $LOGS -2 $LOGS"
|
||||
|
||||
command=/usr/bin/xandikos
|
||||
command_args="-d $ROOT_DIR -l $LISTEN_ADDRESS -p $LISTEN_PORT --current-user-principal $USER_PRINCIPAL --autocreate"
|
||||
command_background="yes"
|
||||
|
||||
start_stop_daemon_args="--user $USER:$USER"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after firewall
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
if [ -z "$USER_PRINCIPAL" ]; then
|
||||
eerror "You must specify a user principal"
|
||||
return 1
|
||||
fi
|
||||
|
||||
checkpath -f "$LOGS" -m 644 -o "$USER:$USER"
|
||||
checkpath -d "$ROOT_DIR" -m 750 -o "$USER:$USER"
|
||||
}
|
||||
6
testing/xandikos/xandikos.pre-install
Normal file
6
testing/xandikos/xandikos.pre-install
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
addgroup -S xandikos 2>/dev/null
|
||||
adduser -S -D -H -s /sbin/nologin -G xandikos -g xandikos xandikos 2>/dev/null
|
||||
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user