summaryrefslogtreecommitdiff
path: root/extra/neverball/PKGBUILD
blob: cd9c5a79ba804bec48ec8ab0fa5a2df7eef7ced2 (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
# $Id: PKGBUILD 124594 2011-05-23 08:40:29Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=neverball
pkgver=1.5.4
pkgrel=3
pkgdesc="3D game similar to Super Monkey Ball or Marble Madness"
arch=('i686' 'x86_64')
url="http://neverball.org/"
license=('GPL')
depends=('sdl_ttf' 'libgl' 'libpng' 'libjpeg' 'libvorbis' 'physfs')
makedepends=('mesa')
source=(http://neverball.org/${pkgname}-${pkgver}.tar.gz)
md5sums=('c523b0f72c2035831310e821162f7bd7')
sha1sums=('619c227e1958bd60738f12dbbde9b30c91dd79a7')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i 's|#define CONFIG_LOCALE "./locale"|#define CONFIG_LOCALE "/usr/share/locale"|' share/base_config.h

  if [ "${CARCH}" = "i686" ] ;then
    make ENABLE_NLS=1 DATADIR=/usr/share/neverball SSE_CFLAGS=""
  else
    make ENABLE_NLS=1 DATADIR=/usr/share/neverball
  fi
}

package(){
  cd "${srcdir}/${pkgname}-${pkgver}"
  install -d "${pkgdir}/usr/bin"
  install -d "${pkgdir}"/usr/share/{neverball,locale,applications,pixmaps,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/*.png "${pkgdir}/usr/share/pixmaps/"
  install -m644 dist/mapc.1 "${pkgdir}/usr/share/man/man1"
  install -m644 dist/{neverball.6,neverputt.6} "${pkgdir}/usr/share/man/man6"

  ln -s neverball_48.png "${pkgdir}/usr/share/pixmaps/neverball.png"
  ln -s neverputt_48.png "${pkgdir}/usr/share/pixmaps/neverputt.png"
  find "${pkgdir}/usr/share/neverball" -type f -exec chmod 0644 {} \;
}