summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorpappy2017-04-02 14:57:59 +0300
committerpappy2018-06-18 13:10:40 +0300
commite65f3aeb9a3f2536d7f4b64e6e556519f3c4dd97 (patch)
treef5fc21ecdf40aa6bc24158e581f499dbe22de490
parentd3cc13a9fe777a1dcb49181f15b044d9284ab376 (diff)
downloadaur-e65f3aeb9a3f2536d7f4b64e6e556519f3c4dd97.tar.gz
use git version
-rw-r--r--PKGBUILD45
1 files changed, 31 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9cf74546966..510832c6337 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,33 +10,50 @@ 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#tag=v${pkgver}")
+source=("${pkgbase}::git+https://github.com/buserror/simavr.git")
options=(!strip)
md5sums=('SKIP')
provides=(simavr)
conflicts=(simavr)
replaces=(simavr)
+pkgver()
+{
+ cd "$srcdir/$pkgbase"
+ git log -1 --tags --simplify-by-decoration --pretty="format:%d"|sed 's/[\(\) ]//g; s/.*tag:v//'
+}
+
+prepare()
+{
+ cd "$srcdir/$pkgbase"
+
+ cat <<-EOF > .make.options
+ V=1
+ RELEASE=1
+ CPPFLAGS=-DCONFIG_SIMAVR_TRACE=1
+ EOF
+}
+
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
+ 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"
- make PREFIX="/usr" DESTDIR="$pkgdir/usr" install
+ cd "$srcdir/$pkgbase"
+ make PREFIX="/usr" DESTDIR="$pkgdir/usr" RELEASE=1 install
}
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
+ 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
}