summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1fc05724094a690bfc74993c4e9c51c4b192d1bd (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
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Atif Chowdhury <iftakhar.awal@gmail.com>
pkgname=eww-git
_pkgname=eww
pkgver=0.1.0.r164.g70285e0
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}
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

package() {
    cd "$_pkgname"

    install -Dm755 target/release/eww "${pkgdir}/usr/bin"
    mkdir -p "${pkgdir}/etc/xdg/${_pkgname}"
    cp -r examples/eww-bar "${pkgdir}/etc/xdg/${_pkgname}"
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"

    echo "\
_____________________________________________________________________
|                                                                   |
| The example config can be found in /etc/xdg/eww                   |
|                                                                   |
| For better experience, please write your own config.              |
| WIKI: https://elkowar.github.io/eww/configuration.html            |
|                                                                   |
|___________________________________________________________________|"
}