aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Schuller <code@rbn.im>2022-10-30 14:22:06 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-11-04 14:08:37 +0700
commit35d965dbbacaf187928a16797e5043dfdcbdfe88 (patch)
treea6edb570a5b18b02002c472f49b87ed0989da0da
parent5538497020f98f177d93942bf6eb2c810a8d85b9 (diff)
network/radicale: Updated for version 3.1.8.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--network/radicale/doinst.sh6
-rw-r--r--network/radicale/radicale.SlackBuild50
-rw-r--r--network/radicale/radicale.info12
-rwxr-xr-xnetwork/radicale/rc.radicale31
4 files changed, 64 insertions, 35 deletions
diff --git a/network/radicale/doinst.sh b/network/radicale/doinst.sh
index 969cf1a0f8e57..219f5d06929a8 100644
--- a/network/radicale/doinst.sh
+++ b/network/radicale/doinst.sh
@@ -22,6 +22,6 @@ preserve_perms() {
config $NEW
}
-for i in etc/radicale/config.new etc/radicale/logging.new; do
- preserve_perms $i
-done
+preserve_perms etc/rc.d/rc.radicale.new
+config etc/radicale/config.new
+config etc/radicale/rights.new
diff --git a/network/radicale/radicale.SlackBuild b/network/radicale/radicale.SlackBuild
index 1bbdd2b7ea284..6d9782e971591 100644
--- a/network/radicale/radicale.SlackBuild
+++ b/network/radicale/radicale.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for radicale
-# Copyright 2016-2017 Johannes Schoepfer, Germany
+# Copyright 2022 Ruben Schuller
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=radicale
-VERSION=${VERSION:-1.1.6}
+VERSION=${VERSION:-3.1.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -69,8 +69,8 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf Radicale-$VERSION
-tar vxf $CWD/Radicale-$VERSION.tar.gz
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/Radicale-$VERSION.tar.gz || tar xvf v$VERSION.tar.gz
cd Radicale-$VERSION
chown -R root:root .
find -L . \
@@ -79,33 +79,31 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python setup.py install --prefix=/usr --root=$PKG
-install -m0644 -D config $PKG/etc/radicale/config.new
-install -m0644 logging $PKG/etc/radicale/logging.new
-install -m0644 -D radicale.wsgi $PKG/var/lib/radicale/radicale.wsgi
-install -m0644 radicale.fcgi $PKG/var/lib/radicale/radicale.fcgi
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp COPYING README schema.sql config logging $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/etc/logrotate.d
-cat << EOF > $PKG/etc/logrotate.d/radicale
-/var/log/radicale {
- rotate 10
- notifempty
- size=1M
- compress
- delaycompress
-}
-EOF
+python3 -m build --wheel --no-isolation
+python3 -m installer --destdir "$PKG" dist/*.whl
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+install -v -m 0755 -g radicale -o radicale -d $PKG/etc/radicale
+install -v -m 0755 -g radicale -o radicale -d $PKG/var/lib/radicale
+install -v -m 0644 -g radicale -o radicale config $PKG/etc/radicale/config.new
+install -v -m 0644 -g radicale -o radicale rights $PKG/etc/radicale/rights.new
+install -v -m 0755 -g root -o root -d $PKG/etc/rc.d
+install -g root -o root -m 0644 $CWD/rc.radicale $PKG/etc/rc.d/rc.radicale.new
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ radicale.wsgi \
+ Dockerfile \
+ DOCUMENTATION.md \
+ README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
mkdir -p $PKG/install
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/network/radicale/radicale.info b/network/radicale/radicale.info
index 390d4f059560a..87e923493a0f4 100644
--- a/network/radicale/radicale.info
+++ b/network/radicale/radicale.info
@@ -1,10 +1,10 @@
PRGNAM="radicale"
-VERSION="1.1.6"
+VERSION="3.1.8"
HOMEPAGE="https://radicale.org/"
-DOWNLOAD="https://files.pythonhosted.org/packages/source/R/Radicale/Radicale-1.1.6.tar.gz"
-MD5SUM="ab2c00771d5bfaab218ce6e930d3a113"
+DOWNLOAD="https://github.com/Kozea/Radicale/archive/refs/tags/v3.1.8/radicale-3.1.8.tar.gz"
+MD5SUM="4c886b54c6926c5c463bbb80cf555998"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="mod_wsgi"
-MAINTAINER="Johannes Schoepfer"
-EMAIL="slackbuilds@schoepfer.info"
+REQUIRES="passlib python3-bcrypt python3-build python3-dateutil python3-defusedxml python3-installer python3-installer pytz vobject wheel"
+MAINTAINER="Ruben Schuller"
+EMAIL="sb@rbn.im"
diff --git a/network/radicale/rc.radicale b/network/radicale/rc.radicale
new file mode 100755
index 0000000000000..3fb0515ec2aaf
--- /dev/null
+++ b/network/radicale/rc.radicale
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# start/stop/restart radicale
+
+radicale_start() {
+ daemon -n radicale -u radicale -o local1.warning -e "HOME=/var/lib/radicale" -D /var/lib/radicale -- python3 -m radicale
+}
+
+radicale_stop() {
+ daemon -n radicale -u radicale --stop
+}
+
+radicale_restart() {
+ radicale_stop
+ sleep 1
+ radicale_start
+}
+
+case "$1" in
+'start')
+ radicale_start
+ ;;
+'stop')
+ radicale_stop
+ ;;
+'restart')
+ radicale_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac