upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / webhook / trunk / PKGBUILD
blob19b7370822c1d05ad2867a61c10262db3e786f21
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=webhook
4 pkgver=2.8.0
5 pkgrel=2
6 pkgdesc="A lightweight incoming webhook server to run shell commands"
7 arch=('x86_64')
8 url="https://github.com/adnanh/webhook"
9 license=('MIT')
10 depends=('glibc')
11 makedepends=('go' 'git')
12 source=("$pkgname-$pkgver.tar.gz::https://github.com/adnanh/webhook/archive/$pkgver.tar.gz"
13         webhook.service)
14 sha512sums=('98a9e941687c1e679abd5cbd314dad28cb42383e483202698d386d9123d63a3f8f40bb97f3da2c644dfc3f79a8e7d7a6d28b5069c39c9ca114e7e101424481ca'
15             '2f8c46354777050a07001156e3e94821fce43a491712e88b8930a5081060506b0b8de8d05c9ac057aa2891ff73ef855772373299006edbc62b1734af529a2014')
17 prepare() {
18   cd webhook-$pkgver
20   mkdir -p .gopath/src/github.com/adnanh
21   ln -sf "$PWD" .gopath/src/github.com/adnanh/webhook
22   export GOPATH="$PWD/.gopath:/usr/share/gocode"
24   rm -r vendor
26   go get github.com/codegangsta/negroni github.com/gorilla/mux github.com/satori/go.uuid \
27          gopkg.in/fsnotify.v1 github.com/ghodss/yaml
30 build() {
31   export CGO_CPPFLAGS="${CPPFLAGS}"
32   export CGO_CFLAGS="${CFLAGS}"
33   export CGO_CXXFLAGS="${CXXFLAGS}"
34   export CGO_LDFLAGS="${LDFLAGS}"
35   export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
37   cd "$srcdir"/webhook-$pkgver
38   go build -o build/webhook
41 package() {
42   cd webhook-$pkgver
44   install -Dm755 build/webhook "$pkgdir"/usr/bin/webhook
45   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
47   install -dm755 "$pkgdir"/etc/webhook
48   install -Dm644 "$srcdir"/webhook.service "$pkgdir"/usr/lib/systemd/system/webhook.service