commit:     ba8e09c1fc4e9820c10864148ece105027c12da3
Author:     Skyler Mäntysaari <sm+gentoo <AT> skym <DOT> fi>
AuthorDate: Tue Feb 11 13:07:57 2025 +0000
Commit:     Skyler Mäntysaari <gentoo <AT> samip <DOT> fi>
CommitDate: Tue Feb 11 13:07:57 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ba8e09c1

Revert "www-apps/honk: treeclean"

This reverts commit b111f2a0c6efda2da6e74725be1ce1f9ac5b362f.

Signed-off-by: Skyler Mäntysaari <sm+gentoo <AT> skym.fi>

 www-apps/honk/Manifest           |  2 ++
 www-apps/honk/files/honk         | 56 ++++++++++++++++++++++++++++++++++++++++
 www-apps/honk/files/honk.service | 20 ++++++++++++++
 www-apps/honk/honk-0.9.8.ebuild  | 47 +++++++++++++++++++++++++++++++++
 www-apps/honk/honk-0.9.91.ebuild | 47 +++++++++++++++++++++++++++++++++
 www-apps/honk/metadata.xml       | 12 +++++++++
 6 files changed, 184 insertions(+)

diff --git a/www-apps/honk/Manifest b/www-apps/honk/Manifest
new file mode 100644
index 000000000..ead2a3f83
--- /dev/null
+++ b/www-apps/honk/Manifest
@@ -0,0 +1,2 @@
+DIST honk-0.9.8.tgz 511957 BLAKE2B 
c07e4141be790d58170da6eb759486889b6c74d70b946e89b1598b2c1868175df1cb9f41649a34067f2ca6f3bddc77d4cc22a241761460b2487bf866b7d40650
 SHA512 
f32be393698eb3b3ae72d223814eee2a15af3e892ab4b9140314da3ce96d4b4582a8b73c3fa5adede34a4d9d9b2cfc8d7dbb933d516eba8e3820d125c217a354
+DIST honk-0.9.91.tgz 516396 BLAKE2B 
416ffa5920115b57b69450e07ea6fc5fe68707900d2c6607ce6a99043e32735f7d73624671d1dcee5c9a2962a7242a008ad248156385439d94ed4ca8f55e3328
 SHA512 
bad8a328d666943d6007f1fe856dc9bfdc6b625d50cebce551c27aeb03de159e106d63d73d567026116b8bd92ec906f1774bad5c7f175726f338c6c1537eb071

diff --git a/www-apps/honk/files/honk b/www-apps/honk/files/honk
new file mode 100644
index 000000000..c542d1067
--- /dev/null
+++ b/www-apps/honk/files/honk
@@ -0,0 +1,56 @@
+#!/sbin/openrc-run
+# shellcheck shell=sh
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+extra_stopped_commands="init"
+extra_started_commands="upgrade"
+description_init="Create the database"
+description_upgrade="Upgrade the server"
+
+name="Honk ActivityPub server"
+command="/usr/bin/honk"
+command_args="-datadir /var/lib/honk -viewdir /usr/share/honk -log 
/var/log/honk.log"
+command_user="honk:honk"
+command_background=yes
+pidfile="/run/honk.pid"
+
+depend() {
+       need net
+}
+
+fix_log_perms() {
+       checkpath -fo honk:honk /var/log/honk.log
+}
+
+check_db() {
+       if [ ! -f /var/lib/honk/honk.db ]; then
+               eerror "Please run 'rc-service honk init' before the first 
start"
+               return 1
+       fi
+
+       return 0
+}
+
+start_pre() {
+       fix_log_perms || return 1
+       check_db || return 1
+
+       start-stop-daemon --exec "${command}" --user "${command_user}" \
+               -- ${command_args} cleanup
+}
+
+init() {
+       fix_log_perms || return 1
+
+       start-stop-daemon --exec "${command}" --user "${command_user}" \
+               -- ${command_args} init
+}
+
+upgrade() {
+       fix_log_perms || return 1
+       check_db || return 1
+
+       start-stop-daemon --exec "${command}" --user "${command_user}" \
+               -- ${command_args} upgrade
+}

