summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2eaf8e860bec4b2d4a5a158157816ab9ec38ddaa (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
# Maintainer: nazar <monom777>
pkgname=sysupdate-git
pkgver=r4.47e0479
pkgrel=1
pkgdesc="A fast and convenient system update utility for Arch Linux written in Go (Bubble Tea)"
arch=('x86_64')
url="https://github.com/monom777/sysupdate"
license=('MIT')
depends=('pacman' 'flatpak')
makedepends=('go' 'git')
provides=('sysupdate')
conflicts=('sysupdate')
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

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

build() {
  cd "${pkgname}"
  export GOPATH="${srcdir}/gopath"
  go build -o sysupdate -ldflags="-s -w" .
}

package() {
  cd "${pkgname}"
  install -Dm755 sysupdate "${pkgdir}/usr/bin/sysupdate"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}