aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openocd-git/APKBUILD
blob: 701641c693fc98d2bcc2490374ffde06af819daa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
_pkgname=openocd
_commit=b40dc09dd9e05497bf956ca91f7153aa34b24854
_jimtcl_commit=fb923fab4f0cf276c336d98692d00df6a943791d
_libjaylink_commit=9aa7a5957c07bb6e862fc1a6d3153d109c7407e4
pkgname=$_pkgname-git
pkgver=20210531
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 libtool autoconf automake"
provides="openocd"
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/ntfreak/openocd/archive/$_commit.tar.gz
	jimtcl-$_jimtcl_commit.tar.gz::https://github.com/msteveb/jimtcl/archive/$_jimtcl_commit.tar.gz
	libjaylink-$_libjaylink_commit.tar.gz::https://repo.or.cz/libjaylink.git/snapshot/$_libjaylink_commit.tar.gz
	"
builddir="$srcdir/$_pkgname-$_commit"

prepare() {
	default_prepare
	rmdir jimtcl
	ln -s ../jimtcl-$_jimtcl_commit jimtcl
	rmdir src/jtag/drivers/libjaylink
	ln -s "../../../../libjaylink-${_libjaylink_commit:0:7}" src/jtag/drivers/libjaylink
	./bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-werror \
		--enable-cmsis-dap \
		--enable-sysfsgpio \
		--enable-bcm2835gpio
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
9dec672178e939ffb58e600cbc4b628a63773feaf115ebc9a54bcebadd353ad1e8473c92c9c1f9f3c43ad852468121ffb941c10f7adeea510af36e2b0f031f04  openocd-b40dc09dd9e05497bf956ca91f7153aa34b24854.tar.gz
faa6a1e490715da83bac3f7e5115d53803a50401689b4e36f7694598470d263e4ce8744647d11e6c2b2d8e10eae08d6213f31b0b883848b67659ef93cb8f3ed9  jimtcl-fb923fab4f0cf276c336d98692d00df6a943791d.tar.gz
bf7f342033e79fde5a023661b90deb2b9b7de4ba94fa79cca8b0ae00c6f335ed4b14554dbef8bfcf87b69484508ad7ac9aab8d35b1e3028ad00e2ac29e948fe9  libjaylink-9aa7a5957c07bb6e862fc1a6d3153d109c7407e4.tar.gz
"