sysutils/go-ntfy: New port: Send push notifications to your phone or desktop using PUT/POST
ntfy (pronounced "notify") is a simple HTTP-based pub-sub notification service. With ntfy, you can send notifications to your phone or desktop via scripts from any computer, without having to sign up or pay any fees. If you'd like to run your own instance of the service, you can easily do so since ntfy is open source. Approved by: acm (mentor)
This commit is contained in:
@@ -462,6 +462,7 @@
|
||||
SUBDIR += gnome-settings-daemon
|
||||
SUBDIR += gnome-system-monitor
|
||||
SUBDIR += gnome_subr
|
||||
SUBDIR += go-ntfy
|
||||
SUBDIR += go-wtf
|
||||
SUBDIR += goaccess
|
||||
SUBDIR += goawk
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
PORTNAME= ntfy
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 2.12.0
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= LOCAL/dtxdf/${PORTNAME}/
|
||||
PKGNAMEPREFIX= go-
|
||||
DISTFILES= ${PORTNAME}-${DISTVERSION}.frontend${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= dtxdf@FreeBSD.org
|
||||
COMMENT= Send push notifications to your phone or desktop using PUT/POST
|
||||
WWW= https://ntfy.sh
|
||||
|
||||
LICENSE= APACHE20
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
USES= go:modules
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= binwiederhier
|
||||
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
GO_MOD_DIST= github
|
||||
GO_MODULE= github.com/binwiederhier/${PORTNAME}
|
||||
GO_BUILDFLAGS= -ldflags "\
|
||||
-X 'main.version=${DISTVERSION}' \
|
||||
-X 'main.commit=${GITID}' \
|
||||
-X 'main.date=${BUILD_DATE}'"
|
||||
|
||||
CONFLICTS_INSTALL= sysutils/ntfy
|
||||
|
||||
PLIST_FILES= "@sample ${ETCDIR}/client.yml.sample" \
|
||||
"@sample ${ETCDIR}/server.yml.sample" \
|
||||
bin/${PORTNAME}
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mkdocs-material>=0:textproc/py-mkdocs-material@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}mkdocs-minify-plugin>=0:textproc/py-mkdocs-minify-plugin@${PY_FLAVOR}
|
||||
DOCS_USES= python
|
||||
|
||||
# Run 'git checkout ${DISTVERSIONPREFIX}${DISTVERSION} && git rev-parse --short HEAD'
|
||||
# in the ntfy repository to get the value of GITID.
|
||||
GITID= 061677a7
|
||||
|
||||
BUILD_DATE= $$(date -u "+%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
post-patch:
|
||||
@${GREP} -rl "/etc/${PORTNAME}" ${WRKSRC}/cmd \
|
||||
| ${XARGS} ${REINPLACE_CMD} -e 's#/etc/${PORTNAME}#${ETCDIR}#g'
|
||||
|
||||
pre-build:
|
||||
@${MKDIR} ${WRKSRC}/server/docs
|
||||
${TOUCH} ${WRKSRC}/server/docs/index.html
|
||||
${RM} -r ${WRKSRC}/server/site
|
||||
@${MKDIR} ${WRKSRC}/server/site
|
||||
@cd ${WRKDIR}/ntfy-frontend && ${COPYTREE_SHARE} . ${WRKSRC}/server/site
|
||||
|
||||
pre-build-DOCS-on:
|
||||
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} mkdocs build
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${STAGEDIR}${ETCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/server/server.yml ${STAGEDIR}${ETCDIR}/server.yml.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/client/client.yml ${STAGEDIR}${ETCDIR}/client.yml.sample
|
||||
|
||||
.include <bsd.port.mk>
|
||||
@@ -0,0 +1,7 @@
|
||||
TIMESTAMP = 1750965231
|
||||
SHA256 (go/sysutils_go-ntfy/binwiederhier-ntfy-v2.12.0_GH0/ntfy-2.12.0.frontend.tar.gz) = 8b777d3618b2dde7095be53b09cb220e50a7e52af2a4211d074c5796151e5d4f
|
||||
SIZE (go/sysutils_go-ntfy/binwiederhier-ntfy-v2.12.0_GH0/ntfy-2.12.0.frontend.tar.gz) = 2297703
|
||||
SHA256 (go/sysutils_go-ntfy/binwiederhier-ntfy-v2.12.0_GH0/go.mod) = f88dd70c2bc8386f38d575e2c424cfb729a6c36a0c6299449df3cac40d289a7d
|
||||
SIZE (go/sysutils_go-ntfy/binwiederhier-ntfy-v2.12.0_GH0/go.mod) = 4705
|
||||
SHA256 (go/sysutils_go-ntfy/binwiederhier-ntfy-v2.12.0_GH0/binwiederhier-ntfy-v2.12.0_GH0.tar.gz) = 210b7409894aa51719077da6a771c82d460bd710a52a527cf52694166f6103d0
|
||||
SIZE (go/sysutils_go-ntfy/binwiederhier-ntfy-v2.12.0_GH0/binwiederhier-ntfy-v2.12.0_GH0.tar.gz) = 13608026
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: ntfy
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Configuration settings for ntfy in /etc/rc.conf
|
||||
#
|
||||
# ntfy_enable (bool): Enable ntfy. (default=NO)
|
||||
# ntfy_log (str): Log output. (default=/var/log/ntfy.log)
|
||||
# ntfy_runas (str): User to run ntfy as. (default=www)
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="ntfy"
|
||||
desc="Send push notifications to your phone or desktop using PUT/POST"
|
||||
rcvar="${name}_enable"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${ntfy_enable:="NO"}
|
||||
: ${ntfy_log:="/var/log/ntfy.log"}
|
||||
: ${ntfy_runas:="www"}
|
||||
: ${ntfy_args="--listen-http :8080"}
|
||||
|
||||
pidfile="/var/run/${name}.pid"
|
||||
procname="%%LOCALBASE%%/bin/${name}"
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-c -u '${ntfy_runas}' -p '${pidfile}' -t '${desc}' -o '${ntfy_log}' '${procname}' serve ${ntfy_args}"
|
||||
|
||||
run_rc_command "$1"
|
||||
@@ -0,0 +1,5 @@
|
||||
ntfy (pronounced "notify") is a simple HTTP-based pub-sub notification
|
||||
service. With ntfy, you can send notifications to your phone or
|
||||
desktop via scripts from any computer, without having to sign up
|
||||
or pay any fees. If you'd like to run your own instance of the
|
||||
service, you can easily do so since ntfy is open source.
|
||||
@@ -21,6 +21,8 @@ USE_GITHUB= yes
|
||||
GH_ACCOUNT= dschep
|
||||
USE_PYTHON= distutils noflavors autoplist
|
||||
|
||||
CONFLICTS_INSTALL= sysutils/go-ntfy
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
post-patch:
|
||||
|
||||
Reference in New Issue
Block a user