Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: guini <sidtrun@googlemail.com>
- # Contributor: Forrest Loomis <cybercyst _ at _ gmail dot com>
- # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
- # Contributor: fana-m <geminin@gmx.net>
- pkgname=freeorion-svn
- pkgver=4517
- pkgrel=1
- pkgdesc="Free Clone of Master of Orion."
- url="http://www.freeorion.org/index.php/Main_Page"
- arch=('i686' 'x86_64')
- license=('GPL')
- depends=('boost' 'ogre' 'bullet' 'python2' 'sdl' 'freealut' 'gigi-svn' 'graphviz' 'libvorbis' 'libogg' 'desktop-file-utils')
- makedepends=('subversion' 'cmake')
- provides=('freeorion')
- conflicts=('freeorion')
- install=('freeorion.install')
- source=(freeorion.png
- freeorion.desktop
- freeorion.install
- freeorion.sh
- CMakeLists.patch)
- md5sums=('7064e5b16d222322ce90cd4598eec64e'
- 'f137c3e1eec97982755f748b9de5fc6e'
- 'e214e8faa3fa93d79c649d2cae8f8371'
- '837e28e5dc30dbb67d7a9dd10ae9036e'
- '5dce694db11eb7b58c45e1ccba3db267')
- _svntrunk=https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk/FreeOrion/
- _svnmod=freeorion
- build() {
- cd "$srcdir"
- msg "Connecting to SVN server...."
- if [[ -d "$_svnmod/.svn" ]]; then
- (cd "$_svnmod" && svn up -r "$pkgver")
- else
- svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
- fi
- msg "SVN checkout done or server timeout"
- msg "Starting build..."
- rm -rf "$srcdir/$_svnmod-build"
- cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
- cd "$srcdir/$_svnmod-build"
- #Build and install the package
- #export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
- # make some changes to CMakeLists.txt to fix installation paths
- patch < ${srcdir}/CMakeLists.patch
- cmake -DCMAKE_INSTALL_PREFIX=/opt/freeorion-svn
- 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
- make -j 4
- make DESTDIR=$pkgdir install
- #Fix ogre_plugins.cfg to find our OGRE installation
- install -Dm644 ${srcdir}/freeorion/ogre_plugins.cfg ${pkgdir}/opt/freeorion-svn/ogre_plugins.cfg
- sed -i 's|PluginFolder=.|PluginFolder=/usr/lib/OGRE/|g' ${pkgdir}/opt/freeorion-svn/ogre_plugins.cfg
- #Link binaries
- mkdir -p ${pkgdir}/usr/bin
- install -D -m755 ${srcdir}/freeorion.sh ${pkgdir}/usr/bin/freeorion
- #Install the icons and .desktop files
- install -D -m644 ${srcdir}/freeorion.png ${pkgdir}/usr/share/pixmaps/freeorion.png
- install -D -m644 ${srcdir}/freeorion.desktop ${pkgdir}/usr/share/applications/freeorion.desktop
- rm -rf ${srcdir}/${_svnmod}-build
- }
- # vim:set ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement