summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 14247e513549b7dbd3e8b4ab09755c3db57977f3 (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
# Maintainer: LinusDierheimer <Linus@Dierheimer.de>

pkgname=fastfetch-git
pkgver=r206.35504b3
pkgrel=1
pkgdesc="Like neofetch, but much faster because written in c. Only Linux."
arch=("any")
url="https://github.com/LinusDierheimer/fastfetch"
license=("MIT")
depends=()
makedepends=(
  "cmake"
  "pciutils"
  "libxrandr" # Depends on libX11, which headers are also needed
  "dconf"     # Depends on glib2, which headers are also needed
  "wayland"
)
optdepends=(
  "pciutils: GPU output"
  "libx11: Resolution output"
  "libxrandr: Refresh rate in Resolution output"
  "dconf: GTK ouput on DEs which dont use config files (like Gnome)"
  "wayland: Better resolution performance + support for monitors with different refresh rates in wayland sessions"
)
provides=("flashfetch=${pkgver}")
source=("git+https://github.com/LinusDierheimer/fastfetch.git")
sha256sums=("SKIP")

pkgver() {
  cd "fastfetch/"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build()
{
    cd "${srcdir}/fastfetch"
    mkdir -p build/
    cd build/
    cmake ..
    cmake --build .
}

package() {
    cd ${srcdir}/fastfetch

    install -D "build/fastfetch" "${pkgdir}/usr/bin/fastfetch"
    install -D "build/flashfetch" "${pkgdir}/usr/bin/flashfetch"
    install -D "completions/bash" "${pkgdir}/usr/share/bash-completion/completions/fastfetch"

    install -Dd "${pkgdir}/usr/share/fastfetch/presets/"
    for file in presets/*; do
      install -D "$file" "${pkgdir}/usr/share/fastfetch/presets/"
    done
}