diff --git a/www-apps/honk/files/honk.service b/www-apps/honk/files/honk.service
new file mode 100644
index 000000000..897d8f3b4
--- /dev/null
+++ b/www-apps/honk/files/honk.service
@@ -0,0 +1,20 @@
+[Unit]
+Description="Honk ActivityPub server"
+After=syslog.target network.target
+Requires=network.target
+
+[Service]
+Restart=always
+RestartSec=30
+ExecStart=/usr/bin/honk -datadir /var/lib/honk -viewdir /usr/share/honk
+NoNewPrivileges=yes
+ProtectKernelLogs=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+ReadWritePaths=/var/lib/honk
+User=honk
+Group=honk
+
+[Install]
+WantedBy=default.target

diff --git a/www-apps/honk/honk-0.9.8.ebuild b/www-apps/honk/honk-0.9.8.ebuild
new file mode 100644
index 000000000..db8476cde
--- /dev/null
+++ b/www-apps/honk/honk-0.9.8.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd
+
+DESCRIPTION="ActivityPub server with minimal setup and support costs"
+HOMEPAGE="https://humungus.tedunangst.com/r/honk";
+SRC_URI="https://humungus.tedunangst.com/r/${PN}/d/${P}.tgz";
+
+LICENSE="BSD BSD-2 ISC MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="dev-db/sqlite:3"
+RDEPEND="
+       ${DEPEND}
+       acct-user/honk
+"
+
+DOCS=( README docs/{changelog,ping}.txt docs/{intro.1,vim.3} )
+
+src_install() {
+       dobin honk
+       doman docs/activitypub.7 docs/hfcs.1 docs/honk.{1,3,5,8}
+       einstalldocs
+
+       doinitd "${FILESDIR}"/honk
+       systemd_dounit "${FILESDIR}"/honk.service
+
+       insinto /usr/share/honk
+       doins -r views
+
+       diropts --owner honk --group honk
+       keepdir /var/lib/honk
+}
+
+pkg_postinst() {
+       if [[ -z ${REPLACING_VERSIONS} ]]; then
+               einfo "To finish the installation, please run:"
+               einfo " # rc-service honk init"
+       else
+               einfo "To finish the upgrade, please run:"
+               einfo " # rc-service honk upgrade"
+       fi
+}

diff --git a/www-apps/honk/honk-0.9.91.ebuild b/www-apps/honk/honk-0.9.91.ebuild
new file mode 100644
index 000000000..17d162dc4
--- /dev/null
+++ b/www-apps/honk/honk-0.9.91.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd
+
+DESCRIPTION="ActivityPub server with minimal setup and support costs"
+HOMEPAGE="https://humungus.tedunangst.com/r/honk";
+SRC_URI="https://humungus.tedunangst.com/r/${PN}/d/${P}.tgz";
+
+LICENSE="BSD BSD-2 ISC MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="dev-db/sqlite:3"
+RDEPEND="
+       ${DEPEND}
+       acct-user/honk
+"
+
+DOCS=( README docs/{changelog,ping}.txt docs/{intro.1,vim.3} )
+
+src_install() {
+       dobin honk
+       doman docs/activitypub.7 docs/hfcs.1 docs/honk.{1,3,5,8}
+       einstalldocs
+
+       doinitd "${FILESDIR}"/honk
+       systemd_dounit "${FILESDIR}"/honk.service
+
+       insinto /usr/share/honk
+       doins -r views
+
+       diropts --owner honk --group honk
+       keepdir /var/lib/honk
+}
+
+pkg_postinst() {
+       if [[ -z ${REPLACING_VERSIONS} ]]; then
+               einfo "To finish the installation, please run:"
+               einfo " # rc-service honk init"
+       else
+               einfo "To finish the upgrade, please run:"
+               einfo " # rc-service honk upgrade"
+       fi
+}

diff --git a/www-apps/honk/metadata.xml b/www-apps/honk/metadata.xml
new file mode 100644
index 000000000..b20b97e8e
--- /dev/null
+++ b/www-apps/honk/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <!-- maintainer-needed -->
+       <upstream>
+               <doc>https://humungus.tedunangst.com/r/honk/m</doc>
+               <maintainer>
+                       <name>Ted Unangst</name>
+                       <email>t...@tedunangst.com</email>
+               </maintainer>
+       </upstream>
+</pkgmetadata>

Reply via email to