aboutsummaryrefslogtreecommitdiff
path: root/net-misc
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/ntfy/Manifest2
-rw-r--r--net-misc/ntfy/files/ntfy.service15
-rw-r--r--net-misc/ntfy/ntfy-2.22.0.ebuild67
3 files changed, 84 insertions, 0 deletions
diff --git a/net-misc/ntfy/Manifest b/net-misc/ntfy/Manifest
new file mode 100644
index 0000000..860006b
--- /dev/null
+++ b/net-misc/ntfy/Manifest
@@ -0,0 +1,2 @@
+DIST ntfy-2.22.0-vendor.tar.gz 11188668 BLAKE2B 70065cfe933aa7b7dd02135ff4051c44c3e132ac02e41f096c7fd5de0f78f35e4f827a20dbca1aff316b30de91d270ee55a3baefe7afd17c6253d70537bea2e1 SHA512 305beba5813ede6f38bb609155bd65bd7624d8c24558946334648f6a55ab134507630007bb615605d1e31a22a164d186d891586f177c743b655ee5f489536a10
+DIST ntfy-2.22.0.tar.gz 15854255 BLAKE2B b75e7ca727b37641b29547e0ece4290778664c13e771198e77d101954c0f37e8d7abdf04437c8fd6641b440f2bc77f1b6ec7c886d73ac62c891f5c0bb01d2150 SHA512 b179c20ed7b8405f89410e01349133f4204538849ff00590152523ed2fe3b2353da5b4c3551409b17009ba5d052830cc63ecee672905ccb26ec54cf0442dcf24
diff --git a/net-misc/ntfy/files/ntfy.service b/net-misc/ntfy/files/ntfy.service
new file mode 100644
index 0000000..2b0cd55
--- /dev/null
+++ b/net-misc/ntfy/files/ntfy.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=NTFY notifications
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/ntfy serve
+WorkingDirectory=/var/lib/ntfy
+
+User=ntfy
+Group=ntfy
+
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntfy/ntfy-2.22.0.ebuild b/net-misc/ntfy/ntfy-2.22.0.ebuild
new file mode 100644
index 0000000..9e591cf
--- /dev/null
+++ b/net-misc/ntfy/ntfy-2.22.0.ebuild
@@ -0,0 +1,67 @@
+#
+# ~~~ net-misc/ntfy
+#
+# ~~~ send push notifications to a phone
+#
+
+#
+# ~~~ metadata
+
+# portage info
+EAPI=8
+SLOT=0
+
+KEYWORDS="amd64"
+IUSE="+server"
+
+# info
+HOMEPAGE="https://ntfy.sh/"
+DESCRIPTION="Send push notications to your phone using PUSH/PUT"
+LICENSE="GPL-2"
+
+# package data
+SRC_URI="
+ https://github.com/binwiederhier/ntfy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ https://files.autumnfo.rest/gentoo/ntfy/ntfy-${PV}-vendor.tar.gz"
+
+#
+# ~~~ dependencies
+
+# use systemd
+inherit systemd
+
+# build-time dependencies
+BDEPEND="dev-lang/go"
+
+# run-time dependencies
+RDEPEND="
+ acct-user/ntfy
+ acct-group/ntfy"
+
+#
+# ~~~ steps
+
+# configure
+src_configure() {
+ :
+}
+
+# compile
+src_compile() {
+ if use server; then
+ emake cli-linux-server
+ else
+ emake cli-client
+ fi
+}
+
+# install
+src_install() {
+ dobin dist/ntfy_linux_server/ntfy
+
+ keepdir /var/lib/ntfy /etc/ntfy
+ fowners ntfy:ntfy /var/lib/ntfy /etc/ntfy
+ fperms 0750 /var/lib/ntfy /etc/ntfy
+
+ systemd_dounit "${FILESDIR}/ntfy.service"
+}