desktop/ogre/PKGBUILD
2018-10-18 04:28:46 +02:00

68 lines
1.8 KiB
Bash

pkgbase=ogre
pkgname=('ogre' 'ogre-docs')
pkgver=1.11.2
pkgrel=1
pkgdesc="A scene-oriented, flexible 3D engine written in C++"
arch=('x86_64')
url='https://www.ogre3d.org'
license=('custom:MIT')
depends=('boost-libs' 'freeimage' 'freetype2' 'libxaw' 'libxrandr' 'openexr'
'nvidia-cg-toolkit' 'mesa' 'zziplib' 'sdl2' 'glu')
makedepends=('boost' 'cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'python3' 'swig' 'systemd' 'java-environment')
categories=('graphics')
install=ogre.install
source=("https://github.com/OGRECave/ogre/archive/v${pkgver}.tar.gz")
md5sums=('457fb2cde9ac715b01e7d049fffeea0a')
build() {
cd ogre-${pkgver}
[[ -d build ]] && rm -rf build
mkdir build && cd build
export JAVA_HOME=/usr/lib/jvm/default
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOGRE_BUILD_DEPENDENCIES=FALSE \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOGRE_BUILD_PLUGIN_FREEIMAGE=TRUE \
-DOGRE_BUILD_PLUGIN_EXRCODEC=TRUE
make
make OgreDoc
}
package_ogre() {
optdepends=('cppunit: unit testing'
'python3: python bindings'
'java-environment: jni bindings'
'ogre-docs: documentation')
cd ogre-${pkgver}/build
make DESTDIR=${pkgdir} install
mv ${pkgdir}/usr/bin/SampleBrowser ${pkgdir}/usr/bin/OgreSampleBrowser
install -Dm644 ../LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
# move docs out of this package
mv ${pkgdir}/usr/share/OGRE/docs ${srcdir}/docs
}
package_ogre-docs() {
pkgdesc="Documentation for ogre"
depends=()
cd ogre-${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 /usr/share/doc/OGRE/ OGRE/docs
}