summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3600c42ef71a0d327cb15d63662be99229723b25 (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
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
# Contributor: KafCoppelia <k740677208@gmail.com>

_pkgname=qstlink2
pkgname=${_pkgname}-git
pkgver=1.3.0.r263.b0d2fb8
pkgrel=1
pkgdesc="Cross-platform STLink v2 GUI"
arch=("any")
url="https://github.com/fpoussin/QStlink2"
license=("unknown")
depends=("qt5-base" "hidapi" "libusb" "gcc-libs" "glibc")
makedepends=("git")
optdepends=('stlink: udev rules')
source=("${_pkgname}::git+https://github.com/fpoussin/QStlink2.git"
        "qtusb::git+https://github.com/fpoussin/QtUsb.git")
options=("!strip")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd ${_pkgname}
  local ver="$(sed -e $'s/\r//' QStlink2.pro | grep ^VERSION | awk '{print $3}')"
  echo "$ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  cd ${_pkgname}
  git submodule init
  git config submodule.QtUsb.url ${srcdir}/qtusb
  git -c protocol.file.allow=always submodule update
}

build() {
  cd ${_pkgname}
  qmake-qt5
  make
}

package() {
  cd ${_pkgname}
  make INSTALL_ROOT=${pkgdir} install
  rm -rf ${pkgdir}/etc/udev
  rmdir ${pkgdir}/etc
}