secret
Created

Dungeon Defenders 7.48 PKGBUILD

  • Download Gist
PKGBUILD
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
# Contributor: Claudio Kozicky <claudiokozicky@gmail.com>
# Contributor: Ben R <thebenj88 *AT* gmail *DOT* com>
# Modified by: Brandon D <draygera *AT* gmail *DOT* com>
 
pkgname=dungeon-defenders-hib
_pkgname=dungeondefenders
pkgver=7.48
_pkgver=03052013
pkgrel=1
epoch=1
pkgdesc="A co-operative 3D tower defense game with medieval theming."
url="http://dungeondefenders.com/"
license=('custom')
arch=('i686' 'x86_64')
[ $CARCH = "i686" ] &&\
depends=('libgl' 'libxext' 'sdl2' 'openal')
[ $CARCH = "x86_64" ] &&\
depends=('lib32-libgl' 'lib32-libxext' 'lib32-sdl2' 'lib32-openal')
makedepends=('unzip')
source=(hib://dundef-linux-$_pkgver.mojo.run $_pkgname.desktop)
md5sums=('31c59c04366405c5d57665bcac219669'\
'3b62818d4ca9ebc5e23406308f15bdd1')
DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Manually download it to \"$(pwd)\", or set up a hib:// DLAGENT in /etc/makepkg.conf."; exit 1')
PKGEXT='.pkg.tar'
 
build() {
cd $srcdir
 
# unzip returns 1 because *.mojo.run is not a valid ZIP file
# if unzip returns a value different from 0, save it to $_return
unzip -uo dundef-linux-$_pkgver.mojo.run || _return=$?
# if $_return is set and is not equal to "1", exit
[ $_return ] && [ ! $_return -eq "1" ] && exit 1 || true
 
# use system libraries
rm $srcdir/data/UDKGame/Binaries/libopenal.so.1
rm $srcdir/data/UDKGame/Binaries/libSDL2-2.0.so.0
 
# fix https://bugzilla.icculus.org/show_bug.cgi?id=5894
sed -e 's/DefaultGameplayLevel=LobbyLevel_Valentines2013.udk/LobbyLevel.udk/'\
-e 's/DefaultGameplayLevelRanked=LobbyLevel_Valentines2013.udk/LobbyLevel.udk/'\
-i data/UDKGame/Config/DefaultDunDef.ini
}
 
package() {
cd $srcdir
 
# data
cd data
find . -type f -exec install -Dm644 '{}' $pkgdir/opt/$_pkgname/'{}' \;
chmod +x $pkgdir/opt/$_pkgname/{DungeonDefenders,UDKGame/Binaries/{DungeonDefenders-x86,xdg-open}}
cd $OLDPWD
 
# launcher
install -d $pkgdir/usr/bin
ln -s /opt/$_pkgname/DungeonDefenders $pkgdir/usr/bin/$_pkgname
 
# icon and .desktop
install -d $pkgdir/usr/share/pixmaps
ln -s /opt/$_pkgname/DunDefIcon.png $pkgdir/usr/share/pixmaps/$_pkgname.png
install -Dm644 $_pkgname.desktop $pkgdir/usr/share/applications/$_pkgname.desktop
}
dungeondefenders.desktop
1 2 3 4 5 6 7 8 9 10
[Desktop Entry]
Value=1.0
Type=Application
Name=Dungeon Defenders
Categories=Game
Path=/usr/bin
Exec=dungeondefenders
Icon=/usr/share/pixmaps/dungeondefenders.png
Terminal=false
Comment=A co-operative 3D tower defense game with medieval theming.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.