42 lines
944 B
Bash
42 lines
944 B
Bash
# 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
|
|
}
|