aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-04-11 20:00:41 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-04-11 20:02:42 +0200
commit5b3679958264327da2875ca2d0fd44f321cf9e2c (patch)
treeccb5c196d1c29e75114c93545e4c02e78f22a25b /system
parentFix name collision in server entry-point. (diff)
downloadcalp-5b3679958264327da2875ca2d0fd44f321cf9e2c.tar.gz
calp-5b3679958264327da2875ca2d0fd44f321cf9e2c.tar.xz
Replace systemd service with working, remove PKGBUILD.
Diffstat (limited to 'system')
-rw-r--r--system/Makefile4
-rw-r--r--system/PKGBUILD31
-rw-r--r--system/calp.service7
-rw-r--r--system/systemd/user/calp.service12
4 files changed, 16 insertions, 38 deletions
diff --git a/system/Makefile b/system/Makefile
new file mode 100644
index 00000000..8c9e43ce
--- /dev/null
+++ b/system/Makefile
@@ -0,0 +1,4 @@
+.PHONY: install
+
+install:
+ install -m644 -D systemd/user/calp.service $(DESTDIR)/usr/lib/systemd/user/calp.service
diff --git a/system/PKGBUILD b/system/PKGBUILD
deleted file mode 100644
index adcf79b3..00000000
--- a/system/PKGBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-pkgname=calp
-pkgver=0.6.1
-pkgrel=1
-pkgdesc='Calendar program'
-arch=('any')
-url=https://git.hornquist.se/git/calp
-license=('AGPL')
-depends=('guile>=2.2')
-makedepends=('ruby-sass')
-optdepends=('vdirsyncer: Download calendar files')
-source=(
- calp.service
- config.scm
- "https://github.com/HugoNikanor/$pkgname/archive/v$pkgver.tar.gz"
-)
-md5sums=('SKIP' 'SKIP' 'SKIP')
-
-build() {
- make -C $pkgname-$pkgver
-}
-
-# check() {
-# make test
-# }
-
-package() {
- make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
- install -m 644 -D -t $pkgdir/usr/lib/systemd/system/ calp.service
- install -m 644 -D -t $pkgdir/etc/calp/ config.scm
-}
-
diff --git a/system/calp.service b/system/calp.service
deleted file mode 100644
index 42777d96..00000000
--- a/system/calp.service
+++ /dev/null
@@ -1,7 +0,0 @@
-[Unit]
-Description=Calendar server
-
-[Service]
-User=calp
-ExecStart=calp --config /etc/calp/config.scm -- server
-Restart=always
diff --git a/system/systemd/user/calp.service b/system/systemd/user/calp.service
new file mode 100644
index 00000000..2dcb1518
--- /dev/null
+++ b/system/systemd/user/calp.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Calendar server
+Documentation=info:calp
+Documentation=file:/usr/share/doc/calp/README
+
+[Service]
+Environment=SYSTEMD=true
+ExecStart=calp --config %E/calp/config.scm --repl %t/calp-production server --sigusr
+Restart=always
+
+[Install]
+WantedBy=default.target