aboutsummaryrefslogtreecommitdiffstats
path: root/community/stlink/APKBUILD
blob: f5fc200a5cbd1333ea4301500447147a9cee17a8 (plain)
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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=stlink
pkgver=1.5.1
pkgrel=0
pkgdesc="STM32 discovery line linux programmer"
url="https://github.com/texane/stlink"
arch="all"
license="MIT"
depends=""
depends_dev=""
makedepends="cmake libusb-dev"
install=""
options="!check" # upstream doesn't have automated tests
subpackages="$pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/texane/$pkgname/archive/v$pkgver.tar.gz"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS -Wno-error=cpp"
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	install -m644 README.md ChangeLog.md doc/tutorial.md \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="cabf7f6f5a6f3655206694f21162e0d9ac663bea07354186836695da888f2ddebe3871ea56580d1d4781d4c3dbf8a8459ab87ccbcd6f181f8e651ef58e22a372  stlink-1.5.1.tar.gz"