summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 837f906bcf1aece5169f532c94505d8c8a1a4244 (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
# Maintainer: taotieren <admin@taotieren.com>

pkgname=sunxi-fw-git
pkgver=r21.a768b73
pkgrel=5
pkgdesc="Allwinner firmware images decoding and extraction tool"
arch=(aarch64
    x86_64
    riscv64)
url="https://github.com/apritzel/sunxi-fw"
license=(GPL-2.0-only)
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
replaces=()
depends=(dtc
  glibc)
makedepends=(git)
backup=()
options=()
install=
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname}"
#     git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare()
{
    git -C "${srcdir}/${pkgname}" clean -dfx
}

build() {
    cd "${srcdir}/${pkgname}"
    make
}

package() {
    cd "${srcdir}/${pkgname}"
    PREFIX="$pkgdir/usr" make install
}