Advertisement
Guest User

Untitled

a guest
Aug 5th, 2011
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.09 KB | None | 0 0
  1. # Maintainer: Malte Wessel <muunleit AT lavabit DOT com>
  2.  
  3. pkgname=atomzombiesmasher
  4. pkgver=1.85
  5. pkgrel=1
  6. pkgdesc="RTS, evacuating civilians out of zombie-contaminated cities. (Commercial)"
  7. arch=('any')
  8. url="http://blendogames.com/atomzombiesmasher/"
  9. license=("custom:commercial")
  10. md5sums=('9492b09f4655cc121959ca1c1a0bc84c')
  11.  
  12. # If you get another file from Blendo Games, please change it here
  13. _gamepkg="${pkgname}_v1_85.tar"
  14. _gamemd5="304a494d4c81296c0d13b6cbe051e04c"
  15.  
  16.  
  17. build() {
  18.   # Check if game-archive is in build directory, than validate
  19.   cd $startdir
  20.   if [[ ! -f $_gamepkg ]]; then
  21.     msg "!! AtomZombieSmasher is a commercial game."
  22.     msg "!! You need a full copy of this game in order to install it."
  23.     msg "!! Please copy $_gamepkg to $startdir " && return 1
  24.   else
  25.     if [[ "$(md5sum $_gamepkg | awk '{print $1}')" == "$_gamemd5" ]]; then
  26.       msg "Check: $_gamepkg is the correct."
  27.     else
  28.       msg "!! Check: $_gamepkg didn't match md5sum. Exiting!" && return 1
  29.     fi
  30.   fi
  31.  
  32.   # Extract game-archive
  33.   msg "Extracting archive..."
  34.   tar xaf $startdir/$_gamepkg -C $srcdir
  35.  
  36.   cd $srcdir/$pkgname
  37.   sed -i "s/\.\/data/\/opt\/$pkgname\/data/g" AtomZombieSmasher
  38.  
  39.   # Create startscript
  40.   cat > $srcdir/$pkgname.desktop <<-END
  41.   [Desktop Entry]
  42.   Name=AtomZombieSmasher
  43.   GenericName=AtomZombieSmasher
  44.   Comment=RTS, evacuating civilians out of zombie-contaminated cities
  45.   Exec=atomzombiesmasher
  46.   Icon=/opt/atomzombiesmasher/data/content/textures/icon.png
  47.   Terminal=false
  48.   Type=Application
  49.   Categories=Game;
  50.     END
  51. }
  52.  
  53. package() {
  54.   # Create pkgdir folders
  55.   install -d $pkgdir/usr/bin
  56.   install -d $pkgdir/usr/share/doc/$pkgname
  57.   install -d $pkgdir/usr/share/applications
  58.   install -g games -d $pkgdir/opt/$pkgname
  59.  
  60.   # Copy game
  61.   cp -a $srcdir/$pkgname/*              $pkgdir/opt/$pkgname
  62.   mv $pkgdir/opt/$pkgname/readme.htm    $pkgdir/usr/share/doc/$pkgname
  63.   cp -a $srcdir/$pkgname.desktop        $pkgdir/usr/share/applications/
  64.  
  65.   # executable link
  66.   ln -s /opt/$pkgname/AtomZombieSmasher $pkgdir/usr/bin/$pkgname
  67. }
  68.  
  69. # vim:set ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement