summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad251782eb0d24a69c3ef24d9fa4dfb5f2099ed3 (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: Nathan Lilienthal <nathan@nixpulvis.com>
pkgname=avrm-git
pkgver=0.0.5.r39.g1f47881
pkgrel=1
pkgdesc="Bare metal AVR library and Makefile"
arch=('any')
url="https://github.com/nixpulvis/avrm"
depends=('avr-gcc' 'avr-binutils' 'avr-libc')
optdepends=('avrdude: for flashing code to devices')
makedepends=('git')
provides=('avrm')
conflicts=('avrm')
options=('!strip')
source=('git+https://github.com/nixpulvis/avrm')
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

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

package() {
	cd "$srcdir/${pkgname%-git}"
	make PREFIX="$pkgdir/usr/avr/" install

	# TODO: Fix this in avrm upstream.
	mkdir "$pkgdir/usr/avr/share"
	mv "$pkgdir/usr/avr/Makefile" "$pkgdir/usr/avr/share/Makefile"
}