updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / gigalomania / PKGBUILD
blob3524c298f51024d658fa6da0601ca2d7208e4514
1 # Maintainer: Sven Schneider <archlinux.sandmann@googlemail.com>
3 pkgname=gigalomania
4 pkgver=0.21
5 pkgrel=1
6 pkgdesc="2D real time strategy game that is a clone of Mega-Lo-Mania"
7 arch=('i686' 'x86_64')
8 url="http://homepage.ntlworld.com/mark.harman/comp_gigalomania.html"
9 license=('GPL')
10 depends=('sdl' 'sdl_image' 'sdl_mixer')
11 source=(http://launchpad.net/gigalomania/trunk/${pkgver}/+download/gigalomaniasrc.zip)
12 md5sums=('c2e958a44db3cd8a9ce4c3ef6d7cb736')
14 build() {
15         cd ${srcdir}/${pkgname}src
16         
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
25         
26         make
29 package() {
30         cd "${srcdir}/${pkgname}src"
31         
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"
39         
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/"
44         
45         # install .desktop
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"