Advertisement
Guest User

Untitled

a guest
Dec 14th, 2011
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.73 KB | None | 0 0
  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>
  5.  
  6. pkgname=freeorion-svn
  7. pkgver=4517
  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.         CMakeLists.patch)
  23. md5sums=('7064e5b16d222322ce90cd4598eec64e'
  24.          'f137c3e1eec97982755f748b9de5fc6e'
  25.          'e214e8faa3fa93d79c649d2cae8f8371'
  26.          '837e28e5dc30dbb67d7a9dd10ae9036e'
  27.          '5dce694db11eb7b58c45e1ccba3db267')
  28.  
  29.  
  30. _svntrunk=https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk/FreeOrion/
  31. _svnmod=freeorion
  32.  
  33. build() {
  34.  
  35.   cd "$srcdir"
  36.   msg "Connecting to SVN server...."
  37.  
  38.   if [[ -d "$_svnmod/.svn" ]]; then
  39.     (cd "$_svnmod" && svn up -r "$pkgver")
  40.   else
  41.     svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
  42.   fi
  43.  
  44.   msg "SVN checkout done or server timeout"
  45.   msg "Starting build..."
  46.  
  47.   rm -rf "$srcdir/$_svnmod-build"
  48.   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  49.   cd "$srcdir/$_svnmod-build"
  50.  
  51.   #Build and install the package
  52.   #export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
  53.  
  54.   # make some changes to CMakeLists.txt to fix installation paths
  55.   patch < ${srcdir}/CMakeLists.patch
  56.    
  57.   cmake -DCMAKE_INSTALL_PREFIX=/opt/freeorion-svn
  58.  
  59. sed -i "s/CMAKE_CXX_FLAGS:STRING='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 '/CMAKE_CXX_FLAGS:STRING='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -lGL -lGLU '/g" CMakeCache.txt
  60.  
  61.  
  62.   make -j 4
  63.  
  64.   make DESTDIR=$pkgdir install
  65.  
  66.  
  67.   #Fix ogre_plugins.cfg to find our OGRE installation
  68.   install -Dm644 ${srcdir}/freeorion/ogre_plugins.cfg ${pkgdir}/opt/freeorion-svn/ogre_plugins.cfg
  69.   sed -i 's|PluginFolder=.|PluginFolder=/usr/lib/OGRE/|g' ${pkgdir}/opt/freeorion-svn/ogre_plugins.cfg
  70.  
  71.   #Link binaries
  72.   mkdir -p ${pkgdir}/usr/bin
  73.   install -D -m755 ${srcdir}/freeorion.sh ${pkgdir}/usr/bin/freeorion
  74.  
  75.   #Install the icons and .desktop files
  76.   install -D -m644 ${srcdir}/freeorion.png ${pkgdir}/usr/share/pixmaps/freeorion.png
  77.   install -D -m644 ${srcdir}/freeorion.desktop ${pkgdir}/usr/share/applications/freeorion.desktop
  78.  
  79.   rm -rf ${srcdir}/${_svnmod}-build
  80. }
  81.  
  82. # vim:set ts=2 sw=2 et:
  83.  
  84.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement