blob: 1ad80ba86d1c8f1ec2ff9ccb77abfe4364345abf (
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
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# $Id: PKGBUILD 40996 2011-03-03 04:00:57Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
pkgbase=ogre
pkgname=('ogre' 'ogre-docs')
pkgver=1.7.2
pkgrel=5
pkgdesc="A scene-oriented, flexible 3D engine written in C++"
arch=('i686' 'x86_64')
url='http://www.ogre3d.org'
license=('custom:MIT')
depends=('boost-libs' 'freeimage' 'freetype2' 'libxaw' 'libxrandr'
'nvidia-cg-toolkit' 'mesa' 'zziplib' 'ois')
makedepends=('boost' 'cmake' 'doxygen' 'graphviz' 'ttf-dejavu')
optdepends=('cppunit: unit testing'
'intel-tbb: better threading support'
'poco: portability')
install=ogre.install
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}_src_v${pkgver//./-}.tar.bz2")
md5sums=('dd6574b8d906a74950c1e05633b2e96f')
build() {
cd ${srcdir}/${pkgname}_src_v${pkgver//./-}
# get a clean build dir
[[ -d build ]] && rm -rf build
mkdir build
cd build
# generate CMake Makefile
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOGRE_INSTALL_PLUGINS_HEADERS=TRUE \
-DOGRE_INSTALL_SAMPLES=TRUE \
-DOGRE_INSTALL_DOCS=TRUE \
-DOGRE_INSTALL_MEDIA=TRUE \
-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE \
-DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version
# compile
make
# generate docs
if [[ $(which dot) && $(which doxygen) ]]; then
make doc
fi
}
package_ogre() {
optdepends=('ogre-docs: documentation')
cd ${srcdir}/${pkgname}_src_v${pkgver//./-}/build
# install the bugger
make DESTDIR=${pkgdir} install
# fix up samples
install -dm775 -o root -g users ${pkgdir}/opt/OGRE/samples/
mv ${pkgdir}/usr/share/OGRE/*.cfg ${pkgdir}/opt/OGRE/samples/
mv ${pkgdir}/usr/bin/SampleBrowser ${pkgdir}/opt/OGRE/samples/
# make sample launcher
echo "#!/bin/bash" > ${pkgdir}/usr/bin/OgreSampleBrowser
echo "cd /opt/OGRE/samples && ./SampleBrowser" >> ${pkgdir}/usr/bin/OgreSampleBrowser
chmod +x ${pkgdir}/usr/bin/OgreSampleBrowser
# install license
install -Dm644 ../Docs/License.html ${pkgdir}/usr/share/licenses/${pkgname}/license.html
# move docs out of this package
mv ${pkgdir}/usr/share/OGRE/docs ${srcdir}/docs
}
package_ogre-docs() {
pkgdesc="Documentation for ogre"
depends=()
cd ${srcdir}/${pkgname}_src_v${pkgver//./-}/build
# move docs into this package
install -dm755 ${pkgdir}/usr/share/doc
mv ${srcdir}/docs ${pkgdir}/usr/share/doc/OGRE/
# symlink for docs
install -dm755 ${pkgdir}/usr/share/OGRE/
cd ${pkgdir}/usr/share
ln -s doc/OGRE/ OGRE/docs
}
# vim:set ts=2 sw=2 et:
|