Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Aur eww-git
pkgname=eww-git
pkgver=.r0.5936d5b
pkgrel=1
pkgdesc="ElKowar's wacky widgets"
arch=('any')
url="https://github.com/elkowar/eww"
license=('MIT')
provides=("eww")
makedepends=('cargo' 'git' 'rustup')
source=("$pkgname::git+https://github.com/elkowar/eww")
sha1sums=('SKIP')
build() {
cd "$pkgname"
RUSTFLAGS="-C target-cpu=native" rustup run nightly \
cargo build --release
}
pkgver() {
cd "$pkgname"
local tag=$(git tag --sort=-v:refname | grep '^[0-9]' | head -1)
local commits_since=$(git rev-list $tag..HEAD --count)
echo "$tag.r$commits_since.$(git log --pretty=format:'%h' -n 1)"
}
package() {
cd "$pkgname"
install -Dm755 "target/release/eww" "$pkgdir/usr/bin/eww"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE-MIT"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment