From 6732cfb3581c8d7545186214518974232107c3f0 Mon Sep 17 00:00:00 2001 From: Shin'ya Minazuki Date: Fri, 17 Jul 2026 20:43:32 -0300 Subject: [PATCH] Add www-apps/ntfy Signed-off-by: Shin'ya Minazuki --- acct-group/ntfy/ntfy-0.ebuild | 6 +++ acct-user/ntfy/ntfy-0.ebuild | 12 ++++++ www-apps/ntfy/Manifest | 3 ++ .../ntfy/files/0001-Patch-service-files.patch | 32 ++++++++++++++ www-apps/ntfy/metadata.xml | 8 ++++ www-apps/ntfy/ntfy-2.26.0.ebuild | 42 +++++++++++++++++++ 6 files changed, 103 insertions(+) create mode 100644 acct-group/ntfy/ntfy-0.ebuild create mode 100644 acct-user/ntfy/ntfy-0.ebuild create mode 100644 www-apps/ntfy/Manifest create mode 100644 www-apps/ntfy/files/0001-Patch-service-files.patch create mode 100644 www-apps/ntfy/metadata.xml create mode 100644 www-apps/ntfy/ntfy-2.26.0.ebuild diff --git a/acct-group/ntfy/ntfy-0.ebuild b/acct-group/ntfy/ntfy-0.ebuild new file mode 100644 index 0000000..6d47c62 --- /dev/null +++ b/acct-group/ntfy/ntfy-0.ebuild @@ -0,0 +1,6 @@ +# Copyright 2026 Shin'ya Minazuki +EAPI=8 + +inherit acct-group + +ACCT_GROUP_ID=-1 diff --git a/acct-user/ntfy/ntfy-0.ebuild b/acct-user/ntfy/ntfy-0.ebuild new file mode 100644 index 0000000..ef3c6af --- /dev/null +++ b/acct-user/ntfy/ntfy-0.ebuild @@ -0,0 +1,12 @@ +# Copyright 2026 Shin'ya Minazuki +EAPI=8 + +inherit acct-user + +DESCRIPTION="User for the simple HTTP-based pub-sub notification service" +ACCT_USER_ID=-1 +ACCT_USER_GROUPS=( ntfy ) +ACCT_USER_SHELL="/bin/false" +ACCT_USER_HOME="/var/lib/ntfy" + +acct-user_add_deps diff --git a/www-apps/ntfy/Manifest b/www-apps/ntfy/Manifest new file mode 100644 index 0000000..bf69e1c --- /dev/null +++ b/www-apps/ntfy/Manifest @@ -0,0 +1,3 @@ +DIST ntfy-2.26.0-deps.tar.gz 11323473 BLAKE2B 4688038358ad4fbd9a01b1834e1d5f08f484714baa8f9331005793c6a6f0a246328506d35725b5056de4830abd761050991f3874124f681863e9c521ef0b7db2 SHA512 e68f6fa108fdd259299290f4f7d8da2c5377bf3b10461c8b9a7dab3140ddef183c4a399b46227849a3080ad4c1d22381c8067c224699bb1974892bfa0f2d7707 +DIST ntfy-2.26.0-static.tar.gz 17017616 BLAKE2B d634cc5fc7e9a39a6d57a7fb135a206c29fd80cbb0500305f53705ceb63a8ee84f5c24f7ca4137896ced6d667646c02efd70eaf299df9422d51b8d6f08d801ae SHA512 2466fe2c568eee770694811f6179e962425368fca602819cf01f69affeee98fcf4dd07dab578d8190ed83be234d2fb4b87efb3f4b867fb577e6b67db1122ba91 +DIST ntfy-2.26.0.tar.gz 15995139 BLAKE2B 211e0604542df7af7fa90476d5fa5ac8c5c5c9fcc2136446ba1957083ab75bd263c3c3e8d011e8680353fb7bbd3f5531c0fe2a8fa36de5c85c1df14ddc8b4bf6 SHA512 640141f379486b7f074464f6f50927ec141d1598a8d7b95f4c02b8bf78fd77355fbc5c46d6fff7097a77b5c55993103f93dc86b3bcefc0ab28736adf672ca85c diff --git a/www-apps/ntfy/files/0001-Patch-service-files.patch b/www-apps/ntfy/files/0001-Patch-service-files.patch new file mode 100644 index 0000000..24a94db --- /dev/null +++ b/www-apps/ntfy/files/0001-Patch-service-files.patch @@ -0,0 +1,32 @@ +From 4d9fc2c17b7f8e7971bec4664974f2d8b81fa257 Mon Sep 17 00:00:00 2001 +From: Shin'ya Minazuki +Date: Fri, 17 Jul 2026 17:59:00 -0400 +Subject: [PATCH] Patch service files + +--- + server/ntfy.openrc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/server/ntfy.openrc b/server/ntfy.openrc +index d928f28e..2e35237a 100644 +--- a/server/ntfy.openrc ++++ b/server/ntfy.openrc +@@ -8,13 +8,13 @@ + name=$RC_SVCNAME + description="ntfy server" + +-command="/usr/local/bin/ntfy" ++command="/usr/bin/ntfy" + command_background=true + command_args="serve" + command_user="ntfy:ntfy" + extra_started_commands="reload" + +-pidfile="/run/${RC_SVCNAME}/${RC_SVCNAME}.pid" ++pidfile="/run/${RC_SVCNAME}.pid" + + # Changes the hard number of open files (nofile) limit to 2048 for the service. + rc_ulimit="-n 2048" +-- +2.54.0 + diff --git a/www-apps/ntfy/metadata.xml b/www-apps/ntfy/metadata.xml new file mode 100644 index 0000000..44267db --- /dev/null +++ b/www-apps/ntfy/metadata.xml @@ -0,0 +1,8 @@ + + + + + shinyoukai@chaotic.ninja + Shin'ya Minazuki + + diff --git a/www-apps/ntfy/ntfy-2.26.0.ebuild b/www-apps/ntfy/ntfy-2.26.0.ebuild new file mode 100644 index 0000000..c215e47 --- /dev/null +++ b/www-apps/ntfy/ntfy-2.26.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 2026 Shin'ya Minazuki +EAPI=8 + +inherit go-module systemd + +DESCRIPTION="Send push notifications to your phone via PUT/POST" +HOMEPAGE="https://ntfy.sh" +SRC_URI=" + https://distfiles.chaotic.ninja/pub/${PN}/${P}.tar.gz + https://distfiles.chaotic.ninja/pub/${PN}/${P}-deps.tar.gz + https://distfiles.chaotic.ninja/pub/${PN}/${P}-static.tar.gz +" + +LICENSE="|| ( Apache-2.0 GPL-3 )" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=" + >=dev-lang/go-1.25.8 +" +DEPEND="${RDEPEND}" +RDEPEND=" + acct-group/ntfy + acct-user/ntfy +" + +PATCHES=( + ${FILESDIR}/0001-Patch-service-files.patch +) + +RESTRICT="mirror" + +src_compile() { + export CGO_ENABLED=1 + ego build -o ${PN} -tags 'sqlite_omit_load_extension,osusergo,netgo' -ldflags "-linkmode=external -s -w -X main.version=${PVR} -X main.commit=432da44dc46d2c46ae7f351c28adf49de94d0d80 -X main.date=$(date +%s)" +} + +src_install() { + dobin ${PN} + newinitd server/ntfy.openrc "${PN}" + systemd_dounit server/ntfy.service +}