summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: faef3068beab687972f9bde6cb4ee6e5916d9a51 (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
# Maintainer: brainlessbitch
# Contributor: brainlessbitch

pkgname=guifetch-git
_pkgname=guifetch
pkgver=r32.e8084a4%
pkgrel=1
pkgdesc="GUI fetch tool written in Flutter for Linux"
arch=('x86_64')
url="https://github.com/FlafyDev/guifetch"
license=('MIT')
depends=('gtk3')
makedepends=('clang' 'cmake' 'ninja' 'flutter' 'git')

source=("git+https://github.com/FlafyDev/guifetch")
sha256sums=("SKIP")

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

package() {
  cd "guifetch"

  flutter build linux --release

  install -dm755 "${pkgdir}/opt/${_pkgname}/"

  cd "$srcdir/$_pkgname/build/linux/x64/release/bundle"
  local execfile="$(find . -mindepth 1 -maxdepth 1 -type f -perm /111)"
  install -Dm755 \
	  "${execfile}" \
	  "${pkgdir}/opt/${_pkgname}/${_pkgname}"

  cp -r 'lib/' "${pkgdir}/opt/${_pkgname}/"
  cp -r 'data/' "${pkgdir}/opt/${_pkgname}/"

  install -dm755 "${pkgdir}/usr/bin"

  ln -s \
		"/opt/${_pkgname}/${_pkgname}" \
		"${pkgdir}/usr/bin/${_pkgname}"
}

# vim: ts=2 sw=2 et: