summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6c415c0dfc21a1162997061a334de8945f0265a5 (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
# Maintainer: alba4k <blaskoazzolaaaron@gmail.com>
pkgname=albafetch-git
pkgver=4.2.1.r0.g5279b3fe
pkgrel=1
pkgdesc="Neofetch, but written in C; both faster and worse than the original (latest commit)"
arch=(x86_64 aarch64)
url="https://github.com/alba4k/albafetch"
license=('MIT')
makedepends=(git make gcc meson ninja)
depends=(pciutils)
conflicts=(albafetch albafetch-bin)
provides=(albafetch)
source=("git+$url")
md5sums=('SKIP')

backup=("etc/xdg/albafetch-conf")

pkgver() {
    cd albafetch
    git describe --long --tags --abbrev=8 --exclude='*[a-zA-Z][a-zA-Z]*' \
      | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
    cd albafetch
    meson setup build
    meson compile -C build
}

check() {
    echo -e "\e[33m\e[1mTesting every module.\e[0m Feel free to report anything not working on https://github.com/alba4k/albafetch/issues"
    albafetch/build/debug
}

package() {
    cd albafetch
    install -Dm755 build/albafetch $pkgdir/usr/bin/albafetch

    install -Dm644 albafetch.conf $pkgdir/etc/xdg/albafetch.conf
	install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
	install -Dm644 README.md $pkgdir/usr/share/doc/$pkgname/README.md
	install -Dm644 MANUAL.md $pkgdir/usr/share/doc/$pkgname/MANUAL.md
}