summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b65be3d8e3f2c1cc391c68da01a0d62be8aeeb72 (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
# Maintainer: Peter Ivanov <ivanovp@gmail.com>

pkgname=mphidflash
pkgver=20200505
pkgrel=2
pkgdesc="Flash utility for Microchip PIC microcontrollers with USB HID-Bootloader"
arch=("i686" "x86_64")
url="https://code.google.com/p/mphidflash"
license=("GPL3")
depends=(libusb)
makedepends=(svn gcc)
#options=('!strip')
source=("$pkgname::git+https://github.com/ApertureLabsLtd/mphidflash")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  git log -1 --format="%cd" --date=short | tr -d '-'
}

build() {
  cd "$srcdir/$pkgname"
  if [ $CARCH = i686 ]; then
    make mphidflash32
  else
    make mphidflash64
  fi
}

package() {
  cd "$srcdir/$pkgname/binaries"
  if [ $CARCH = i686 ]; then
    install -D mphidflash-1.6-linux-32 $pkgdir/usr/bin/mphidflash
  else
    install -D mphidflash-1.6-linux-64 $pkgdir/usr/bin/mphidflash
  fi
}

# vim:sw=2: