diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 34 |
2 files changed, 50 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bc352b1d13d4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = stcflash-git + pkgdesc = A command line programmer for STC 8051 microcontroller. + pkgver = r34.791d246 + pkgrel = 1 + url = https://github.com/laborer/stcflash + arch = any + license = GPL + makedepends = git + depends = python-pyserial + provides = stcflash + conflicts = stcflash + source = stcflash::git+https://github.com/laborer/stcflash.git + md5sums = SKIP + +pkgname = stcflash-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2bce64b51dda --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,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" +} |