Add www-apps/ntfy
Signed-off-by: Shin'ya Minazuki <shinyoukai@chaotic.ninja>
This commit is contained in:
parent
eca4b12489
commit
6732cfb358
6 changed files with 103 additions and 0 deletions
6
acct-group/ntfy/ntfy-0.ebuild
Normal file
6
acct-group/ntfy/ntfy-0.ebuild
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit acct-group
|
||||
|
||||
ACCT_GROUP_ID=-1
|
||||
12
acct-user/ntfy/ntfy-0.ebuild
Normal file
12
acct-user/ntfy/ntfy-0.ebuild
Normal file
|
|
@ -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
|
||||
3
www-apps/ntfy/Manifest
Normal file
3
www-apps/ntfy/Manifest
Normal file
|
|
@ -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
|
||||
32
www-apps/ntfy/files/0001-Patch-service-files.patch
Normal file
32
www-apps/ntfy/files/0001-Patch-service-files.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
From 4d9fc2c17b7f8e7971bec4664974f2d8b81fa257 Mon Sep 17 00:00:00 2001
|
||||
From: Shin'ya Minazuki <shinyoukai@chaotic.ninja>
|
||||
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
|
||||
|
||||
8
www-apps/ntfy/metadata.xml
Normal file
8
www-apps/ntfy/metadata.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>shinyoukai@chaotic.ninja</email>
|
||||
<name>Shin'ya Minazuki</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
42
www-apps/ntfy/ntfy-2.26.0.ebuild
Normal file
42
www-apps/ntfy/ntfy-2.26.0.ebuild
Normal file
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue