1 # Contributor: Jens Staal <staal1978@gmail.com>
5 pkgdesc="Java-based educational tool for creating web-based exercises"
6 url="http://hotpot.uvic.ca/"
8 license=('Custom:freeware')
9 depends=('java-runtime' 'unionfs-fuse')
10 source=("http://hotpot.uvic.ca/javahotpot61.zip" "hpheader6.gif")
11 md5sums=('8283f6a693bb144858e055e254836448' '1394f2cdf4663a2845ccade535922213')
12 _exe=('JavaHotPotatoes6.app/Contents/Resources/Java/hotpot6.jar')
14 _icon=('hpheader6.gif')
17 # copy .jar files and icon
18 mkdir -p $pkgdir/usr/share/java/$_pkgabbrev
19 cp -r $srcdir/javahotpot/* $pkgdir/usr/share/java/$_pkgabbrev
20 cp -r $_icon $pkgdir/usr/share/java/$_pkgabbrev
23 # set-up a per-user start script and a .desktop file
28 if whereis unionfs-fuse>/dev/null 2>&1;
30 if whereis jar>/dev/null 2>&1;
33 mkdir ~/.$_pkgabbrev.tmp
34 unionfs -o cow -o umask=000 ~/.$_pkgabbrev=RW:/usr/share/java/$_pkgabbrev=RO ~/.$_pkgabbrev.tmp
35 java -jar ~/.$_pkgabbrev.tmp/$_exe
36 fusermount -u ~/.$_pkgabbrev.tmp
38 echo '==> Please make sure to have a java runtime installed and have it in your PATH array.'
41 echo '==> Please make sure to have unionfs-fuse installed and have it in your PATH array.'
43 return \$?" >> /$pkgdir/usr/bin/$_pkgabbrev.sh
45 chmod +x /$pkgdir/usr/bin/$_pkgabbrev.sh
46 ln -s $_pkgabbrev.sh /$pkgdir/usr/bin/$_pkgabbrev
48 # Automatic generation of a .desktop file
50 mkdir -p -m644 $pkgdir/usr/share/
51 mkdir -p -m644 $pkgdir/usr/share/applications/
53 printf "[Desktop Entry]
58 Exec=/usr/bin/$_pkgabbrev
59 Icon=/usr/share/java/$_pkgabbrev/$_icon
62 StartupNotify=false" >> /$pkgdir/usr/share/applications/$_pkgabbrev.desktop
65 # Install licence file
67 install -D -m0644 $srcdir/javahotpot/ReadMe6-1-0-5.txt $pkgdir/usr/share/licenses/$_pkgabbrev/ReadMe6-1-0-5.txt