Advertisement
Guest User

Untitled

a guest
Sep 19th, 2012
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Arkham <arkham at archlinux dot us>
  2. # Contributor: Travis Nickles <ryoohki7@yahoo.com>
  3. # Contributor: Slash <demodevil5[at]yahoo[dot]com>
  4.  
  5. pkgname=enemy-territory
  6. pkgver=2.60b
  7. pkgrel=12
  8. pkgdesc="Wolfenstein: Enemy Territory is a completely free, standalone, team-based, multiplayer FPS."
  9. arch=('i686' 'x86_64')
  10. url="http://www.planetwolfenstein.com/"
  11. license=('custom')
  12. depends=('mesa' 'libxext')
  13. optdepends=('et-sdl-sound')
  14. [[ "$CARCH" == "x86_64" ]] && depends=('lib32-mesa' 'lib32-libxext' 'lib32-libxdamage') && optdepends=('et-sdl-sound')
  15. makedepends=('unzip')
  16. backup=(opt/enemy-territory/etmain/server.cfg
  17.         opt/enemy-territory/etmain/punkbuster.cfg)
  18. install=$pkgname.install
  19. source=(http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/et/linux/et-linux-2.60.x86.run
  20.         http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/et/ET-$pkgver.zip http://nullkey.kapsi.fi/et-sdl-sound/et-sdl-sound.gz
  21.         $pkgname.desktop et-ded et-pbupdate.sh et.sh etded.sh)
  22. options=(!strip)
  23. md5sums=('2d2373f29f02e18d365d7f1860eee435'
  24.          'fb83b8732fc7373c277180b663debf57'
  25.          'd4f6bc413c67ece7c8f30219edc9a16c'
  26.          'c0f9fc3f6d77814dae435be2aa42c46e'
  27.          '665f288d654758343f11898031efeda5'
  28.          'ce374bdbae3c8e4f4319b37984a7d9e2'
  29.          'd55fc4880bcb2a93d2294b8861a852df'
  30.          '0645baca975faa176a388e8c41a9ff8d')    
  31.  
  32. build() {
  33.     cd $srcdir
  34.  
  35.     #Make Loki installer executable
  36.     chmod +x et-linux-2.60.x86.run
  37.  
  38.     # Extract data from installer
  39.     ./et-linux-2.60.x86.run --noexec --target $pkgname
  40.  
  41.     # Remove unnecessary files
  42.     rm -r $pkgname/bin $pkgname/setup.{data,sh} $pkgname/README
  43.  
  44.     # Copy game EULA to main directory
  45.     cp $pkgname/Docs/EULA_Wolfenstein_Enemy_Territory.txt $pkgname
  46.  
  47.     # Patch for x86_64 compatibility
  48.     if [[ "$CARCH" == "x86_64" ]]; then
  49.         sed "5,5c\export LD_LIBRARY_PATH=/opt/lib32/usr/lib/:/opt/lib32/lib/:\$LD_LIBRARY_PATH" -i et.sh
  50.         sed "5,5c\export LD_LIBRARY_PATH=/opt/lib32/usr/lib/:/opt/lib32/lib/:\$LD_LIBRARY_PATH" -i etded.sh
  51.     fi
  52.  
  53.     # Place scripts in main directory
  54.     install -Dm 755 et.sh $pkgname/et
  55.     install -Dm 755 etded.sh $pkgname/etded
  56.  
  57.     # Apply patched executables
  58.     cp Enemy\ Territory\ $pkgver/linux/{et,etded}.x86 $pkgname
  59.  
  60.     # Make PunkBuster updater utility executable
  61.     chmod +x $pkgname/pb/pbweb.x86
  62.  
  63.     # Make directories for PunkBuster with necessary permissions to
  64.     # work with games user and group
  65.     install -dm 2775 -g games $pkgname/pb $pkgname/pb/{dll,htm,svlogs,svss}
  66.  
  67.     # Install licenses
  68.     install -Dm 644 $pkgname/EULA_Wolfenstein_Enemy_Territory.txt \
  69.         $pkgdir/usr/share/licenses/$pkgname/EULA_Wolfenstein_Enemy_Territory.txt
  70.     install -Dm 644 $pkgname/pb/PB_EULA.txt $pkgdir/usr/share/licenses/$pkgname/PB_EULA.txt
  71.  
  72.     # Make directories and move game data
  73.     install -d $pkgdir/{opt,usr/bin}
  74.     mv $pkgname $pkgdir/opt
  75.  
  76.     # Install PunkBuster updater script
  77.     install -Dm 755 et-pbupdate.sh $pkgdir/usr/sbin/et-pbupdate
  78.  
  79.     # Install rc.d script
  80.     install -Dm 755 et-ded $pkgdir/etc/rc.d/et-ded
  81.  
  82.     # Install desktop file and icon
  83.     install -Dm 644 $pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
  84.     install -Dm 644 $pkgdir/opt/$pkgname/ET.xpm $pkgdir/usr/share/pixmaps/$pkgname.xpm
  85.  
  86.     # Install et-sdl-sound
  87.     install -m 755 et-sdl-sound $pkgdir/usr/bin/enemy-territory
  88.  
  89.     # Make symlinks to main scripts
  90.     ln -sf /opt/$pkgname/etded $pkgdir/usr/bin/${pkgname}d
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement