summaryrefslogtreecommitdiff
path: root/community-testing/scorched3d/PKGBUILD
blob: 8a481c910ef9ba18fc8b301dbb20924128f1097c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Seppo Porspakka <sporspak@paju.oulu.fi>
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
 
pkgname=scorched3d
pkgver=43.2a
pkgrel=2
pkgdesc="A 3d artillery combat game"
arch=('i686' 'x86_64')
url="http://www.scorched3d.co.uk/"
license=('GPL')
depends=('sdl_net' 'wxgtk' 'freealut>=1.0.0-3' 'libvorbis' 'mesa' 'fftw' 'libjpeg>=8' 'xdg-utils')
makedepends=('sharutils')
install=scorched3d.install
source=("http://downloads.sourceforge.net/${pkgname}/Scorched3D-${pkgver}-src.tar.gz"
        'scorched3d.desktop'
        'scorched3d.png.uu'
        'scorched3d-42.1-gcc43.patch'
        'scorched3d-42.1-fixups.patch'
        'scorched3d-libpng1.5.patch'
        'libpng14.patch')
md5sums=('876de173218fd83a2b0a30255ba694fa'
         'b951f2150004e10fdff3e6226f1a3939'
         '178a281333006c6a5a92919865c1d7af'
         '053769f77a38c252eef1d967b18e93e6'
         'dfde556559d95bca07c4a390c60790b4'
         'ec6958191751b5a2c44aa15abfc75269'
         'c8c03855fd3693122fd39427fa3638c1')

build() {
  cd scorched

#  patch -Np1 -i ${srcdir}/scorched3d-42.1-gcc43.patch
  patch -Np1 -i ${srcdir}/scorched3d-42.1-fixups.patch
  patch -Np1 -i ${srcdir}/scorched3d-libpng1.5.patch
#  patch -Np0 -i ${srcdir}/libpng14.patch

  WANT_WXGTK=gtk2
  sh autogen.sh \
    --prefix=/usr \
    --datadir=/usr/share/scorched3d \
    --disable-openaltest \
    --with-wx-config=wx-config

  #sed -i 's/-lz/-lz -lalut/g' src/scorched/Makefile || return 1
  #sed -i 's|/usr/local/lib/libwx_gtk-2.4.a||' src/scorched/Makefile || return 1

  make
}

package() {
  cd scorched

  make DESTDIR=${pkgdir} install
 
  # freedesktop stuff - png and desktop file ganked from debian
  cd ${srcdir}

  uudecode --output-file=scorched3d.png scorched3d.png.uu

  install -D -m644 scorched3d.png \
      ${pkgdir}/usr/share/icons/hicolor/48x48/apps/${pkgname}.png
  install -D -m644 scorched3d.desktop \
      ${pkgdir}/usr/share/applications/${pkgname}.desktop
}