summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7a840fc4e868dfab5284ae389088e5edab537f0b (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Maintainer: Linus Dierheimer <Linus@Dierheimer.de>

pkgname=fastfetch-git
pkgver=1.6.0.r0.g159a114
pkgrel=2
pkgdesc="Like neofetch, but much faster because written in c"
arch=("x86_64" "i686" "pentium4" "armv5" "armv6h" "armv7h" "aarch64")
url="https://github.com/LinusDierheimer/fastfetch"
license=("MIT")

depends=(
  "glibc"
)
makedepends=(
  "git"
  "cmake"
  "pciutils"
  "vulkan-headers"
  "vulkan-icd-loader"
  "wayland"
  "libxcb"
  "libxrandr" # Depends on libX11, which headers are also needed
  "dconf"     # Depends on glib2, which headers are also needed
  "imagemagick"
  "chafa"
  "zlib"
  "dbus"
  "xfconf"
  "mesa"
  "opencl-headers"
  "ocl-icd"
  # "libmagick6"
  # "sqlite3"
  # "rpm-tools"
)
optdepends=(
  "pciutils: GPU output"
  "vulkan-icd-loader: GPU fallback"
  "wayland: Improved Wayland support (resolution + multi monitor)"
  "libxcb: Improved X11 support (resolution + multi monitor)" 
  "libx11: Improved X11 support (resolution)"
  "libxrandr: Improved X11 support (resolution + multi monitor)"
  "glib2: Output for values that are only stored in GSettings"
  "dconf: Output for values that are only stored in DConf"
  "dbus: Media player and song output"
  "imagemagick: Image output using sixel or kitty graphics protocol"
  "chafa: Image output as ascii art"
  "zlib: Faster image output when using kitty graphics protocol"
  "xfconf: XFWM theme + xfce-terminal font"
  "mesa: OpenGL module"
  "ocl-icd: OpenCL module"
  "nix: self contained nix package count"
  # "libmagick6: ImageMagick 6 support" 
  # "sqlite3: rpm package count"
  # "rpm-tools: slower rpm package count fallback"
)

_provides_and_conflicts=(
  "fastfetch"
)
provides=("${_provides_and_conflicts[@]}")
conflicts=("${_provides_and_conflicts[@]}")

_src_dir="${pkgname}"
source=("${_src_dir}::git+https://github.com/LinusDierheimer/fastfetch.git")
sha256sums=("SKIP")

_build_dir="build"

pkgver() {
  cd "${_src_dir}"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cmake \
    -B "${_build_dir}" \
    -S "${_src_dir}" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_SQLITE3=OFF \
    -DENABLE_RPM=OFF \
    -DENABLE_IMAGEMAGICK6=OFF \
    -Wno-dev

  cmake \
    --build "${_build_dir}"
}

package() {
  DESTDIR="${pkgdir}" \
  cmake \
    --install "${_build_dir}"
}