1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/openocd-git/APKBUILD
Marian Buschsieweke bf38bcec4a testing/openocd-git: Resolve conflict with OpenOCD
Allow parallel installation with the release version of openocd.
2023-01-17 19:03:23 +00:00

85 lines
2.3 KiB
Text

# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
_pkgname=openocd
_commit=a7ea1ef0aa00920c7c7cb9282080e1d617eb9e81
pkgname=$_pkgname-git
pkgver=0_git20221015
pkgrel=2
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="
autoconf
automake
hidapi-dev
jimtcl-dev
libftdi1-dev
libjaylink-dev
libtool
libusb-dev
"
provides="openocd-virtual"
provider_priority=5
subpackages="$pkgname-dev $pkgname-doc"
# 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
fix-jimtcl-link.patch
"
builddir="$srcdir/$_pkgname-$_commit"
prepare() {
default_prepare
./bootstrap nosubmodule
}
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 \
--enable-sysfsgpio \
--enable-bcm2835gpio \
--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 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
}
sha512sums="
0733c1edc519f608d26ad8460a9c0d7adb3ea916bbaaac1e3cc52435e9da2d6373fcfcc17c11a8001826ebd0a999316849174fe78922ba75b0ce8c9ad8dac593 openocd-a7ea1ef0aa00920c7c7cb9282080e1d617eb9e81.tar.gz
6fd2fbe11917bb7f181ba67812f63e75d51bcd19e4df6a7e22e1abb8f36a4f4bdc9202e815f560476ec184d54d84df8ae4dceb17f2429b9dc1d9503804dacb03 fix-jimtcl-link.patch
"