summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 028d103bdc5586ce2cb5bf34e5098ae3cfcea543 (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
38
39
40
41
42
43
44
45
# Maintainer: Fronkles McFranko <mrelfranko@disroot.org>
pkgname=eww-git
_pkgname=eww
pkgver=70285e0_2021.08.27
pkgrel=1
epoch=
pkgdesc="ElKowar's wacky widgets"
arch=('any')
url="https://github.com/elkowar/eww"
license=('MIT')
groups=()
depends=("gtk3")
makedepends=("rustup" "git")
checkdepends=()
optdepends=()
provides=("eww")
conflicts=("eww")
replaces=()
backup=()
options=()
install=
changelog=
source=("git+https://github.com/elkowar/eww")
noextract=()
md5sums=("SKIP")
validpgpkeys=()

pkgver() {
    cd ${_pkgname}
    _commit=$(git rev-parse HEAD | cut -c1-7)
    _date=$(git log -1 --date=short --pretty=format:%cd)
    printf "%s_%s\n" "${_commit}" "${_date}" | sed 's/-/./g'
}

build() {
    cd "$_pkgname"
    rustup toolchain install nightly
    cargo +nightly build --release
}

package() {
    cd "$_pkgname"

    install -D target/release/eww --target-directory "${pkgdir}/usr/bin" --mode 755
}