Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 14th, 2012  |  syntax: None  |  size: 2.77 KB  |  views: 48  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor: Adam Griffiths <adam_griffithsAATTdart.net.au>
  2. # Contributor: Todd Maynard <arch@toddmaynard.com>
  3. # Many thanks to AlexExtreme <alex@alex-smith.me.uk> (Frugalware pkg maintainer) from which much of this was borrowed.
  4. # Many thanks to Stefan for patch for x86_64 support and el.ini fix.
  5. # Contributor: Angelo Theodorou <encelo@users.sourceforge.net>
  6.  
  7. pkgname=eternallands
  8. pkgver=1.9.3
  9. pkgrel=1
  10. pkgdesc="A free 3D MMORPG game with thousands of on-line players"
  11. arch=('i686' 'x86_64')
  12. license=('custom')
  13. url="http://www.eternal-lands.com/"
  14. depends=('sdl_net' 'sdl_image' 'openal' 'cal3d' 'libxml2' 'libvorbis' 'libgl' 'mesa')
  15. makedepends=('unzip' 'git')
  16. options=('!emptydirs')
  17. source=('http://www.eternal-lands.com/el_linux_193.zip' 'eternallands.desktop')
  18. md5sums=('a1d0c7c5983d7c33ee0edc7a4e4867d6' '4564fba195fc39fce438f717dde0ad9e')
  19.  
  20. build()
  21. {
  22.   # Local to the function to avoid version bumping
  23.   _gitroot="git://github.com/raduprv/Eternal-Lands.git"
  24.   _gitname="elc"
  25.  
  26.   cd "$srcdir"
  27.   msg "Connecting to GIT server...."
  28.  
  29.   if [ -d $_gitname ] ; then
  30.     cd $_gitname && git pull $_gitroot
  31.     msg "The local files are updated."
  32.   else
  33.     git clone $_gitroot $_gitname
  34.   fi
  35.  
  36.   msg "GIT checkout done or server timeout"
  37.   msg "Starting make..."
  38.  
  39.   rm -rf "$srcdir/$_gitname-build"
  40.   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  41.   cd "$srcdir/$_gitname-build"
  42. #  git checkout v${pkgver}
  43.  
  44.   # Compile the client...
  45.   if [ "$CARCH" == "x86_64" ]; then
  46.     sed -i "s|i686|x86-64|" make.defaults
  47.     sed -i "s|OPTIONS = |OPTIONS = -DX86_64 |" Makefile.linux
  48.   fi
  49.   sed -i "s@OPTIONS = @OPTIONS = -DDATA_DIR="\\\\\"/usr/share/eternallands/"\\\\\" @g" Makefile.linux
  50.   sed -i "s@^LDFLAGS=@LDFLAGS=-lstdc++ -lX11 @" Makefile.linux
  51.   make -f Makefile.linux release
  52. }
  53.  
  54. package() {
  55.   cd "$srcdir"
  56.  
  57.   mkdir -p "${pkgdir}/usr/bin"
  58.   mkdir -p "${pkgdir}/usr/share/licenses/eternallands/"
  59.   mkdir -p "${pkgdir}/usr/share/applications"
  60.   mkdir -p "${pkgdir}/usr/share/pixmaps"
  61.   mkdir -p "${pkgdir}/usr/share/eternallands"
  62.  
  63.   install -m755 elc-build/el.x86.linux.bin "${pkgdir}/usr/bin/el"
  64.   install -m644 elc-build/eternal_lands_license.txt "${pkgdir}/usr/share/licenses/eternallands/"
  65.   install -m644 elc-build/elc.png "${pkgdir}/usr/share/pixmaps/eternallands.png"
  66.   install -m644 eternallands.desktop "${pkgdir}/usr/share/applications"
  67.  
  68.   cd el_linux
  69.  
  70.   # Compress textures and maps
  71.   find \( -name *.bmp -or -name *.elm \) -exec gzip {} \;
  72.  
  73.   for dir in 2dobjects 3dobjects actor_defs animations languages maps meshes particles shaders skeletons skybox textures; do
  74.         cp -R ${dir} "${pkgdir}/usr/share/eternallands/"
  75.   done
  76.  
  77.   for file in *.ini *.txt *.lst *.xml; do
  78.     install -m644 ${file} "${pkgdir}/usr/share/eternallands/"
  79.   done
  80. }