Created
July 9, 2021 21:12
-
-
Save reinaldoossuna/64716be202fb287f5deb6a5448556799 to your computer and use it in GitHub Desktop.
Aur eww-git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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