updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / qglk / PKGBUILD
blobb167f077ed6dff95e90fecc5a9949987f986e198
1 # Contributor: Eric Forgeot < http://ifiction.free.fr >
2 pkgname=qglk
3 pkgver=0.1.0
4 pkgrel=2
5 pkgdesc="Qglk is an implementation of glk using Qt. Included IF interpreters are glulxe, nitfol, magnetic and level9."
6 arch=(i686 x86_64)
7 url="http://www.bubblycloud.com/qglk/"
8 license=('GPL')
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')
19 build() {
20 #creating the qglk lib
21         cd $srcdir/${pkgname}-src-${pkgver}
22         qmake -config dist
23         
24 #compiling glulxe and nitfol
25         make || return 1
26     cd $srcdir/${pkgname}-src-${pkgver}/terps
27     make || return 1
28     
29 #compiling magnetic
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
35 #compiling level9
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
43 package() {
44         
45         mkdir -p $pkgdir/usr/share/${pkgname}
46         mkdir -p $pkgdir/usr/bin/
47         
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
53         
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
55         
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
60         
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/