summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3089c171b7f75d6bf5742e8067eab01e59602b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: coffebar i8ehkvien@mozmail.com
# shellcheck disable=SC2034,SC2154

pkgname=waybar-module-pacman-updates-git
pkgver=0.2.13
pkgrel=1
pkgdesc='Waybar module for Arch to show system updates available'
arch=('x86_64')
url="https://github.com/coffebar/waybar-module-pacman-updates"
license=('GPL-3.0-or-later')
options=(!lto)
makedepends=(cargo git pacman)
depends=(waybar pacman pacman-contrib curl openssl)
source=("git+$url#commit=ef1f3df")
sha256sums=('SKIP')

pkgver(){
  cd "waybar-module-pacman-updates" || return 1
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
    cd "waybar-module-pacman-updates" || return 1
    cargo fetch --target "$CARCH-unknown-linux-gnu"
}

build() {
    cd "waybar-module-pacman-updates" || return 1
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release
}

package() {
    cd "waybar-module-pacman-updates" || return 1
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/waybar-module-pacman-updates"
}