2021-04-22 13:29:18 +03:00
|
|
|
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
|
|
|
|
|
|
PortSystem 1.0
|
|
|
|
|
PortGroup golang 1.0
|
|
|
|
|
|
2026-06-22 20:11:20 +03:00
|
|
|
go.setup github.com/adnanh/webhook 2.8.3
|
2021-04-22 13:29:18 +03:00
|
|
|
revision 0
|
|
|
|
|
|
|
|
|
|
categories net
|
|
|
|
|
license MIT
|
2021-10-10 21:55:12 +03:00
|
|
|
maintainers {judaew @judaew} openmaintainer
|
2021-04-22 13:29:18 +03:00
|
|
|
|
|
|
|
|
description A lightweight incoming webhook server to run shell commands
|
|
|
|
|
long_description \
|
|
|
|
|
webhook is a lightweight configurable tool written in Go, that allows you \
|
|
|
|
|
to easily create HTTP endpoints (hooks) on your server, which you can use \
|
|
|
|
|
to execute configured commands. You can also pass data from the HTTP \
|
|
|
|
|
request (such as headers, payload or query variables) to your commands. \
|
|
|
|
|
webhook also allows you to specify rules which have to be satisfied in \
|
|
|
|
|
order for the hook to be triggered.
|
|
|
|
|
|
|
|
|
|
checksums ${distname}${extract.suffix} \
|
2026-06-22 20:11:20 +03:00
|
|
|
rmd160 c32f606e696e224f56c5989d472604a3b550bbe3 \
|
|
|
|
|
sha256 5bfb3d9efd75d33bfee81fb8dae935178f42689fe0165fc1f5c5a312a0162541 \
|
|
|
|
|
size 1548274
|
2023-05-28 23:30:18 +03:00
|
|
|
|
|
|
|
|
# FIXME: This port currently can't be built without allowing go mod to fetch
|
2023-08-10 13:41:21 -04:00
|
|
|
go.offline_build no
|
2021-04-22 13:29:18 +03:00
|
|
|
|
|
|
|
|
destroot {
|
|
|
|
|
xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin
|
|
|
|
|
|
|
|
|
|
xinstall -d ${destroot}${prefix}/share/doc/${name}
|
|
|
|
|
xinstall -m 0644 {*}[glob ${worksrcpath}/docs/*.md] \
|
|
|
|
|
${destroot}${prefix}/share/doc/${name}
|
|
|
|
|
|
|
|
|
|
xinstall -d ${destroot}${prefix}/share/examples/${name}
|
|
|
|
|
xinstall -m 0644 ${worksrcpath}/hooks.json.example \
|
|
|
|
|
${destroot}${prefix}/share/examples/${name}/hooks.json
|
|
|
|
|
|
|
|
|
|
xinstall -d ${destroot}${prefix}/etc/${name}
|
|
|
|
|
destroot.keepdirs ${destroot}${prefix}/etc/${name}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
startupitem.create yes
|
|
|
|
|
startupitem.start \
|
|
|
|
|
"${prefix}/bin/${name} -hooks ${prefix}/etc/webhook/hooks.json -verbose"
|
|
|
|
|
startupitem.stop "kill \$(cat ${prefix}/var/run/${name}.pid) "
|
|
|
|
|
startupitem.pidfile auto ${prefix}/var/run/${name}.pid
|
|
|
|
|
|
|
|
|
|
notes "
|
|
|
|
|
A config must be created in
|
|
|
|
|
${prefix}/etc/webhook/hooks.json
|
|
|
|
|
|
|
|
|
|
An example config is
|
|
|
|
|
${prefix}/share/examples/webhook/hooks.json
|
|
|
|
|
|
|
|
|
|
Launch ${name} as daemon with
|
|
|
|
|
sudo port load ${name}
|
|
|
|
|
or
|
|
|
|
|
sudo launchctl load -w \\
|
|
|
|
|
/Library/LaunchDaemons/org.macports.webhook.plist
|
|
|
|
|
"
|