summaryrefslogtreecommitdiff
path: root/community/irrlicht/PKGBUILD
blob: 34258a9ccef873ea20763a41ca9749ae99e10eec (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
# $Id: PKGBUILD 102440 2013-12-11 11:35:15Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Hilton Medeiros <medeiros.hilton AT gmail DOT com>
# Contributor: Ali H. Caliskan <ali.h.caliskan AT gmail DOT com>
# Contributor: Paolo Fagni <paolo.fagni AT mail DOT com>
# Contributor: Lukas Kropatschek <lukas.krop AT gmail DOT com>

pkgbase=irrlicht
pkgname=('irrlicht' 'irrlicht-docs')
pkgver=1.8.1
pkgrel=2
pkgdesc="An open source high performance realtime 3D graphics engine."
arch=('i686' 'x86_64' 'mips64el')
url="http://irrlicht.sourceforge.net/"
license=('ZLIB')
depends=('libgl' 'libjpeg' 'bzip2' 'libpng')
makedepends=('mesa' 'unzip' 'libxcursor')
optdepends=('libxcursor: run examples')
source=("http://downloads.sourceforge.net/irrlicht/$pkgname-$pkgver.zip")
noextract=($pkgname-$pkgver.zip)
md5sums=('db97cce5e92da9b053f4546c652e9bd5')

build() {
  unzip $pkgbase-$pkgver.zip

  cd $srcdir/$pkgbase-$pkgver/source/Irrlicht

  make NDEBUG=1 sharedlib
}

package_irrlicht() {
  cd $srcdir/$pkgbase-$pkgver/source/Irrlicht

  sed -i "/^INSTALL_DIR/s:=.*:=$pkgdir/usr/lib:" Makefile

  make install

  cd $srcdir/$pkgbase-$pkgver/
  install -Dm644 readme.txt $pkgdir/usr/share/licenses/$pkgbase/LICENSE

  # fix headers permissions
  chmod 644 $pkgdir/usr/include/$pkgbase/*

  cd $pkgdir/usr/lib
  ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1
}

package_irrlicht-docs() {
  cd $srcdir/$pkgbase-$pkgver/

  install -d $pkgdir/usr/share/$pkgbase \
             $pkgdir/usr/share/doc/$pkgbase

  # install media files for examples
  cp -r media $pkgdir/usr/share/$pkgbase

  # install documentation
  cp -r doc/* $pkgdir/usr/share/doc/$pkgbase
  rm -f $pkgdir/usr/share/doc/$pkgbase/*.txt
}