summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcoderbaka2019-04-14 12:41:55 +0800
committercoderbaka2019-04-14 12:41:55 +0800
commit2fc22cedc19ac0d588e30fa0e6b1168ec0389102 (patch)
tree60ae214efa87aa9260ec9c9c585c2885146f0de5
downloadaur-stcflash-git.tar.gz
first init
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD34
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"
+}