diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 42 |
3 files changed, 34 insertions, 27 deletions
@@ -1,11 +1,9 @@ -pkgbase = simavr +pkgbase = simavr-git pkgdesc = A lean, mean and hackable AVR simulator - pkgver = 1.5 + pkgver = 1.6.0.20 pkgrel = 1 url = https://github.com/buserror/simavr - arch = i686 arch = x86_64 - arch = armv7h license = GPL3 makedepends = avr-libc makedepends = git @@ -16,13 +14,14 @@ pkgbase = simavr conflicts = simavr replaces = simavr options = !strip - source = simavr::git+https://github.com/buserror/simavr.git#tag=v1.5 + source = simavr-git::git+https://github.com/buserror/simavr.git md5sums = SKIP -pkgname = simavr-asc +pkgname = simavr-git -pkgname = simavr-asc-examples - depends = simavr-asc=1.5 +pkgname = simavr-git-examples + depends = simavr-git=1.6.0.20 depends = freeglut depends = glu + provides = simavr-git-examples diff --git a/.gitignore b/.gitignore index 425953b16b44..20ea63006d45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -simavr +simavr-git +pkg +src *.xz @@ -1,16 +1,17 @@ # Maintainer: PAPPY <pappy _AT_ a s c e l i o n _DOT_ com> -pkgbase=simavr -pkgname=(simavr-asc simavr-asc-examples) -pkgver=1.5 +_pkgname=simavr +pkgbase=$_pkgname-git +pkgname=($pkgbase $pkgbase-examples) +pkgver=1.6.0.20 pkgrel=1 pkgdesc='A lean, mean and hackable AVR simulator' -arch=('i686' 'x86_64' 'armv7h') +arch=('x86_64') url="https://github.com/buserror/simavr" license=('GPL3') depends=('elfutils') makedepends=('avr-libc' 'git' 'freeglut' 'glu') -source=("${pkgbase}::git+https://github.com/buserror/simavr.git") +source=("$pkgbase::git+https://github.com/buserror/simavr.git") options=(!strip) md5sums=('SKIP') provides=(simavr) @@ -19,13 +20,16 @@ replaces=(simavr) pkgver() { - cd "$srcdir/$pkgbase" - git log -1 --tags --simplify-by-decoration --pretty="format:%d"|sed 's/[\(\) ]//g; s/.*tag:v//' + cd $srcdir/$pkgbase + + xtag=$(git log -1 --tags --simplify-by-decoration --pretty="format:%d"|sed 's/[\(\) ]//g; s/.*tag:v//') + + echo $xtag.0.$(git rev-list v${xtag}.. --count ) } prepare() { - cd "$srcdir/$pkgbase" + cd $srcdir/$pkgbase cat <<-EOF > .make.options V=1 @@ -35,25 +39,27 @@ prepare() } build() { - cd "$srcdir/$pkgbase" + cd $srcdir/$pkgbase make AVR_ROOT=/usr/avr RELEASE=1 \ CFLAGS="-Wall -Wextra -fPIC -O2 -std=gnu99 -Wno-sign-compare -Wno-unused-parameter" \ build-simavr build-examples } -package_simavr-asc() { - cd "$srcdir/$pkgbase" +eval 'package_'$pkgbase'() { + cd $srcdir/$pkgbase + make PREFIX="/usr" DESTDIR="$pkgdir/usr" RELEASE=1 install } +' + +eval 'package_'$pkgbase'-examples() { + depends=($pkgbase=$pkgver freeglut glu) + provides=($pkgbase-examples) + + cd $srcdir/$pkgbase -package_simavr-asc-examples() { - depends=(simavr-asc=$pkgver freeglut glu) - provides=(simavr-examples) - conflicts=(simavr-examples) - replaces=(simavr-examples) - cd "$srcdir/$pkgbase" install -d $pkgdir/usr/share/doc cp -r examples $pkgdir/usr/share/doc/$pkgbase } - +' |