summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD30
-rwxr-xr-xhonk.install7
-rw-r--r--honk.service4
4 files changed, 31 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 06ff04c..14fb3eb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = honk-hg
pkgdesc = ActivityPub compatible server with web frontend. Mercurialtip.
pkgver = 1340.0a351daab5d0
- pkgrel = 1
+ pkgrel = 2
epoch = 0
url = https://humungus.tedunangst.com/r/honk
install = honk.install
@@ -16,7 +16,8 @@ pkgbase = honk-hg
provides = honk-hg
conflicts = honk-hg
conflicts = honk
- options = !strip
+ options = strip
+ options = zipman
source = hg+https://humungus.tedunangst.com/r/honk
sha512sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index d66cbe3..e00e342 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=honk-hg
_pkgname=honk
pkgver=1340.0a351daab5d0
-pkgrel=1
+pkgrel=2
epoch=0
pkgdesc="ActivityPub compatible server with web frontend. Mercurialtip."
arch=("x86_64")
@@ -18,7 +18,7 @@ provides=("${pkgname}")
conflicts=("${pkgname}" 'honk')
source=("hg+https://humungus.tedunangst.com/r/honk")
sha512sums=('SKIP')
-options=(!strip)
+options=(strip zipman)
install="$_pkgname.install"
pkgver() {
@@ -33,10 +33,24 @@ build() {
}
package() {
- _PKG_HONKDIR="$pkgdir/usr/share/webapps/$_pkgname"
- install -vDm700 "$srcdir/$_pkgname/$_pkgname" "$_PKG_HONKDIR/$_pkgname"
- install -vDm644 "$srcdir/$_pkgname"/views/* -t "$_PKG_HONKDIR/views/"
- install -vDm644 "$srcdir/$_pkgname"/docs/* -t "$_PKG_HONKDIR/docs/"
- install -vDm644 "$srcdir/$_pkgname"/LICENSE -t "$pkgdir/usr/share/licenses/$_pkgname"
- install -vDm644 "../$_pkgname.service" -t "$pkgdir/etc/systemd/system"
+ _PKG_HONKDIR="$pkgdir/usr/share/$pkgname"
+ _PKG_DOCDIR="$srcdir/$_pkgname/docs"
+ _MANDIR="$pkgdir/usr/share/man/man"
+
+ install -Dm755 "$srcdir/$_pkgname/$_pkgname" -t "$pkgdir/usr/bin"
+ install -Dm644 "$srcdir/$_pkgname"/views/* -t "$_PKG_HONKDIR/views/"
+ install -Dm644 "$_PKG_DOCDIR"/* -t "$_PKG_HONKDIR/docs/"
+
+ for i in {1,3,5,8}; do
+ install -Dm644 $_PKG_DOCDIR/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 "$srcdir/$_pkgname"/LICENSE -t "$pkgdir/usr/share/licenses/$_pkgname"
+ install -Dm644 "../$_pkgname.service" -t "$pkgdir/etc/systemd/system"
}
diff --git a/honk.install b/honk.install
index dcb03bb..e130f05 100755
--- a/honk.install
+++ b/honk.install
@@ -1,13 +1,14 @@
#!/bin/sh
_BOLD='\033[01m'
_STYLE_END='\033[0m'
-_HONKDIR="/usr/share/webapps/honk"
+_HONKDIR="/usr/share/honk"
post_install() {
+ systemctl daemon-reload
+ mandb -q > /dev/null
useradd -r -m -d $_HONKDIR honk
chown honk:honk -R "$_HONKDIR"
- systemctl daemon-reload
- printf "\n\n${_BOLD}VERY IMPORTANT${_STYLE_END}:\nType:\n\t cd $_HONKDIR && ./honk init\nin a shell to initialize the database, and then you can type 'systemctl start honk' to start the honk server.\n'systemctl status honk' will help you identify problems that might arise.\nThe service launch the binary with the honk user and group.\n\n"
+ printf "\n\n${_BOLD}VERY IMPORTANT${_STYLE_END}:\nType:\n\tsu -l honk -c \"honk init\"\nin a shell to initialize the database, and then you can type 'systemctl start honk' to start the honk server.\n'systemctl status honk' will help you identify problems that might arise.\nThe service launch the binary with the 'honk' user.\n\n"
}
post_remove() {
diff --git a/honk.service b/honk.service
index c070204..661030b 100644
--- a/honk.service
+++ b/honk.service
@@ -2,8 +2,8 @@
Description="Honk ActivityPub server"
[Service]
-WorkingDirectory=/usr/share/webapps/honk
-ExecStart=/usr/share/webapps/honk/honk
+WorkingDirectory=/usr/share/honk
+ExecStart=/usr/bin/honk
User=honk
Group=honk