diff options
author | M1cha | 2017-09-30 20:29:54 +0200 |
---|---|---|
committer | M1cha | 2017-09-30 20:29:54 +0200 |
commit | 43352c2ad29260db32d6e946a7424a21d186d031 (patch) | |
tree | 22a61e205bf929750cdde16d6e2777332c81fb4f /PKGBUILD | |
download | aur-esp32-openocd.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e467e4c3ff5e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Michael Zimmermann <sigmaepsilon92@gmail.com> +# Contributor: Emil Renner Berthing <aur@esmil.dk> +# Contributor: yhfudev <yhfudev ta gmail dot com> +# Contributor: veox <veox ta wemakethings dot net> +# Contributor: Nick Østergaard <oe.nick at gmail dot com> +# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> +# Contributor: Matthias Bauch <matthias.bauch@gmail.com> +# Contributor: Laszlo Papp <djszapi2 at gmail com> +# Contributor: Samuel Tardieu <sam@rfc1149.net> + +pkgname=esp32-openocd +pkgver=0.10.0.dev.g77b10c51 +pkgrel=1 +pkgdesc='Fork of OpenOCD that has ESP32 support' +arch=('i686' 'x86_64' 'arm') +url='https://github.com/espressif/openocd-esp32' +license=('GPL') +depends=('libftdi' 'libftdi-compat' 'libusb' 'libusb-compat' 'hidapi' ) +makedepends=('git' 'automake>=1.11' 'autoconf' 'libtool' 'tcl') +options=(!strip) + +source=( + "$pkgname::git+https://github.com/espressif/openocd-esp32.git" + ) +md5sums=( + 'SKIP' + ) +sha1sums=( + 'SKIP' + ) + +pkgver() { + cd "$srcdir/$pkgname" + local ver="$(cat configure.ac | grep AC_INIT | cut -d'[' -f3 | cut -d']' -f1)" + local rev="$(./guess-rev.sh)" + echo "${ver/-/.}${rev/-/.}" +} + +prepare() { + cd "$srcdir/$pkgname" + git submodule init + git submodule update +} + +build() { + cd "$srcdir/$pkgname" + + ./bootstrap + ./configure \ + --prefix=/usr \ + --program-prefix=${pkgname%openocd} \ + --disable-werror \ + --with-gnu-ld + + make pkgdatadir="/usr/share/$pkgname" +} + +package() { + cd "$srcdir/$pkgname" + + make pkgdatadir="/usr/share/$pkgname" DESTDIR="$pkgdir" install + + rm -r "$pkgdir/usr/share/info" +} |