aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openocd-git/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/openocd-git/APKBUILD')
-rw-r--r--testing/openocd-git/APKBUILD62
1 files changed, 51 insertions, 11 deletions
diff --git a/testing/openocd-git/APKBUILD b/testing/openocd-git/APKBUILD
index 00778d41989..0f10268041b 100644
--- a/testing/openocd-git/APKBUILD
+++ b/testing/openocd-git/APKBUILD
@@ -1,22 +1,37 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
_pkgname=openocd
-_commit=28c91b8f80937e6ec6521496f363038d9a5f9a04
+_commit=ea2e26f7d521f5755b4bfda7bf12d99650277421
pkgname=$_pkgname-git
-pkgver=20210702
-pkgrel=1
+pkgver=0_git20240113
+pkgrel=0
pkgdesc="Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing"
url="http://openocd.org/"
arch="all"
license="GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only"
-makedepends="libftdi1-dev libusb-dev hidapi-dev jimtcl-dev
- libjaylink-dev libtool autoconf automake"
-provides="openocd"
-subpackages="$pkgname-dev $pkgname-doc"
+makedepends="
+ autoconf
+ automake
+ hidapi-dev
+ jimtcl-dev
+ libftdi1-dev
+ libjaylink-dev
+ libtool
+ libusb-dev
+ "
+subpackages="
+ $pkgname-dbg
+ $pkgname-dev
+ $pkgname-doc
+ $pkgname-udev-rules:udev_rules:noarch
+ $pkgname-cmd-openocd:symlink:noarch
+ "
# Note: Using a github mirror here as sourceforge git snapshots have changing checksums
-source="$_pkgname-$_commit.tar.gz::https://github.com/openocd-org/openocd/archive/$_commit.tar.gz
+source="
+ $_pkgname-$_commit.tar.gz::https://github.com/openocd-org/openocd/archive/$_commit.tar.gz
+
fix-jimtcl-link.patch
- fix-dynamic-linking.patch"
+ "
builddir="$srcdir/$_pkgname-$_commit"
prepare() {
@@ -25,12 +40,16 @@ prepare() {
}
build() {
+ # --datadir:
+ # avoid conflicts with release version of 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 \
--enable-cmsis-dap \
@@ -47,10 +66,31 @@ check() {
package() {
make DESTDIR="$pkgdir" install
+ install -Dm644 contrib/60-openocd.rules \
+ "$pkgdir"/lib/udev/rules.d/60-$pkgname.rules
+
+ # allow parallel install with release openocd
+ mv "$pkgdir"/usr/bin/openocd "$pkgdir"/usr/bin/$pkgname
+ mv "$pkgdir"/usr/share/man/man1/openocd.1 \
+ "$pkgdir"/usr/share/man/man1/openocd-git.1
+ sed -e 's/openocd/openocd-git/g' -i \
+ "$pkgdir"/usr/share/man/man1/openocd-git.1
+}
+
+udev_rules() {
+ pkgdesc="udev rules for $pkgname"
+ depends="!openocd-udev-rules"
+ amove lib/udev/rules.d/60-$pkgname.rules
+}
+
+symlink() {
+ pkgdesc="provide the 'openocd' cmd as symlink to 'openocd-git'"
+ depends="$pkgname=$pkgver-r$pkgrel"
+ mkdir -p "$subpkgdir"/usr/bin/
+ ln -s openocd-git "$subpkgdir"/usr/bin/openocd
}
sha512sums="
-c1f02277262ec3cc168b18a71d436a123f08e5246e35f94e37c922618c9d91e34b8ca525eed1f93a2ce37315f23c6d9a6a8f88ca4c2bc16bc3e432127ffcd70d openocd-28c91b8f80937e6ec6521496f363038d9a5f9a04.tar.gz
+82ecf9ca084adef91f88425c0f8d35ba5939ccee4086e11559b98e21a0287c1fca7c8f20b25a7d650458319a10c106fd484616ffef6f9dd6dd3d3bc847bc8317 openocd-ea2e26f7d521f5755b4bfda7bf12d99650277421.tar.gz
6fd2fbe11917bb7f181ba67812f63e75d51bcd19e4df6a7e22e1abb8f36a4f4bdc9202e815f560476ec184d54d84df8ae4dceb17f2429b9dc1d9503804dacb03 fix-jimtcl-link.patch
-a0980806af54bafd759c2e329cd11eabf0eb352f7f823966ab0f4a60508559fb7abd41072c0a882da0906ddf086ee139115deca04bb1a70ab915b50a1d3fc2e7 fix-dynamic-linking.patch
"