summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiuyang liu2019-06-25 08:53:39 +0000
committerJiuyang liu2019-06-25 08:53:39 +0000
commit5cc3903087b46c0e66965581c4acd91032a93ffb (patch)
tree77a7aa2feae9bd564872a11178c86414df4ab6bb
downloadaur-5cc3903087b46c0e66965581c4acd91032a93ffb.tar.gz
init
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD44
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..558032924c8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = riscv-openocd-git
+ pkgdesc = Fork of OpenOCD that has RISC-V support
+ pkgver = 1
+ pkgrel = 1
+ url = https://github.com/riscv/riscv-openocd
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = automake>=1.11
+ makedepends = autoconf
+ makedepends = libtool
+ depends = libftdi
+ depends = hidapi
+ source = riscv-openocd-git::git+https://github.com/riscv/riscv-openocd.git#branch=riscv
+ sha1sums = SKIP
+
+pkgname = riscv-openocd-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1e339de8395
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Jiuyang Liu <liujiuyang1994@gmail.com>
+# Contributor: Emil Renner Berthing <aur@esmil.dk>
+
+pkgname=riscv-openocd-git
+pkgver=1
+pkgrel=1
+pkgdesc='Fork of OpenOCD that has RISC-V support'
+arch=('x86_64')
+url='https://github.com/riscv/riscv-openocd'
+license=('GPL')
+depends=('libftdi' 'hidapi')
+makedepends=('git' 'automake>=1.11' 'autoconf' 'libtool')
+source=("$pkgname::git+https://github.com/riscv/riscv-openocd.git#branch=riscv")
+sha1sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$srcdir/$pkgname"
+ git submodule update --init --recursive
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ ./bootstrap
+ ./configure \
+ --prefix=/usr \
+ --program-prefix=riscv64-linux-gnu \
+ --disable-werror \
+ --with-gnu-ld
+
+ make pkgdatadir="/usr/share/$pkgname"
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ make pkgdatadir="/usr/riscv64-linux-gnu/share/$pkgname" DESTDIR="$pkgdir" install
+ rm -r "$pkgdir/usr/share/info"
+}
+