# -*- 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 go.setup github.com/adnanh/webhook 2.8.1 revision 0 categories net license MIT maintainers {judaew @judaew} openmaintainer 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} \ rmd160 ab3c0cd624fdabc6c85c783cde7b1d492cc04e58 \ sha256 b5b26d5194572dd9a88199e928d9668e5bcc1cb536bd3d57973bc199aaf66d2b \ size 1658573 # FIXME: This port currently can't be built without allowing go mod to fetch go.offline_build no 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 "