# Contributor: Sören Tempel # Maintainer: Marian Buschsieweke pkgname=openocd-esp32 pkgver=0_git20221007 _commit=f6c3cc469e43f676f5b9030859f7596f2057167c pkgrel=3 pkgdesc="Fork of OpenOCD with ESP32 support" url="https://github.com/espressif/openocd-esp32" arch="all" license="GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only" makedepends=" autoconf automake hidapi-dev jimtcl-dev libftdi1-dev libjaylink-dev libtool libusb-dev " subpackages="$pkgname-dev $pkgname-doc $pkgname-udev-rules:udev_rules" source="$pkgname-$pkgver.tar.gz::https://github.com/espressif/openocd-esp32/archive/$_commit.tar.gz fix-jimtcl-link.patch" builddir="$srcdir/openocd-esp32-$_commit" ## # XXX: Remove this aport when changes are upstreamed. ## prepare() { default_prepare ./bootstrap nosubmodule } build() { # --datadir: # avoid conflicts with upstream openocd to allow parallel installations ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --datadir=/usr/share/$pkgname \ --localstatedir=/var \ --disable-werror \ --disable-internal-jimtcl \ --disable-internal-libjaylink make } check() { make check } package() { make DESTDIR="$pkgdir" install install -Dm644 contrib/60-openocd.rules \ "$pkgdir"/lib/udev/rules.d/60-$pkgname.rules # allow parallel install with upstream openocd mv "$pkgdir"/usr/bin/openocd "$pkgdir"/usr/bin/$pkgname mv "$pkgdir"/usr/share/man/man1/openocd.1 \ "$pkgdir"/usr/share/man/man1/openocd-esp32.1 sed -e 's/openocd/openocd-esp32/g' -i \ "$pkgdir"/usr/share/man/man1/openocd-esp32.1 } udev_rules() { pkgdesc="udev rules for $pkgname" depends="!openocd-udev-rules" amove lib/udev/rules.d/60-$pkgname.rules } sha512sums=" c84d13c8a00ee7e9d587dd7eef7b71a909c7e1bc5214360b614606000b7e35ca04033d5dc4a1acc0b2b70c20985287b94b426224fe9077deb5f8a0665f8ebdfc openocd-esp32-0_git20221007.tar.gz 6fd2fbe11917bb7f181ba67812f63e75d51bcd19e4df6a7e22e1abb8f36a4f4bdc9202e815f560476ec184d54d84df8ae4dceb17f2429b9dc1d9503804dacb03 fix-jimtcl-link.patch "