summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-05-11 22:43:24 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2021-05-11 22:46:53 +0100
commit74089cfe9303fc8a427b8727ce55ee20ced01e72 (patch)
treec2cc7353aa634922ab29c890f65fd7175027be3f
parente09875f18e32f37001182170a3f4fb2fc1918e45 (diff)
downloadhonk_aur-74089cfe9303fc8a427b8727ce55ee20ced01e72.tar.gz
honk_aur-74089cfe9303fc8a427b8727ce55ee20ced01e72.zip
Add fixes suggested by kseistrup on the AUR
- strip option since not debugging - zipman for manpage gunzipping - go instead of gcc-go dependency - put binary in more standard places - install man pages in /usr/share/man sections
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD36
-rwxr-xr-xhonk.install7
-rw-r--r--honk.service4
5 files changed, 39 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aac01df..cb43da9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,22 @@
pkgbase = honk
pkgdesc = ActivityPub compatible server with web frontend.
pkgver = 0.9.6
- pkgrel = 4
+ pkgrel = 5
epoch = 0
url = https://humungus.tedunangst.com/r/honk
install = honk.install
changelog = honk.changelog
arch = x86_64
license = custom:ISC
- makedepends = gcc-go
+ makedepends = go
makedepends = sqlite
- depends = gcc-go
+ depends = go
depends = sqlite
- optdepends = nginx: for TLS and reverse proxying
+ optdepends = nginx: for TLS and reverse proxying.
provides = honk
conflicts = honk
- options = !strip
+ options = strip
+ options = zipman
source = honk-0.9.6.tar.gz::https://humungus.tedunangst.com/r/honk/d/honk-0.9.6.tgz
sha512sums = d946be7796be2ef7dc565710351b0b27da947f4e65a2a8f52ec99624c66fb6fd5e21d3fa58fec691d944b4acfa6256b0ad1090f3f8f5191e6c3714f3eae99b29
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..924dfb9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg/
+src/
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
index 47ef7ac..3aa02de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,22 +3,21 @@
pkgname=honk
pkgver=0.9.6
-pkgrel=4
+pkgrel=5
epoch=0
pkgdesc="ActivityPub compatible server with web frontend."
arch=("x86_64")
url="https://humungus.tedunangst.com/r/honk"
license=("custom:ISC")
-makedepends=("gcc-go" "sqlite")
-depends=("gcc-go" "sqlite")
-optdepends=("nginx: for TLS and reverse proxying")
+makedepends=("go" "sqlite")
+depends=("go" "sqlite")
+optdepends=("nginx: for TLS and reverse proxying.")
changelog="$pkgname.changelog"
provides=("${pkgname}")
conflicts=("${pkgname}")
source=("$pkgname-$pkgver.tar.gz::https://humungus.tedunangst.com/r/honk/d/$pkgname-$pkgver.tgz")
sha512sums=("d946be7796be2ef7dc565710351b0b27da947f4e65a2a8f52ec99624c66fb6fd5e21d3fa58fec691d944b4acfa6256b0ad1090f3f8f5191e6c3714f3eae99b29")
-#backup=("usr/share/webapps/honk/honk.db" "usr/share/webapps/honk/blob.db" "usr/share/webapps/honk/backup.db" "usr/share/webapps/honk/views/*")
-options=(!strip)
+options=(strip zipman)
install="$pkgname.install"
build() {
@@ -27,10 +26,23 @@ build() {
}
package() {
- _PKG_HONKDIR="$pkgdir/usr/share/webapps/$pkgname"
- install -vDm700 "$pkgname-$pkgver/$pkgname" "$_PKG_HONKDIR/$pkgname"
- install -vDm644 "$pkgname-$pkgver"/views/* -t "$_PKG_HONKDIR/views/"
- install -vDm644 "$pkgname-$pkgver"/docs/* -t "$_PKG_HONKDIR/docs/"
- install -vDm644 "$pkgname-$pkgver"/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
- install -vDm644 ../honk.service -t "$pkgdir/etc/systemd/system"
+ _PKG_HONKDIR="$pkgdir/usr/share/$pkgname"
+ _PKG_DOCDIR="$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/"
+
+ 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 "$pkgname-$pkgver"/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -Dm644 ../honk.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