summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ba3b7486d3e690e36eb7baa79bc8cb136b0b4bdb (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
# Maintainer: Mike Swanson <mikeonthecomputer@gmail.com>

pkgname=cc65-git
pkgver=2.18.r6.93b6efcb2
pkgrel=1
pkgdesc='C compiler for 6502 family microprocessors'
arch=('i686' 'x86_64')
makedepends=('git')
conflicts=('cc65')
provides=('cc65')
license=('BSD')
url='https://cc65.github.io/cc65/'
source=(git+https://github.com/cc65/cc65)
sha512sums=('SKIP')

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

  printf "%s" "$(git describe --tags --long --first-parent \
                 | sed 's/^V//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}

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

  make PREFIX=/usr
}

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

  make DESTDIR="$pkgdir" PREFIX=/usr install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/license"
}