summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a3af83409087614d1ea404687bc7bac2217242c0 (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
# Maintainer: Hadi Chokr <hadichokr@icoud.com>
_pkgname=binfetch
pkgname=binfetch-git
pkgver=0.1.r23.g0acd7be
pkgrel=2
pkgdesc="Neofetch inspired utility for binaries."
arch=(x86_64 aarch64)
license=('CC0')
depends=('confuse' 'libelf' 'zlib')
makedepends=('meson' 'ninja')
source=("${_pkgname}::git+https://github.com/Nik-Nothing/binfetch.git")
conflicts=("${_pkgname}")
provides=("${_pkgname}")
sha256sums=('SKIP')

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

build() {
  cd "$_pkgname"
  meson setup build -Dc_args="-DPREFIX='\"/usr\"'"
  ninja -C build
}

package() {
  cd "$_pkgname"

  # Install the binary
  install -Dm755 build/binfetch "$pkgdir/usr/bin/binfetch"

  # Install global default config
  install -Dm644 cfg/binfetch.cfg "$pkgdir/usr/share/binfetch/binfetch.cfg"
}