Skip to content

Instantly share code, notes, and snippets.

Created November 25, 2013 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7641701 to your computer and use it in GitHub Desktop.
Save anonymous/7641701 to your computer and use it in GitHub Desktop.
# Maintainer: Moritz Lipp <mlq@pwmt.org>
pkgname=radicale
pkgver=0.8
pkgrel=4
pkgdesc="A Simple Calendar Server"
arch=any
url="http://www.radicale.org/"
license=('GPL3')
depends=('python')
backup=('etc/radicale/config')
install=${pkgname}.install
source=(
http://pypi.python.org/packages/source/R/Radicale/Radicale-$pkgver.tar.gz
radicale.service
)
md5sums=('ad903ead8b910180f80652c0beaebaf6'
'62af2e07ad32a0fcece32fae68e92daf')
package() {
cd "$srcdir/Radicale-$pkgver"
python setup.py install --prefix=/usr --root="$pkgdir"
install -m600 -D "$srcdir/Radicale-$pkgver/config" "$pkgdir/etc/radicale/config"
chmod -R 600 "$pkgdir/etc/radicale/"
install -m644 -D "$srcdir/radicale.service" "$pkgdir/usr/lib/systemd/system/radicale.service"
}
post_install() {
getent group radicale &>/dev/null || groupadd radicale >/dev/null
getent passwd radicale &>/dev/null || useradd -r -s /usr/bin/false \
-g radicale -G radicale,http -d /etc/radicale/ radicale >/dev/null
chown -R radicale:radicale /etc/radicale/
}
post_update() {
chown -R radicale:radicale /etc/radicale/
}
pre_remove() {
getent passwd radicale &>/dev/null && userdel radicale >/dev/null
getent group radicale &>/dev/null && groupdel radicale >/dev/null
true
}
[Unit]
Description=RadiCAL Server
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/usr/bin/radicale -f
User=radicale
Group=radicale
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment