Date: Thursday, July 18, 2019 @ 04:30:29 Author: felixonmars Revision: 490863
addpkg: webhook 2.6.9-1 Added: webhook/ webhook/repos/ webhook/trunk/ webhook/trunk/PKGBUILD webhook/trunk/webhook.service -----------------+ PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++ webhook.service | 12 ++++++++++++ 2 files changed, 58 insertions(+) Added: webhook/trunk/PKGBUILD =================================================================== --- webhook/trunk/PKGBUILD (rev 0) +++ webhook/trunk/PKGBUILD 2019-07-18 04:30:29 UTC (rev 490863) @@ -0,0 +1,46 @@ +# Maintainer: Felix Yan <[email protected]> + +pkgname=webhook +pkgver=2.6.9 +pkgrel=1 +pkgdesc="A lightweight incoming webhook server to run shell commands" +arch=('x86_64') +url="https://github.com/adnanh/webhook" +license=('MIT') +depends=('glibc') +makedepends=('go-pie' 'git') +source=("$pkgname-$pkgver.tar.gz::https://github.com/adnanh/webhook/archive/$pkgver.tar.gz" + webhook.service + go.uuid.patch::https://github.com/adnanh/webhook/pull/321.patch) +sha512sums=('ccbfad6e2b9dfb77c4763a9b66e6a56f4e463b047fbedd6ffca4e61112ce3444696fae08a4e513f8778adc3d23ba9935b778ed35fdb3075bba73095f3d7cb311' + '4b08e6348a7e51aa4df668f1541f12e08960801d2e039b480de6ad73d26b8c325012474f83a3c8e819caafc216535c0b259aed1daf2226d545f895d0bd3d8efe' + 'fd66e890167fd620aed3df57dceb251460ac13e67b1c64e13d7a2628720703cf08977d61a8a30bf19988cfd273c2aa221ca98448f280fc5c35343a08d145c46f') + +prepare() { + cd webhook-$pkgver + patch -p1 -i ../go.uuid.patch + + mkdir -p .gopath/src/github.com/adnanh + ln -sf "$PWD" .gopath/src/github.com/adnanh/webhook + export GOPATH="$PWD/.gopath:/usr/share/gocode" + + rm -r vendor + + go get github.com/codegangsta/negroni github.com/gorilla/mux github.com/satori/go.uuid \ + gopkg.in/fsnotify.v1 github.com/ghodss/yaml +} + +build() { + cd "$srcdir"/webhook-$pkgver + go build -o build/webhook +} + +package() { + cd webhook-$pkgver + + install -Dm755 build/webhook "$pkgdir"/usr/bin/webhook + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + install -dm755 "$pkgdir"/etc/webhook + install -Dm644 "$srcdir"/webhook.service "$pkgdir"/usr/lib/systemd/system/webhook.service +} Added: webhook/trunk/webhook.service =================================================================== --- webhook/trunk/webhook.service (rev 0) +++ webhook/trunk/webhook.service 2019-07-18 04:30:29 UTC (rev 490863) @@ -0,0 +1,12 @@ +[Unit] +Description=Webhook Service +After=network.target +Wants=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/webhook -hooks /etc/webhook/hooks.json -verbose +Restart=on-failure + +[Install] +WantedBy=multi-user.target
