aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-04-13 22:14:18 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-04-14 03:36:02 +0000
commit21cd8bb9e7a0e8d0cd8827585363c09871acfcf4 (patch)
tree825f06e8feccf0ad73cd8b3eab066c3c466ab7d1
parent6c61cc7c5c5014df0c3004b55437e8f90f0b3261 (diff)
downloadaports-21cd8bb9e7a0e8d0cd8827585363c09871acfcf4.tar.gz
aports-21cd8bb9e7a0e8d0cd8827585363c09871acfcf4.tar.bz2
aports-21cd8bb9e7a0e8d0cd8827585363c09871acfcf4.tar.xz
community/stlink: fix location of udev rules
-rw-r--r--community/stlink/APKBUILD29
1 files changed, 14 insertions, 15 deletions
diff --git a/community/stlink/APKBUILD b/community/stlink/APKBUILD
index 83b0adf544..b4bae7cbdd 100644
--- a/community/stlink/APKBUILD
+++ b/community/stlink/APKBUILD
@@ -2,39 +2,38 @@
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=stlink
pkgver=1.6.0
-pkgrel=1
+pkgrel=2
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"
+source="$pkgname-$pkgver.tar.gz::https://github.com/texane/stlink/archive/v$pkgver.tar.gz"
-builddir="$srcdir"/$pkgname-$pkgver
build() {
- cd "$builddir"
- cmake \
+ 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 \
- -DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
- -DCMAKE_BUILD_TYPE=None \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
- -DCMAKE_C_FLAGS="$CFLAGS -Wno-error=cpp"
- make
+ -DCMAKE_C_FLAGS="$CFLAGS -Wno-error=cpp" \
+ $CMAKE_CROSSOPTS .
+ make -C build
}
package() {
- cd "$builddir"
- make DESTDIR="$pkgdir" install
+ 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"