summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorABDULLATIF Mouhamadi2017-05-22 22:56:29 +0200
committerABDULLATIF Mouhamadi2017-05-22 22:56:29 +0200
commit0685240bb722b738ab01f73bd358ac3a11cb9405 (patch)
tree675ac45e43fc191da0b2afebf6e79aa7eb4a2517
downloadaur-tinyos-tools.tar.gz
first commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD77
-rw-r--r--new-pacman-not-symlink-but-realpath.patch10
3 files changed, 110 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..31e68abd42c0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = tinyos-tools
+ pkgdesc = Development-tools for TinyOS
+ pkgver = 1.4.2
+ pkgrel = 1
+ url = http://www.tinyos.net/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = which
+ depends = python2
+ depends = perl
+ depends = bash
+ depends = nesc
+ depends = java-runtime
+ depends = tinyos
+ options = !libtool
+ source = http://tinyos.stanford.edu/tinyos/dists/source/tinyos-tools-1.4.2.tar.gz
+ source = new-pacman-not-symlink-but-realpath.patch
+ md5sums = 8dddae18128ce26258090c01cea46c0b
+ md5sums = a30efc6f2215e6b0878b7c4ecfca501e
+
+pkgname = tinyos-tools
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..752af39818a8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,77 @@
+# Maintainer: ABDULLATIF Mouhamadi <bourou01dev@gmail.com>
+pkgname=tinyos-tools
+pkgver=1.4.2
+pkgrel=1
+pkgdesc="Development-tools for TinyOS"
+arch=('i686' 'x86_64')
+license=('GPL')
+options=(!libtool)
+url="http://www.tinyos.net/"
+depends=('python2' 'perl' 'bash' 'nesc' 'java-runtime' 'tinyos')
+makedepends=('which')
+source=("http://tinyos.stanford.edu/tinyos/dists/source/${pkgname}-${pkgver}.tar.gz"
+ "new-pacman-not-symlink-but-realpath.patch")
+md5sums=('8dddae18128ce26258090c01cea46c0b'
+ 'a30efc6f2215e6b0878b7c4ecfca501e')
+
+
+
+prepare() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -p0 -i "${srcdir}/new-pacman-not-symlink-but-realpath.patch"
+}
+
+
+build() {
+ #don't build the libraries for both architecture
+ if [ "${CARCH}" == "x86_64" ]; then
+ sed -i 's/JNIVERSIONS="-32. -64."/JNIVERSIONS="-64."/' ${srcdir}/${pkgname}-${pkgver}/tools/configure.ac
+ else
+ sed -i 's/JNIVERSIONS="-32. -64."/JNIVERSIONS="-32."/' ${srcdir}/${pkgname}-${pkgver}/tools/configure.ac
+ fi
+
+ #change python to python2 where needed
+ sed -i 's/ python/ python2/' ${srcdir}/${pkgname}-${pkgver}/tools/configure.ac
+ #this is not needed anymore, but I leave it as a comment. someone might forget about @pathpython@ again
+# for pyfile in `grep -ld recurse '#!.*[/, ]python' *`
+# do
+# sed -i 's/#!.*python/#!\/usr\/bin\/env python2/' $pyfile
+# done
+
+ #setting up tinyos variables if needed
+ if [ "${TOSDIR}" == "" ]; then
+ if [ -f /etc/profile.d/tinyos.sh ]; then
+ source /etc/profile.d/tinyos.sh
+ fi
+ fi
+
+ #AM_CONFIG_HEADER is obsolate
+ sed -i s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/ `find | grep configure.in`
+
+ cd ${srcdir}/${pkgname}-${pkgver}/tools/
+ ./Bootstrap
+ cd ${srcdir}/${pkgname}-${pkgver}/tools
+ ./configure --prefix=/usr
+ make || return 1
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}/tools
+ make DESTDIR="${pkgdir}/" install
+
+
+ jni=${pkgdir}`/${pkgdir}/usr/bin/tos-locate-jre --jni`
+ if [ $? -eq 0 ]; then
+ if [ "${CARCH}" = "x86_64" ]; then
+ bits=64
+ else
+ bits=32
+ fi
+ echo "Installing $bits-bit Java JNI code in $jni ... "
+ for lib in ${pkgdir}/usr/lib/tinyos/*.so; do
+ realname=`basename $lib | sed -e s/-$bits\.so/.so/`
+ install -D $lib "$jni/$realname" || exit 1
+ done
+ echo "done."
+ fi
+}
diff --git a/new-pacman-not-symlink-but-realpath.patch b/new-pacman-not-symlink-but-realpath.patch
new file mode 100644
index 000000000000..f6f93e85ca33
--- /dev/null
+++ b/new-pacman-not-symlink-but-realpath.patch
@@ -0,0 +1,10 @@
+--- tools/tinyos/misc/tos-locate-jre 2012-03-29 16:19:30.000000000 +0200
++++ tools/tinyos/misc/tos-locate-jre.new 2017-04-25 09:01:43.968079000 +0200
+@@ -32,6 +32,7 @@
+ while [ -n "$javapath" -a -h "$javapath" ]; do
+ javapath=`readlink -q $javapath`
+ done
++ javapath=`realpath $javapath`
+ test -n "$javapath"
+ }
+