summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2bce64b51dda6517e39921ce81e5919cba186ba5 (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
# Maintainer: coderbaka <coderbaka@gmail.com>
_pkgname=stcflash
pkgname="$_pkgname-git"
pkgver=r34.791d246
pkgrel=1
pkgdesc="A command line programmer for STC 8051 microcontroller."
arch=('any')
url="https://github.com/laborer/stcflash"
license=('GPL')
depends=('python-pyserial')
makedepends=('git')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$_pkgname"::"git+https://github.com/laborer/stcflash.git")
md5sums=('SKIP')
pkgver() {
    cd "$_pkgname"
    (
        set -o pipefail
        git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}
build() {
    cd "$_pkgname"

    chmod +x stcflash.py
}
package() {
    cd "$_pkgname"

    mkdir -p "$pkgdir/usr/bin"
    cp stcflash.py "$pkgdir/usr/bin/stcflash"
}