summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5174ee0e7a898e54ee85ad7d2c1075e4a13212d9 (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
# Maintainer: sanpe <sanpeqf@gmail.com>
pkgname=w80xprog-git
_gitname=w80xprog
pkgver=1.0
pkgrel=1
pkgdesc="A simple command line programmer interfacing for Winner Marco 800 series chips."
arch=('i686' 'x86_64')
url="https://github.com/John-sanpe/w80xprog.git"
license=('GPL')
makedepends=('git')
source=("${_gitname}::git+${url}")
md5sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_gitname}"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

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

package() {
  cd "${srcdir}/${_gitname}"
  install -Dm755 w80xprog "${pkgdir}/usr/bin/w80xprog"
}