1 # Maintainer: Sven Schneider <archlinux.sandmann@googlemail.com>
6 pkgdesc="2D real time strategy game that is a clone of Mega-Lo-Mania"
8 url="http://homepage.ntlworld.com/mark.harman/comp_gigalomania.html"
10 depends=('sdl' 'sdl_image' 'sdl_mixer')
11 source=(http://launchpad.net/gigalomania/trunk/${pkgver}/+download/gigalomaniasrc.zip)
12 md5sums=('c2e958a44db3cd8a9ce4c3ef6d7cb736')
15 cd ${srcdir}/${pkgname}src
17 # patch data directories
18 sed 's#gfx/#/usr/share/gigalomania/gfx/#' -i game.cpp
19 sed 's#sound/#/usr/share/gigalomania/sound/#' -i game.cpp
20 sed 's#maps_dirname = "islands";#maps_dirname = "/usr/share/gigalomania/islands";#' -i game.cpp
22 # don't create log file as they would be placed in cwd
23 sed 's#\"log.txt\"#\"/dev/null"#' -i utils.cpp
24 sed 's#\"log_old.txt\"#\"/dev/null"#' -i utils.cpp
30 cd "${srcdir}/${pkgname}src"
32 # install the executable
33 install -Dm 755 gigalomania "${pkgdir}/usr/bin/gigalomania"
35 # create the mods and maps directory
36 install -dm755 "${pkgdir}/usr/share/gigalomania/gfx"
37 install -dm755 "${pkgdir}/usr/share/gigalomania/islands"
38 install -dm755 "${pkgdir}/usr/share/gigalomania/sound"
40 # install the data files
41 install -Dm644 gfx/* "${pkgdir}/usr/share/gigalomania/gfx/"
42 install -Dm644 islands/* "${pkgdir}/usr/share/gigalomania/islands/"
43 install -Dm644 sound/* "${pkgdir}/usr/share/gigalomania/sound/"
46 install -Dm 755 gigalomania.desktop "${pkgdir}/usr/share/applications/gigalomania.desktop"
47 install -Dm 755 gigalomania_fullscreen.desktop "${pkgdir}/usr/share/applications/gigalomania_fullscreen.desktop"