Advertisement
Guest User

PKGBUILD

a guest
Oct 30th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.54 KB | None | 0 0
  1.  
  2. pkgname=doomrl
  3. pkgver=0.9.9.6
  4. pkgrel=3
  5. pkgdesc="A roguelike game based on the FPS Doom."
  6. arch=("i686" "x86_64")
  7. url="http://doom.chaosforge.org/"
  8. license=("unknown")
  9. depends=("sdl_mixer"
  10.     "zlib"
  11.     "lua"
  12.     "timidity-eawpatches"
  13.     "sdl_image")
  14. [ "$CARCH" = "x86_64" ] && makedepends=("sox"
  15.                 "awk")
  16. source=("http://doom.chaosforge.org/file_download/24/doomrl-linux-i386-${pkgver//./}.tar.gz" "doomrl")
  17. md5sums=('91b4aba471b6138ff2c7d32739350458'
  18.          'd5b1ea417cbd23fa7ed8009ec0f0c38f')
  19.  
  20. [ "$CARCH" = "x86_64" ] && source=("http://doom.chaosforge.org/file_download/25/doomrl-linux-x64-${pkgver//./}.tar.gz" "doomrl")
  21. [ "$CARCH" = "x86_64" ] && md5sums=('9d3aa84421c6dc900c8a8e7c2619eee2'
  22.                      'd5b1ea417cbd23fa7ed8009ec0f0c38f')
  23. SIMONSITE="http://dl.dropbox.com/u/23785083/Doom_the_Roguelike_The_Album/OGG/"
  24.  
  25. SIMONV="doom_the_roguelike.ogg final_showdown.ogg hells_weapons.ogg of_skull_and_bone.ogg something_wicked.ogg the_brick_song.ogg too_hot_down_here.ogg unholy_cathedral.ogg"
  26.  
  27. build() {
  28.     if [ "$CARCH" = "x86_64" ]; then
  29.             # for x86_64
  30.         cd "$srcdir/doomrl-linux-x64-${pkgver//./}"
  31.         cp musichq.lua musicogg.lua
  32.         MP3S=$(grep "= \"" musicogg.lua | sed -e 's/.*= \"mp3\///' -e 's/\",.*//' | awk '!x[$0]++')
  33.  
  34.         CONVERTS=$(echo "$MP3S" | awk "!/$(echo $SIMONV | sed -e 's/ /|/g' -e 's/ogg/mp3/g')/")
  35.  
  36.         mkdir ogg
  37.         for ANMP3 in $CONVERTS
  38.         do
  39.             echo "Converting: $ANMP3"
  40.          OGGNAME=$(echo $ANMP3 | sed 's/mp3/ogg/g')
  41.             sox "mp3/$ANMP3" -t vorbis "ogg/$OGGNAME" --show-progress
  42.         done
  43.  
  44.         for ANOGG in $SIMONV
  45.         do
  46.             QUICKFIX=$(echo "$ANOGG" | sed 's/doom_the_roguelike.ogg/doom_the_roguelike_theme.ogg/')
  47.             echo "Downloading: $QUICKFIX"
  48.             wget "$SIMONSITE$QUICKFIX" -O ogg/$ANOGG
  49.         done
  50.  
  51.         sed -i 's/mp3/ogg/g' musicogg.lua
  52.         sed -i 's/dofile \"music.*lua\"/dofile \"musicogg.lua\"/' config.lua
  53.         rm mp3/*
  54.  
  55.         # Copy program and required files
  56.         mkdir -p "$pkgdir/usr/share/doomrl"
  57.         cp -a * "$pkgdir/usr/share/doomrl"
  58.  
  59.         # Copy script used to run program
  60.         install -D "$srcdir/doomrl" "$pkgdir/usr/bin/doomrl"
  61.  
  62.         # This is needed to save games and scores
  63.         chmod 4755 "$pkgdir/usr/share/doomrl/doomrl"
  64.  
  65.     else    # for i686
  66.         cd "$srcdir/doomrl-linux-i386-${pkgver//./}"
  67.  
  68.         # Copy program and required files
  69.         mkdir -p "$pkgdir/usr/share/doomrl"
  70.         cp -a * "$pkgdir/usr/share/doomrl"
  71.  
  72.         # Copy script used to run program
  73.         install -D "$srcdir/doomrl" "$pkgdir/usr/bin/doomrl"
  74.  
  75.         # This is needed to save games and scores
  76.         chmod 4755 "$pkgdir/usr/share/doomrl/doomrl"
  77.     fi
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement