summaryrefslogtreecommitdiff
path: root/community/simavr/PKGBUILD
blob: aa2e8370f8d0f4e17903203e61092c9d35ffb6aa (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
# Maintainer: schuay <jakob.gruber@gmail.com>

pkgname=simavr
pkgver=1.0
pkgrel=2
pkgdesc='A lean, mean and hackable AVR simulator'
arch=('i686' 'x86_64')
url="https://github.com/buserror-uk/simavr"
license=('GPL3')
depends=('elfutils')
makedepends=('avr-libc')
source=("https://github.com/downloads/buserror-uk/simavr/$pkgname-$pkgver.tar.bz2")
options=(!strip)

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # The original Makefile depends on git, hardcode the version until it's fixed upstream.
  sed -i "s/^\(SIMAVR_VERSION\).*/\1 = ${pkgver}/" simavr/Makefile

  make AVR_ROOT=/usr/avr SIMAVR_VERSION=1.0 \
      CFLAGS="-Wall -Wextra -fPIC -std=gnu99 -Wno-sign-compare -Wno-unused-parameter" \
      build-simavr
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make PREFIX="/usr" DESTDIR="$pkgdir/usr" install
}

md5sums=('82c9704a4e8569548f01931e32ebfe0c')