updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / freeorion-svn / PKGBUILD
blob41a813b9ce6381143f219d13ccd1e708414961dc
1 # Maintainer: guini <sidtrun@googlemail.com>
2 # Contributor: Forrest Loomis <cybercyst _ at _ gmail dot com>
3 # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
4 # Contributor: fana-m <geminin@gmx.net>
6 pkgname=freeorion-svn
7 pkgver=4526
8 pkgrel=1
9 pkgdesc="Free Clone of Master of Orion."
10 url="http://www.freeorion.org/index.php/Main_Page"
11 arch=('i686' 'x86_64')
12 license=('GPL')
13 depends=('boost' 'ogre' 'bullet' 'python2' 'sdl' 'freealut' 'gigi-svn' 'graphviz' 'libvorbis' 'libogg' 'desktop-file-utils')
14 makedepends=('subversion' 'cmake')
15 provides=('freeorion')
16 conflicts=('freeorion')
17 install=('freeorion.install')
18 source=(freeorion.png
19         freeorion.desktop
20         freeorion.install
21         freeorion.sh)
22 md5sums=('7064e5b16d222322ce90cd4598eec64e'
23          'f137c3e1eec97982755f748b9de5fc6e'
24          'e214e8faa3fa93d79c649d2cae8f8371'
25          '837e28e5dc30dbb67d7a9dd10ae9036e')
28 _svntrunk=https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk/FreeOrion/
29 _svnmod=freeorion
31 build() {
33   cd "$srcdir"
34   msg "Connecting to SVN server...."
36   if [[ -d "$_svnmod/.svn" ]]; then
37     (cd "$_svnmod" && svn up -r "$pkgver")
38   else
39     svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
40   fi
42   msg "SVN checkout done or server timeout"
44   rm -rf "$srcdir/$_svnmod-build"
45   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
46   cd "$srcdir/$_svnmod-build"
48   #Build and install the package
49   #export LDFLAGS="${LDFLAGS//-Wl,--as-needed}" 
51   msg "Starting build"
52   
53   cmake -DCMAKE_INSTALL_PREFIX=/opt/freeorion-svn
54   make
56   make DESTDIR=$pkgdir install
59   #Fix ogre_plugins.cfg to find our OGRE installation
60   install -Dm644 ${srcdir}/freeorion/ogre_plugins.cfg ${pkgdir}/opt/freeorion-svn/ogre_plugins.cfg
61   sed -i 's|PluginFolder=.|PluginFolder=/usr/lib/OGRE/|g' ${pkgdir}/opt/freeorion-svn/ogre_plugins.cfg 
63   #Link binaries
64   mkdir -p ${pkgdir}/usr/bin
65   install -D -m755 ${srcdir}/freeorion.sh ${pkgdir}/usr/bin/freeorion
67   #Install the icons and .desktop files
68   install -D -m644 ${srcdir}/freeorion.png ${pkgdir}/usr/share/pixmaps/freeorion.png
69   install -D -m644 ${srcdir}/freeorion.desktop ${pkgdir}/usr/share/applications/freeorion.desktop
71   rm -rf ${srcdir}/${_svnmod}-build 
74 # vim:set ts=2 sw=2 et: