| 1 | # Contributor: Thomas Mudrunka <harvie@@email..cz> |
| 2 | # You can also contact me on http://blog.harvie.cz/ |
| 3 | |
| 4 | # Freecraft is deprecated and you should use stratagus with wargus ( http://wargus.sourceforge.net/ ) instead! |
| 5 | # Biggest difference from wargus is that you don't need original Warcraft 2 game to play Freecraft. |
| 6 | |
| 7 | # TODO: |
| 8 | # - unsure about dependencies |
| 9 | |
| 10 | pkgname=freecraft |
| 11 | pkgver=1.19 |
| 12 | pkgrel=1 |
| 13 | fcmpver=1.18.20030311 |
| 14 | pkgdesc="Warcraft2 clone - now deprecated and replaced by Stratagus/Wargus. You can also play Original WarCraft 1 or 2 in DosBox. But you don't need files from original W2 to play FreeCraft!" |
| 15 | arch=('i686' 'x86_64') |
| 16 | license=('GPL') |
| 17 | url="http://git.comum.org/gitweb.cgi?p=lincoln/debian/freecraft.git" |
| 18 | depends=( |
| 19 | 'libxext' 'bzip2' 'libpng' 'sdl' 'libx11' 'zlib' |
| 20 | # 'evas-svn' |
| 21 | # 'svgalib-helper' 'svgalib' 'svgalib-devel' |
| 22 | ) |
| 23 | |
| 24 | source=( |
| 25 | "http://ftp.debian.org/debian/pool/main/f/${pkgname}/${pkgname}_${pkgver}.orig.tar.gz" |
| 26 | "http://ftp.debian.org/debian/pool/main/f/${pkgname}/${pkgname}_${pkgver}-3.debian.tar.gz" |
| 27 | "http://ftp.debian.org/debian/pool/main/f/fcmp/fcmp_${fcmpver}.orig.tar.gz" |
| 28 | ) |
| 29 | |
| 30 | md5sums=('bc7bf78c921bf2e612190e0a4398b210' |
| 31 | 'afc399763ad26225378c88427d64da78' |
| 32 | 'b770c20b2088687d81116f1361d2193d') |
| 33 | |
| 34 | build() { |
| 35 | mkdir -p ${pkgdir}/usr/local |
| 36 | mkdir -p ${pkgdir}/usr/share/games/freecraft/default/ |
| 37 | |
| 38 | cd ${srcdir} |
| 39 | |
| 40 | #Apply debian patch (which contains more patches xD) |
| 41 | #patch -p0 < freecraft_${pkgver}-4.diff |
| 42 | |
| 43 | cd ${srcdir}/${pkgname}-${pkgver}/ |
| 44 | |
| 45 | #Apply Debian patches ;o) |
| 46 | #for i in $(cat ./debian/patches/00list); do |
| 47 | # bash "./debian/patches/$i.dpatch" -patch |
| 48 | #done; |
| 49 | |
| 50 | #Copy data from freecraft & fcmp |
| 51 | #cp -r ${srcdir}/${pkgname}-${pkgver}/data/* ${pkgdir}/usr/share/games/freecraft/ |
| 52 | cp -r ${srcdir}/fcmp-${fcmpver}/data/* ${pkgdir}/usr/share/games/freecraft/default/ |
| 53 | |
| 54 | #Compile |
| 55 | #./setup || return 1 |
| 56 | ./configure --prefix="${pkgdir}/usr/" || return 1 |
| 57 | make install PREFIX="${pkgdir}/usr/" || return 1 |
| 58 | |
| 59 | #Launcher |
| 60 | #mkdir -p ${pkgdir}/usr/bin |
| 61 | #echo '#!/bin/sh |
| 62 | #/usr/games/freecraft $@' > ${pkgdir}/usr/bin/${pkgname} |
| 63 | #chmod -R 655 ${pkgdir}/usr/bin/${pkgname} |
| 64 | |
| 65 | # mkdir -p ${pkgdir}/usr/share/applications |
| 66 | # #Desktop Launcher |
| 67 | # echo '[Desktop Entry] |
| 68 | #Version=1.0 |
| 69 | #Encoding=UTF-8 |
| 70 | #Name=FreeCraft |
| 71 | #GenericName=FreeCraft |
| 72 | #Comment=Warcraft 2 style real-time strategy game |
| 73 | #Exec=/usr/games/freecraft |
| 74 | #Icon=freecraft |
| 75 | #StartupNotify=true |
| 76 | #Terminal=false |
| 77 | #Type=Application |
| 78 | #Categories=Game;' > ${pkgdir}/usr/share/applications/freecraft.desktop |
| 79 | |
| 80 | } |