# Copyright 1999-2026 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit systemd DESCRIPTION="Send push notifications to your phone or desktop using PUT/POST" HOMEPAGE="https://ntfy.sh/" IUSE="server" SRC_URI=" amd64? ( https://github.com/binwiederhier/ntfy/releases/download/v${PV}/ntfy_${PV}_linux_amd64.tar.gz ) " RESTRICT="mirror strip bindist" S=${WORKDIR}/ntfy_${PV}_linux_amd64 LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" DEPEND=" " RDEPEND=" ${DEPEND} acct-group/ntfy acct-user/ntfy " DOCS=( README.md ) src_prepare() { default sed -i -e "s!# listen-http: \":80\"!listen-http: \"[::1]:8778\"!" server/server.yml || die } src_install() { default dobin ntfy keepdir /etc/ntfy insinto /etc/ntfy doins client/client.yml systemd_dounit client/ntfy-client.service systemd_douserunit client/user/ntfy-client.service newinitd "${FILESDIR}/client.initd" ntfy-client if use server ; then doins server/server.yml systemd_dounit server/ntfy.service newinitd "${FILESDIR}/server.initd" ntfy fi }