[arch-commits] Commit in grobi/trunk (PKGBUILD)
Morten Linderud
foxboron at gemini.archlinux.org
Fri Aug 20 09:10:33 UTC 2021
Date: Friday, August 20, 2021 @ 09:10:33
Author: foxboron
Revision: 1003971
upgpkg: grobi 0.6.0-2
Added:
grobi/trunk/PKGBUILD
----------+
PKGBUILD | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
Added: PKGBUILD
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-08-20 09:10:33 UTC (rev 1003971)
@@ -0,0 +1,44 @@
+pkgname=grobi
+pkgver=0.6.0
+pkgrel=2
+pkgdesc='Automatically configure monitors/outputs for Xorg via RANDR'
+arch=('x86_64')
+url='https://github.com/fd0/grobi'
+license=('BSD')
+makedepends=('go')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/fd0/grobi/archive/refs/tags/v$pkgver.tar.gz"
+"fix-test.patch::https://github.com/fd0/grobi/commit/176988ab087ff92d1408fbc454c77263457f3d7e.patch"
+"fix-edid-junk.patch::https://github.com/fd0/grobi/pull/33.patch"
+)
+sha256sums=('846cc199ca9e5a223b923f517e4f1c42e9f78553fe12b83788c327083b95c519'
+ 'd549e83b067540d15d56d93350c3561c74f91132bdf63cde8fd8aeab5bcb8176'
+ 'd34f78816fa0a5b48fc0e5fe68d27087311768f9759dfdd7af82ff23b31acf7e')
+
+prepare(){
+ cd "$pkgname-$pkgver"
+ mkdir -p build/
+
+ patch -Np1 < ../fix-test.patch
+ patch -Np1 < ../fix-edid-junk.patch
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ 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 .
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ go test ./...
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
+ install -Dm644 doc/grobi.service "$pkgdir"/usr/lib/systemd/user/$pkgname.service
+}
More information about the arch-commits
mailing list