<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[HyperForum — Installing Radicale with OpenRC]]></title>
		<link>https://forums.hyperbola.info/viewtopic.php?id=167</link>
		<atom:link href="https://forums.hyperbola.info/extern.php?action=feed&amp;tid=167&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Installing Radicale with OpenRC.]]></description>
		<lastBuildDate>Sat, 19 Jan 2019 10:29:54 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Installing Radicale with OpenRC]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=760#p760</link>
			<description><![CDATA[<p>Hello together,</p><p>I was missing <strong>Radicale</strong> as server for CalDAV and CardDAV, so I had done some research resulting in building my own package. Perhaps this could be helpful for others interested.</p><p>First things first: I&#039;m using the official package from Arch Linux: <a href="https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/radicale">https://git.archlinux.org/svntogit/comm … s/radicale</a></p><p>As to view under the source link this package is using systemd-architecture, so I had to modify the package-build and create compatible scripts with OpenRC.</p><p>The PKGBUILD-file from the concurrent version on my homeserver:</p><div class="codebox"><pre><code># Maintainer: Moritz Lipp &lt;mlq@pwmt.org&gt;
# Co-Maintainer: fordprefect &lt;fordprefect@dukun.de&gt;
# Contributor: Thor77 &lt;thor77@thor77.org&gt;

pkgname=radicale
_name=Radicale
pkgver=2.1.9
pkgrel=2
pkgdesc=&#039;Simple calendar (CalDAV) and contact (CardDAV) server&#039;
arch=(&#039;any&#039;)
url=&quot;http://www.radicale.org/&quot;
license=(&#039;GPL3&#039;)
depends=(&#039;python-bcrypt&#039; &#039;python-passlib&#039; &#039;python-setuptools&#039; &#039;python-vobject&#039;)
checkdepends=(&#039;python-bcrypt&#039; &#039;python-pytest-cov&#039; &#039;python-pytest-flake8&#039; &#039;python-pytest-isort&#039; &#039;python-pytest-runner&#039;)
backup=(&#039;etc/radicale/config&#039;)
source=(&quot;${pkgname}-${pkgver}.tar.gz::https://github.com/Kozea/${pkgname}/archive/${pkgver}.tar.gz&quot;
        &quot;${pkgname}-sysusers.conf&quot;
        &quot;${pkgname}-tmpfiles.conf&quot;
        &quot;${pkgname}.initd&quot;)
sha512sums=(&#039;30df36772f4dd38c9c79ecd9669da8b40c7284afa9e2949c174c159838c33a66edec1a49adf7c110017dc83c592415be6fa43e2de6007d7e154b8707773c4a44&#039;
            &#039;444489ba929680490884e338acc311fb61d81f9d9f0282c92c40a80317af9e61123e4764e803d1698876417170efd40bfe7f56408570891c4e426de3be17c302&#039;
            &#039;4570ed393b73bc5a3fd571947acae78b96b5e17f659e3169f542b9c481635680c724d5c6c0952661fae063caf04c786afe7043c5052945e7a00bb66326dec016&#039;
            &#039;8c6155b8184e406ecd62201edffd34ff4b6c56e8a1f7e6eef45e86ff03ce55a6f1d35876ea020f46f2542707e60e70a215d42a054f374e56a26030b64c4e499c&#039;)

prepare() {
  mv -v ${_name}-${pkgver} ${pkgname}-${pkgver}
  cd ${pkgname}-${pkgver}
  # removing version pinning, as we are rolling release
  # expect to hit bugs!
  sed -e &#039;s/vobject\=\=0\.9\.5/vobject/&#039; \
      -e &#039;s/python-dateutil\=\=2\.6\.1/python-dateutil/&#039; \
      -i setup.py
}

build() {
  cd &quot;${pkgname}-${pkgver}&quot;
  python setup.py build
}

package() {
  cd &quot;${pkgname}-${pkgver}&quot;
  python setup.py install --skip-build \
    --optimize=1 \
    --prefix=/usr \
    --root=&quot;${pkgdir}&quot;
    # config
    install -vDm 644 config &quot;${pkgdir}/etc/${pkgname}/config&quot;
    # fcgi/wsgi
    install -t &quot;${pkgdir}/usr/share/${pkgname}/&quot; \
      -vDm 644 &quot;${pkgname}.fcgi&quot; \
      -vDm 644 &quot;${pkgname}.wsgi&quot;
    # systemd service
    install -vDm 755 &quot;${srcdir}/${pkgname}.initd&quot; \
      &quot;${pkgdir}/etc/init.d/${pkgname}&quot;
    # sysusers.d
    install -vDm 644 &quot;${srcdir}/${pkgname}-sysusers.conf&quot; \
      &quot;${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf&quot;
    # tmpfiles.d
    install -vDm 644 &quot;${srcdir}/${pkgname}-tmpfiles.conf&quot; \
      &quot;${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf&quot;
    # docs
    install -t &quot;${pkgdir}/usr/share/doc/${pkgname}/&quot; -vDm 644 {NEWS,README}.md
}</code></pre></div><p>Followed up is now the init-script for OpenRC:</p><div class="codebox"><pre><code>#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

pidfile=&quot;/run/radicale.pid&quot;
command=&quot;/usr/bin/radicale&quot;
command_args=&quot;--foreground&quot;
command_background=&quot;yes&quot;

depend() {
    use net
    need localmount
}</code></pre></div><p>Of course you also need the other files to download, otherwise makepkg won&#039;t startup building the package. But after installation with <em>pacman -U</em> the new service can be used with OpenRC.</p>]]></description>
			<author><![CDATA[null@example.com (throgh)]]></author>
			<pubDate>Sat, 19 Jan 2019 10:29:54 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=760#p760</guid>
		</item>
	</channel>
</rss>
