diff options
author | Nathan Lilienthal | 2018-07-09 00:27:47 -0400 |
---|---|---|
committer | Nathan Lilienthal | 2018-07-09 00:27:47 -0400 |
commit | e65a19e358b10d6b4ba9a0ad21d56edff8718b1c (patch) | |
tree | b65d12609d47300c24b0e8db10f75b3cdde1c370 /PKGBUILD | |
download | aur-e65a19e358b10d6b4ba9a0ad21d56edff8718b1c.tar.gz |
First cut of my avrm AUR package.
Depending on how I decide to handle macOS builds, this could simplify
the Makefile in the project a lot. Ideally minimal changes to macOS are
needed.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ad251782eb0d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,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" +} |