diff options
author | Mark Wagie | 2022-06-05 12:14:27 -0600 |
---|---|---|
committer | Mark Wagie | 2022-06-05 12:14:27 -0600 |
commit | 888e1c034bb6a2164ae5c00b92249c2a812291b5 (patch) | |
tree | 5dbea55592997539d19a55690751193b7dad537d | |
download | aur-888e1c034bb6a2164ae5c00b92249c2a812291b5.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 47 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c0dd0575acbc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = huekeys + pkgdesc = Control the keyboard backlight on System76 laptops + pkgver = 0.4.5 + pkgrel = 1 + url = https://github.com/BitPonyLLC/huekeys + arch = x86_64 + license = MIT + makedepends = git + makedepends = go + depends = gtk3 + depends = libayatana-appindicator + source = git+https://github.com/BitPonyLLC/huekeys.git#commit=da72dc74a2168b5d5227dadf6624362bb6e182d7 + sha256sums = SKIP + +pkgname = huekeys diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..4dab8d6386e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Ignore everything +* + +# But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..739335b5f2b4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com> +pkgname=huekeys +pkgver=0.4.5 +pkgrel=1 +pkgdesc="Control the keyboard backlight on System76 laptops" +arch=('x86_64') +url="https://github.com/BitPonyLLC/huekeys" +license=('MIT') +depends=('gtk3' 'libayatana-appindicator') +makedepends=('git' 'go') +_commit=da72dc74a2168b5d5227dadf6624362bb6e182d7 +source=("git+https://github.com/BitPonyLLC/huekeys.git#commit=${_commit}") +sha256sums=('SKIP') + +prepare() { + cd "$srcdir/$pkgname" + export GOPATH="$srcdir/gopath" + go mod tidy +} + +build() { + cd "$srcdir/$pkgname" + export GOPATH="$srcdir/gopath" + 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" + make + + # Generate shell completions + ./"$pkgname" completion bash > "$pkgname.bash" + ./"$pkgname" completion fish > "${pkgname}.fish" + ./"$pkgname" completion zsh > "_${pkgname}" + + # Clean module cache for makepkg -C + go clean -modcache +} + +package() { + cd "$srcdir/$pkgname" + install -Dm755 "$pkgname" -t "$pkgdir/usr/bin/" + install -Dm644 "$pkgname.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgname" + install -Dm644 "${pkgname}.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/" + install -Dm644 "_${pkgname}" -t "$pkgdir/usr/share/zsh/site-functions/" + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" +} |