yochananmarqos

Untitled

Sep 4th, 2020
100
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=freshfetch-git
  2. pkgver=r71.d337666
  3. pkgrel=1
  4. pkgdesc="A fresh take on Neofetch"
  5. arch=('x86_64')
  6. url="https://github.com/K4rakara/freshfetch"
  7. license=('MIT')
  8. depends=('libcpuid' 'luajit' 'libxcb')
  9. makedepends=('cargo' 'git')
  10. provides=("${pkgname%-git}")
  11. conflicts=("${pkgname%-git}")
  12. source=('git+https://github.com/K4rakara/freshfetch.git')
  13. sha256sums=('SKIP')
  14.  
  15. pkgver() {
  16.   cd "$srcdir/${pkgname%-git}"
  17.   ( set -o pipefail
  18.     git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
  19.     printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  20.   )
  21. }
  22.  
  23. build() {
  24.   cd "$srcdir/${pkgname%-git}"
  25.   cargo build --release --locked --all-features --target-dir=target
  26. }
  27.  
  28. check() {
  29.   cd "$srcdir/${pkgname%-git}"
  30.   cargo test --release --locked --target-dir=target
  31. }
  32.  
  33. package() {
  34.   cd "$srcdir/${pkgname%-git}"
  35.   install -Dm755 "target/release/${pkgname%-git}" -t "$pkgdir/usr/bin"
  36.   install -Dm644 LICENSE.md -t "$pkgdir/usr/share/licenses/${pkgname%-git}"
  37. }
RAW Paste Data