summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bcf3f94f59855c099a9ad447f3eaa52ad76258ce (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
# Maintainer: Matteo Bonora <bonora.matteo@gmail.com>
pkgname=srec-git
pkgver=r23.4bf276f
pkgrel=1
pkgdesc="Utilities to convert binary files to and from Motorola S-Record (SREC) format"
arch=(x86_64)
url="https://github.com/arkku/srec"
license=('MIT')
depends=()
makedepends=('git' 'clang')
provides=("${pkgname%-VCS}")
conflicts=("${pkgname%-VCS}")
source=("${pkgname%-git}::git+https://github.com/arkku/srec.git")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-git}"

  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/${pkgname%-git}"

  make
}

package() {
  cd "$srcdir/${pkgname%-git}"

  install -Dm755 "srec2bin" "$pkgdir/usr/bin/srec2bin"
  install -Dm755 "bin2srec" "$pkgdir/usr/bin/bin2srec"
}