1 # Contributor: Eric Forgeot < http://ifiction.free.fr >
5 pkgdesc="Qglk is an implementation of glk using Qt. Included IF interpreters are glulxe, nitfol, magnetic and level9."
7 url="http://www.bubblycloud.com/qglk/"
9 source=(http://www.bubblycloud.com/qglk/${pkgname}-src-${pkgver}.tar.gz
10 http://mirror.ifarchive.org/if-archive/magnetic-scrolls/interpreters/magnetic/Magnetic23Src.zip
11 http://mirror.ifarchive.org/if-archive/level9/interpreters/level9/Level9_4.1_Source.zip)
15 md5sums=('82c704b480d150b25e4b35c021a2d94c'
16 '74b0d027c6a70e39d9447f12c215e8a9'
17 '820b4eac7b80aea134ede8194301f8b9')
20 #creating the qglk lib
21 cd $srcdir/${pkgname}-src-${pkgver}
24 #compiling glulxe and nitfol
26 cd $srcdir/${pkgname}-src-${pkgver}/terps
30 unzip $srcdir/../Magnetic23Src.zip -d $srcdir/${pkgname}-src-${pkgver}/terps/magnetic
31 cd $srcdir/${pkgname}-src-${pkgver}/terps/magnetic/Glk
33 make GLKINCDIR=$srcdir/${pkgname}-src-${pkgver}/include GLKLIBDIR=$srcdir/${pkgname}-src-${pkgver}/lib GLKMAKEINC=$srcdir/${pkgname}-src-${pkgver}/include/Make.qglk -f Makefile.glk glkmagnetic
36 unzip $srcdir/../Level9_4.1_Source -d $srcdir/${pkgname}-src-${pkgver}/terps/level9
37 cd $srcdir/${pkgname}-src-${pkgver}/terps/level9/Glk
39 make GLKINCDIR=$srcdir/${pkgname}-src-${pkgver}/include GLKLIBDIR=$srcdir/${pkgname}-src-${pkgver}/lib GLKMAKEINC=$srcdir/${pkgname}-src-${pkgver}/include/Make.qglk -f Makefile.glk glklevel9
45 mkdir -p $pkgdir/usr/share/${pkgname}
46 mkdir -p $pkgdir/usr/bin/
48 cp -fr $srcdir/${pkgname}-src-${pkgver}/doc $pkgdir/usr/share/${pkgname}/
49 cp -fr $srcdir/${pkgname}-src-${pkgver}/include $pkgdir/usr/share/${pkgname}/
50 cp -fr $srcdir/${pkgname}-src-${pkgver}/lib $pkgdir/usr/share/${pkgname}/
51 echo -e "see http://www.gnu.org/licenses/gpl-2.0.txt" > $pkgdir/usr/share/${pkgname}/doc/gpl-2.txt
52 echo -e "see http://www.gnu.org/licenses/lgpl-2.1.txt" > $pkgdir/usr/share/${pkgname}/doc/lgpl-2.1.txt
54 echo -e "\n- Magnetic (http://www.ifarchive.org/indexes/if-archiveXmagnetic-scrollsXinterpretersXmagnetic.html) \n- Level9 (http://www.ifarchive.org/indexes/if-archiveXlevel9XinterpretersXlevel9.html)" >> $pkgdir/usr/share/${pkgname}/doc/licensing.txt
56 cp $srcdir/${pkgname}-src-${pkgver}/terps/nitfol/qglk-nitfol $pkgdir/usr/share/${pkgname}/
57 cp $srcdir/${pkgname}-src-${pkgver}/terps/glulxe/glulxe $pkgdir/usr/share/${pkgname}/qglk-glulxe
58 cp $srcdir/${pkgname}-src-${pkgver}/terps/magnetic/Glk/glkmagnetic $pkgdir/usr/share/${pkgname}/qglk-magnetic
59 cp $srcdir/${pkgname}-src-${pkgver}/terps/level9/Glk/glklevel9 $pkgdir/usr/share/${pkgname}/qglk-level9
61 ln -s /usr/share/qglk/qglk-nitfol $pkgdir/usr/bin/
62 ln -s /usr/share/qglk/qglk-glulxe $pkgdir/usr/bin/
63 ln -s /usr/share/qglk/qglk-magnetic $pkgdir/usr/bin/
64 ln -s /usr/share/qglk/qglk-level9 $pkgdir/usr/bin/