summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bbf31e7b9f38d62b20be0a53909c497a87de7fa2 (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
# Maintainer: atomicfs

pkgname=firmware-action-git
_pkgname=firmware-action
provides=('firmware-action')
conflicts=('firmware-action')
pkgver=547.3d9a259
pkgrel=2
pkgdesc="Build system for firmware images for several open source firmware solutions"
url="https://github.com/9elements/firmware-action"
arch=(any)
license=(MIT)
makedepends=(
	'git'
	'go'
	'upx'
)
depends=(
	'dagger'
	'docker'
)
source=("git+${url}.git")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${_pkgname}/action" || return
  version=$(printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)")
  echo "${version:1}"
}

build() {
	cd "${_pkgname}/action" || return
	go build -ldflags="-s -w" -o "${pkgname}"
	upx -9 "${pkgname}"
}

package() {
	cd "${_pkgname}/action" || return
	install -Dm 755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}