summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b5dc0c6c4939064314d52d20546d11beb42386b6 (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
65
66
67
68
69
70
71
72
73
74
75
# $Id$
# Maintainer: Benjamin Chretien <chretien at lirmm dot fr>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
pkgname=('ogre-1.8')
pkgver=1.8.1
pkgrel=4
pkgdesc='Scene-oriented, flexible 3D engine written in C++. Version 1.8.'
arch=('i686' 'x86_64')
url='http://www.ogre3d.org'
license=('custom:MIT')
depends=('boost-libs' 'freeimage' 'freetype2' 'libxaw' 'libxrandr'
         'nvidia-cg-toolkit' 'zziplib' 'ois' 'glu')
makedepends=('boost' 'cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'mesa')
install=ogre-1.8.install
_dir="OGRE-1.8"
_src_dir="ogre_src_v${pkgver//./-}"
source=("${_dir}.tar.bz2::http://downloads.sourceforge.net/ogre/ogre_src_v${pkgver//./-}.tar.bz2"
        "freetype.patch")
md5sums=('b85e3dcf370a46b3a8624d4fdd722d39'
         '65fd7049ed67142fdb363df821bd40e8')
conflicts=()
provides=('ogre')


build() {
  cd ${srcdir}/${_src_dir}

  # patching CMake script for Freetype
  patch -p1 -i ${startdir}/freetype.patch

  # get a clean build dir
  [[ -d build ]] && rm -rf build
  mkdir build && cd build

  # generate CMake Makefile
  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/opt/${_dir} \
    -DOGRE_INSTALL_PLUGINS_HEADERS=TRUE \
    -DOGRE_INSTALL_SAMPLES=TRUE \
    -DOGRE_INSTALL_DOCS=FALSE \
    -DOGRE_INSTALL_MEDIA=TRUE \
    -DOGRE_INSTALL_SAMPLES_SOURCE=TRUE \
    -DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version

  # compile
  make
}

package() {
  cd ${srcdir}/${_src_dir}/build

  # install the bugger
  make DESTDIR=${pkgdir} install

  # rename pkg-config files
  #for files in ${pkgdir}/opt/${_dir}/lib/pkgconfig/*.pc
  #do
  #  mv "$files" "${files%.pc}-1.8.pc"
  #done

  # fix up samples
  #install -dm775 -o root -g users ${pkgdir}/opt/${_dir}/samples/
  #mv ${pkgdir}/opt/${_dir}/share/${_dir}/*.cfg ${pkgdir}/opt/${_dir}/samples/
  #mv ${pkgdir}/opt/${_dir}/bin/SampleBrowser ${pkgdir}/opt/${_dir}/samples/

  # make sample launcher
  #echo "#!/bin/bash" > ${pkgdir}/opt/${_dir}/bin/OgreSampleBrowser
  #echo "cd /opt/${_dir}/samples && ./SampleBrowser" >> ${pkgdir}/opt/${_dir}/bin/OgreSampleBrowser
  #chmod +x ${pkgdir}/opt/${_dir}/bin/OgreSampleBrowser

  # install license
  install -Dm644 ../Docs/License.html ${pkgdir}/usr/share/licenses/${pkgname}/license.html
}

# vim:set ts=2 sw=2 et: