1 # Original contributor: Bob Finch <w9ya@qrpqrci.net>
5 pkgdesc="Software solutions for high powered rocketry avionics"
7 url="http://www.altusmetrum.org/AltOS/"
11 depends=('openssl>=1.0.0' 'libusb1' 'plplot-svn' 'nickle' 'flite' 'kernel26>=2.6.33' 'fop'\
12 'gconf' 'alsa-oss' 'swig' 'libglade' 'freetts' 'jdk>=6u21' 'jfreechart' 'jcommon')
13 makedepends=('git' 'docbook-xsl=1.76.0' 'sdcc=2.9.0-2_patched' 'nsis' 'tar' 'gzip' 'zip')
14 optdepends=('uucp: cu is included & is a bare boned terminal 2 serial program'
15 'cutemon: gui-based minimal terminal to serial program'
16 'google-earth: useful for viewing the kml files of the flight path')
19 _gitroot="git://git.gag.com/fw/altos"
26 msg "Connecting to GIT server...."
28 if [ -d $_gitname ] ; then
29 cd $_gitname && git pull origin
30 msg "The local files are updated."
35 msg "GIT checkout done or server timeout"
36 msg "Starting make..."
38 rm -rf "$srcdir/$_gitname-build"
39 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
45 sh /etc/profile.d/jdk.sh
47 cd "$srcdir/$_gitname-build"
48 ./autogen.sh --prefix=/usr --with-jvm=/opt/java/include/\
49 --with-freetts=/usr/share/java/freetts/lib --with-jcommon=/usr/share/java/jcommon/lib\
50 --with-jfreechart=/usr/share/java/jfreechart/lib\
51 # --with-fat-dir=$srcdir
52 # Use this ^ for placing all 3 "fat" packages (linux,mac,windows) into a numbered dir.
54 cd "$srcdir/$_gitname-build/$_pkgname/"
55 sed -i 's:\$(datadir)/java:\$(datadir)/java/altos:' Makefile
56 # This ^ places altosui.jar in an 'altos' subdirectory.
57 sed -i 's:\${exec_prefix}/bin:\${exec_prefix}/share/java/altos:' Makefile
58 # This ^ relocates altosui to allow for an aoss wrapper script.
59 sed -i 's|:/usr/share/java/\*|:/usr/share/java/*:$(JCOMMON)/*:$(JFREECHART)/*|' Makefile
60 # This ^ fixes compilation to include reference to jcommon.jar .
61 sed -i 's:cp -p $(JFREECHART_CLASS):cp -p $(JFREECHART_CLASS) $(JCOMMON_CLASS):' Makefile
62 # This ^ includes jcommon.jar in the macosx fat package.
64 cd "$srcdir/$_gitname-build/$_pkgname/$_libname/"
65 sed -i 's:$(JVM_INCLUDE):/opt/java/include\ -I/opt/java/include/linux:' Makefile
66 # This ^ enables both jni.h and jni_md.h to be found as required.
68 cd "$srcdir/$_gitname-build/doc"
69 sed -i 's:stylesheet/docbook-xsl:xsl-stylesheets-1.76.0:' Makefile
70 # This ^ fixes archlinux's use of a specfic reference.
72 cd "$srcdir/$_gitname-build"
75 cd "$srcdir/$_gitname-build/doc"
78 cd "$srcdir/$_gitname-build/$_pkgname"
83 cd "$srcdir/$_gitname-build"
84 make DESTDIR="$pkgdir/" install
86 mkdir -p $startdir/pkg/usr/share/altos
87 install -m 644 src/telemetrum-v1.0-* $startdir/pkg/usr/share/altos/
88 install -m 644 src/teledongle-v0.2-* $startdir/pkg/usr/share/altos/
90 mkdir -p $startdir/pkg/usr/share/pixmaps
91 mkdir -p $startdir/pkg/usr/share/applications
92 install -m644 debian/*.xpm $startdir/pkg/usr/share/pixmaps
93 install -m644 debian/*.desktop $startdir/pkg/usr/share/applications
95 echo "#!/bin/sh" > holding.bin
96 echo ". aoss /usr/share/java/altos/altosui" >> holding.bin
97 install -D -m 755 holding.bin $startdir/pkg/usr/bin/$_pkgname
99 mkdir -p $startdir/pkg/usr/share/doc/altos
100 install -m 644 doc/*.html $startdir/pkg/usr/share/doc/altos/
101 install -m 644 doc/*.pdf $startdir/pkg/usr/share/doc/altos/