summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-06-08 13:47:16 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2021-06-08 13:47:16 +0100
commitb46d1fc97e8ba0304c539c5622a7cbde01d91130 (patch)
tree9a45c3ed2cfc5dd4e1d11822fc664294a3134c89
parent8e947e03130f4319341a6b76f3fc7793a11e33f8 (diff)
downloadhonk_aur-b46d1fc97e8ba0304c539c5622a7cbde01d91130.tar.gz
honk_aur-b46d1fc97e8ba0304c539c5622a7cbde01d91130.zip
systemd service is more robust. gzip manpages.
- the curious thing is thaht in my honk-hg package zipman *does* gzip the manpages without problems, but not with extracted sources from tarballs like here?
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD22
-rw-r--r--honk.service11
3 files changed, 24 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1d15133..3b671ad 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = honk
pkgdesc = ActivityPub compatible server with web frontend.
pkgver = 0.9.6
- pkgrel = 5
+ pkgrel = 6
epoch = 0
url = https://humungus.tedunangst.com/r/honk
install = honk.install
@@ -17,9 +17,9 @@ pkgbase = honk
conflicts = honk
conflicts = honk-hg
options = strip
+ options = docs
options = zipman
source = honk-0.9.6.tar.gz::https://humungus.tedunangst.com/r/honk/d/honk-0.9.6.tgz
sha512sums = d946be7796be2ef7dc565710351b0b27da947f4e65a2a8f52ec99624c66fb6fd5e21d3fa58fec691d944b4acfa6256b0ad1090f3f8f5191e6c3714f3eae99b29
pkgname = honk
-
diff --git a/PKGBUILD b/PKGBUILD
index c12752d..c981b1a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=honk
pkgver=0.9.6
-pkgrel=5
+pkgrel=6
epoch=0
pkgdesc="ActivityPub compatible server with web frontend."
arch=("x86_64")
@@ -17,7 +17,7 @@ provides=("${pkgname}")
conflicts=("${pkgname}" 'honk-hg')
source=("$pkgname-$pkgver.tar.gz::https://humungus.tedunangst.com/r/honk/d/$pkgname-$pkgver.tgz")
sha512sums=("d946be7796be2ef7dc565710351b0b27da947f4e65a2a8f52ec99624c66fb6fd5e21d3fa58fec691d944b4acfa6256b0ad1090f3f8f5191e6c3714f3eae99b29")
-options=(strip zipman)
+options=(strip docs zipman)
install="$pkgname.install"
build() {
@@ -27,22 +27,22 @@ build() {
package() {
_PKG_HONKDIR="$pkgdir/usr/share/$pkgname"
- _PKG_DOCDIR="$pkgname-$pkgver/docs"
+ DOCS="$pkgname-$pkgver/docs"
_MANDIR="$pkgdir/usr/share/man/man"
install -Dm755 "$pkgname-$pkgver/$pkgname" -t "$pkgdir/usr/bin/"
install -Dm644 "$pkgname-$pkgver"/views/* -t "$_PKG_HONKDIR/views/"
- install -Dm644 $_PKG_DOCDIR/* -t "$_PKG_HONKDIR/docs/"
-
+ install -Dm644 $DOCS/* -t "$_PKG_HONKDIR/docs/"
+ gzip -k -f $DOCS/*.{1,3,5,7,8}
for i in {1,3,5,8}; do
- install -Dm644 $_PKG_DOCDIR/honk.$i.gz -t ${_MANDIR}$i/
+ install -Dm644 $DOCS/honk.$i.gz -t ${_MANDIR}$i/
done
- install -Dm644 $_PKG_DOCDIR/activitypub.7.gz ${_MANDIR}7/honk_activitypub.7.gz
- install -Dm644 $_PKG_DOCDIR/hfcs.1.gz ${_MANDIR}1/honk_hfcs.1.gz
- install -Dm644 $_PKG_DOCDIR/intro.1.gz ${_MANDIR}1/honk_intro.1.gz
- install -Dm644 $_PKG_DOCDIR/vim.3.gz ${_MANDIR}3/honk_vim.3.gz
+ install -Dm644 $DOCS/activitypub.7.gz ${_MANDIR}7/honk_activitypub.7.gz
+ install -Dm644 $DOCS/hfcs.1.gz ${_MANDIR}1/honk_hfcs.1.gz
+ install -Dm644 $DOCS/intro.1.gz ${_MANDIR}1/honk_intro.1.gz
+ install -Dm644 $DOCS/vim.3.gz ${_MANDIR}3/honk_vim.3.gz
install -Dm644 "$pkgname-$pkgver"/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
- install -Dm644 ../honk.service -t "$pkgdir/etc/systemd/system/"
+ install -Dm644 ../honk.service -t "$pkgdir/usr/lib/systemd/system/"
}
diff --git a/honk.service b/honk.service
index 661030b..0d9d3ba 100644
--- a/honk.service
+++ b/honk.service
@@ -1,9 +1,20 @@
[Unit]
Description="Honk ActivityPub server"
+After=syslog.target network.target
+Requires=network.target
[Service]
+Restart=always
+RestartSec=30
WorkingDirectory=/usr/share/honk
ExecStart=/usr/bin/honk
+NoNewPrivileges=yes
+ProtectKernelLogs=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+ReadWritePaths=/usr/share/honk
+
User=honk
Group=honk