summaryrefslogtreecommitdiff
path: root/extra/neverball/PKGBUILD
blob: 9c0612f0f67e941ba192980b8ca87011b7644f4a (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
# $Id: PKGBUILD 184414 2013-05-06 19:38:55Z foutrelis $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=neverball
pkgver=1.5.4
pkgrel=6
pkgdesc="3D game similar to Super Monkey Ball or Marble Madness"
arch=('i686' 'x86_64' 'mips64el')
url="http://neverball.org/"
license=('GPL')
depends=('sdl_ttf' 'libgl' 'libpng' 'libjpeg' 'libvorbis' 'physfs' \
         'hicolor-icon-theme' 'xdg-utils')
makedepends=('mesa')
install=neverball.install
source=(http://neverball.org/${pkgname}-${pkgver}.tar.gz \
        neverball-1.5.4-underlink.patch neverball-1.5.4-libpng.patch)
sha1sums=('619c227e1958bd60738f12dbbde9b30c91dd79a7'
          'f71982b7187d569c57b30c4c40fedd6c0e72baca'
          '02e68c17e851e85414ce5649b6b77273846bdb67')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p0 -i ../neverball-1.5.4-underlink.patch
  patch -p1 -i ../neverball-1.5.4-libpng.patch
}

build() {
  cd ${pkgname}-${pkgver}
  make DATADIR=/usr/share/neverball LOCALEDIR=/usr/share/locale \
    CPPFLAGS="$CPPFLAGS -DNDEBUG" CFLAGS="$CFLAGS"
}

package(){
  cd ${pkgname}-${pkgver}
  install -d "${pkgdir}/usr/bin"
  install -d "${pkgdir}"/usr/share/{neverball,locale,applications,doc/neverball}
  install -d "${pkgdir}"/usr/share/man/man{1,6}

  install -m755 neverball neverputt mapc "${pkgdir}/usr/bin"
  cp -r locale/* "${pkgdir}/usr/share/locale/"
  cp -r data/* "${pkgdir}/usr/share/neverball/"
  install -m644 doc/* "${pkgdir}/usr/share/doc/neverball/"
  install -m644 dist/*.desktop "${pkgdir}/usr/share/applications/"
  install -m644 dist/mapc.1 "${pkgdir}/usr/share/man/man1"
  install -m644 dist/{neverball.6,neverputt.6} "${pkgdir}/usr/share/man/man6"

  for i in 16 24 32 48 64 128 256; do
    install -D -m644 dist/neverball_$i.png "${pkgdir}/usr/share/icons/hicolor/${i}x$i/apps/neverball.png"
    install -D -m644 dist/neverputt_$i.png "${pkgdir}/usr/share/icons/hicolor/${i}x$i/apps/neverputt.png"
  done

  chmod -R u=rwX,go=rX "${pkgdir}/usr/share/neverball"
}