blob: b4bae7cbdda1f9027b17fc06dfa4b10a8a4a95a6 (
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
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=stlink
pkgver=1.6.0
pkgrel=2
pkgdesc="STM32 discovery line linux programmer"
url="https://github.com/texane/stlink"
arch="all"
license="MIT"
makedepends="cmake libusb-dev"
options="!check" # upstream doesn't have automated tests
subpackages="$pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/texane/stlink/archive/v$pkgver.tar.gz"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_C_FLAGS="$CFLAGS -Wno-error=cpp" \
$CMAKE_CROSSOPTS .
make -C build
}
package() {
make -C build DESTDIR="$pkgdir" install
mkdir -p "$pkgdir"/usr/share/doc/$pkgname
install -m644 README.md CHANGELOG.md doc/tutorial.md \
"$pkgdir"/usr/share/doc/$pkgname/
mkdir -p "$pkgdir"/usr/lib/udev
mv "$pkgdir"/etc/udev/rules.d "$pkgdir"/usr/lib/udev
}
sha512sums="0bf2416dac69e490560063714d630c4f549568bd9047113fb334f0841f5db23b97876307be8f0b1731863a2438c9502b9916d0d652c516d50969cb8b2cfa1a15 stlink-1.6.0.tar.gz"
|