diff options
author | Josephine Pfeiffer | 2023-01-21 21:31:32 +0100 |
---|---|---|
committer | Josephine Pfeiffer | 2023-02-27 14:14:47 +0100 |
commit | 0af34426adf36815b6dd14c42d6ad9be14ae7a38 (patch) | |
tree | 1719fa8ce0047e1631e8c51d2190f489cc1e63a3 | |
download | aur-pagerduty-short-circuiter.tar.gz |
first commit
new file: .SRCINFO
new file: PKGBUILD
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 44 |
3 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1238281925e7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = pagerduty-short-circuiter + pkgdesc = Integration of go-pagerduty and ocm-container to spawn ocm-container with automatic cluster login and other features based on PagerDuty alerts. + pkgver = 0.0.2+20+gabe4840 + pkgrel = 1 + url = https://github.com/openshift/pagerduty-short-circuiter + arch = x86_64 + license = Apache-2.0 + makedepends = git + makedepends = go + source = pagerduty-short-circuiter::git+https://github.com/openshift/pagerduty-short-circuiter#commit=abe4840436f2907e3f064ad94bcc370d01a50ac1 + sha256sums = SKIP + +pkgname = pagerduty-short-circuiter diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..44519375d8c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Ignore everything +* + +# Except these +!.gitignore +!PKGBUILD +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..66a12840f3ba --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Josephine Pfeiffer <jpfeiffe@redhat.com> + +pkgname=pagerduty-short-circuiter +pkgver=0.0.2+20+gabe4840 +pkgrel=1 +pkgdesc="Integration of go-pagerduty and ocm-container to spawn ocm-container with automatic cluster login and other features based on PagerDuty alerts." +arch=(x86_64) +url="https://github.com/openshift/pagerduty-short-circuiter" +license=('Apache-2.0') +makedepends=(git go) +_commit="abe4840436f2907e3f064ad94bcc370d01a50ac1" # 27 Feb 2023 +source=("$pkgname::git+$url#commit=$_commit") +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/$pkgname" + git describe --tags | sed 's/^v//;s/-/+/g' +} + +prepare(){ + cd "$pkgname" + mkdir -p build/ +} + +build() { + cd "$pkgname" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build ./cmd/kite +} + +check() { + cd "$pkgname" + go test -v ./... +} + +package() { + cd "$pkgname" + install -Dm755 build/kite "$pkgdir"/usr/bin/kite + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/kite/LICENSE" +} |