summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bec576cd5d0562a24b3db4565557c24661a6df82 (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
# Maintainer: Vaporeon <vaporeon@vaporeon.io>

pkgname=ems-flasher-git
pkgver=r136.739c120
pkgrel=1
pkgdesc='Utility to flash ROM images to the EMS USB 64 mbit gameboy flash cart on Linux'
url="https://github.com/mikeryan/ems-flasher"
license=("MIT")
arch=('i686' 'x86_64')
makedepends=('git')
depends=('libusb')
conflicts=('ems-flasher')
provides=('ems-flasher')
source=("git+https://github.com/mikeryan/ems-flasher.git")
md5sums=('SKIP')

pkgver() {
  cd ems-flasher
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir"/ems-flasher
  ./config.sh --prefix /usr
  make
}

package() {
  cd "$srcdir"/ems-flasher
  install -d "$pkgdir"/usr/{bin,share/{man/man1,ems-flasher},lib/udev/rules.d}
  make BINDIR="$pkgdir"/usr/bin \
       DATADIR="$pkgdir"/usr/share/ems-flasher \
       MANDIR="$pkgdir"/usr/share/man \
       UDEVRULESDIR="" \
       install
  install -Dm644 50_ems_gb_flash.rules "${pkgdir}/usr/lib/udev/rules.d/50_ems_gb_flash.rules"
}