blob: a35991c9788e8cff22ff63cebb117fe4262d0ec5 (
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
41
42
43
44
45
46
47
48
|
# Maintainer: Uffe Jakobsen <_uffe_|_at_|_uffe_|_dot_|_org_>
pkgname=stlink-tool-git
_pkgname=stlink-tool
pkgver=r21.8cbdffe
pkgrel=2
pkgdesc="Tool for flashing chinese ST-Link dongles"
arch=('i686' 'x86_64')
url="https://github.com/UweBonnes/stlink-tool"
license=('GPL')
source=('git+https://github.com/UweBonnes/stlink-tool.git')
depends=('libusb')
makedepends=('git')
provides=('stlink-tool')
sha256sums=('SKIP')
pkgver()
{
cd "${_pkgname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare()
{
cd "${srcdir}/${_pkgname}"
git submodule init
git submodule update
}
build()
{
cd "${srcdir}/${_pkgname}"
make
}
package()
{
cd "${srcdir}/${_pkgname}/"
install -D -m755 stlink-tool "${pkgdir}/usr/bin/stlink-tool"
# udev rules: trigger cheap (China) STLink v2 clones to leave bootloader upon insertion and start flashed BlackMagic firmware/app
install -D -m644 "${startdir}/stlink-tool.rules" "${pkgdir}/usr/share/${_pkgname}/udev/rules/stlink-tool.rules"
ln -s stlink-tool.rules "${pkgdir}/usr/share/${_pkgname}/udev/rules/98-stlink-tool.rules"
}
#
# EOF
#
|