diff options
author | Amolith | 2024-01-05 16:47:48 -0500 |
---|---|---|
committer | Amolith | 2024-01-05 16:51:31 -0500 |
commit | fc07571374d5010956414b04f6826a7a0a3a9698 (patch) | |
tree | 38c95e78514ce9d5221e3e8863b46113774cdf65 | |
download | aur-fc07571374d5010956414b04f6826a7a0a3a9698.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 46 |
3 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1d7358baabe8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = watt-wiser-git + pkgdesc = A software energy consumption estimation tool + pkgver = r68.ff39752 + pkgrel = 1 + url = https://git.sr.ht/~whereswaldon/watt-wiser + arch = any + license = Unlicense + makedepends = git + makedepends = go + makedepends = gcc + makedepends = libx11 + makedepends = vulkan-headers + makedepends = pkgconf + makedepends = wayland + makedepends = wayland-protocols + makedepends = libx11 + makedepends = libxkbcommon-x11 + makedepends = libxcursor + makedepends = lm_sensors + provides = watt-wiser + conflicts = watt-wiser + source = watt-wiser-git::git+https://git.sr.ht/~whereswaldon/watt-wiser#branch=main + sha256sums = SKIP + +pkgname = watt-wiser-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..d30295c3ae82 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.pkg.tar.zst +/watt-wiser-git/ +/pkg/ +/src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..47561a6e3a88 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Amolith <amolith@secluded.site> +pkgname=watt-wiser-git +_pkgname=${pkgname%-git} +pkgdesc='A software energy consumption estimation tool' +arch=("any") +url="https://git.sr.ht/~whereswaldon/watt-wiser" +_branch='main' +pkgver=r68.ff39752 +pkgrel=1 +license=("Unlicense") +makedepends=("git" "go" "gcc" "libx11" "vulkan-headers" "pkgconf" "wayland" "wayland-protocols" "libx11" "libxkbcommon-x11" "libxcursor" "lm_sensors") +source=("$pkgname::git+$url#branch=$_branch") +sha256sums=("SKIP") +provides=($_pkgname) +conflicts=($_pkgname) + +pkgver() { + cd "$pkgname" + ( set -o pipefail + git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" + ) +} + +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 "$_pkgname" . +} + +check() { + cd "$pkgname" + go test ./... +} + +package() { + cd "$pkgname" + install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" +} |