updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / ogremeshy / PKGBUILD
blob506b504124114d468e5828d5d1c8b690fc7c040f
1 # Maintainer: Duong Pham <dthpham@gmail.com>
3 pkgname=ogremeshy
4 pkgver=1.1
5 pkgrel=1
6 pkgdesc="A tool for viewing OGRE mesh files"
7 arch=('i686' 'x86_64')
8 url="http://sourceforge.net/projects/ogremeshy/"
9 license=('GPL3')
10 depends=('ogre>=1.7.3' 'wxgtk>=2.8')
11 makedepends=('cmake>=2.6.4')
12 install=$pkgname.install
13 source=(http://sourceforge.net/projects/$pkgname/files/OgreMeshy.$pkgver.src.tar.bz2 \
14         ogremeshy-1.1-paths.diff \
15         ogremeshy-1.1-resources.diff)
16 md5sums=('2273ebc2c998917929f6d9b8771ec4c9' \
17          '9e9344d0c9783c16415d55457f29abbc' \
18          '21c0294d38e60ecef7c7428d9af51a43')
20 build() {
21   cd "$srcdir"
23   msg "Applying patches..."
24   cd src/Core && patch -p0 < ../../ogremeshy-1.1-paths.diff && cd "$srcdir" || return 1
25   cd scripts/Resources && patch -p0 < ../../ogremeshy-1.1-resources.diff && cd "$srcdir" || return 1
26   sed -i "s/wxWidgets COMPONENTS/wxWidgets COMPONENTS adv/g" CMakeLists.txt
28   msg "Starting make..."
29   mkdir -p build && cd build 
30   cmake ..\
31     -DCMAKE_MODULE_PATH=/usr/lib/OGRE/cmake
32   make || return 1
35 package() {
36   cd "$srcdir"
38   cd scripts/Resources && sh copyresources.sh && cd -
39   cp build/OgreMeshy bin/Release_Linux
40   
41   cd bin/Release_Linux
42   sed -i "s/PluginFolder=Plugins/PluginFolder=\/usr\/lib\/OGRE/g" ~/.ogremeshy/Plugins.cfg
44   install -d -m717 "${pkgdir}/opt/ogremeshy"
45   install "$srcdir/bin/Release_Linux/OgreMeshy" "$pkgdir/opt/$pkgname"
46   cp -R "$srcdir/bin/Release_Linux/Resources" "$pkgdir/opt/$pkgname"