summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Gómez2021-04-06 22:18:02 -0500
committerAndrea Gómez2021-04-06 22:18:02 -0500
commit1495430fabc429156076ac9d8c1800fe4a6eb110 (patch)
treef79316b7c08054369f0c3923a5a1aae5b435b6c2
downloadaur-1495430fabc429156076ac9d8c1800fe4a6eb110.tar.gz
Add gitflux-git.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD51
2 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5267994e2b90
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = gitflux-git
+ pkgdesc = Track your GitHub projects in InfluxDB and create beautiful graphs with Grafana
+ pkgver = r13.e7f31a6
+ pkgrel = 1
+ url = https://github.com/muesli/gitflux
+ arch = any
+ license = MIT
+ makedepends = git
+ makedepends = go
+ provides = gitflux
+ conflicts = gitflux
+ source = gitflux::git+https://github.com/muesli/gitflux.git#branch=main
+ sha256sums = SKIP
+
+pkgname = gitflux-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2fae56aa08de
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Andrea Denisse Gómez-Martínez <aur at denisse dot dev>
+
+pkgname=gitflux-git
+_pkgname=${pkgname%-git}
+pkgdesc='Track your GitHub projects in InfluxDB and create beautiful graphs with Grafana'
+arch=(any)
+url='https://github.com/muesli/gitflux'
+_branch='main'
+pkgver=r13.e7f31a6
+pkgrel=1
+license=('MIT')
+makedepends=(git go)
+source=("$_pkgname::git+$url.git#branch=$_branch")
+sha256sums=('SKIP')
+provides=($_pkgname)
+conflicts=($_pkgname)
+
+pkgver() {
+ cd "$_pkgname"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ mkdir -p "${pkgname}/build"
+}
+
+build() {
+ cd $_pkgname
+
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ go build -o build/ .
+}
+
+check() {
+ cd "$_pkgname"
+ go test ./...
+}
+
+package() {
+ cd "$_pkgname"
+ install -Dm755 build/$_pkgname "$pkgdir"/usr/bin/$_pkgname
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
+}