updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / supermariowar / PKGBUILD
blob58318374848f97695b06b0336053cdda79c16a4d
1 # Maintainer: Alexander Rødseth <rodseth@gmail.com>
2 pkgname=supermariowar
3 pkgver=1.8
4 pkgrel=1
5 pkgdesc="A Super Mario multiplayer game"
6 arch=('x86_64' 'i686')
7 url="http://smw.supersanctuary.net/site/"
8 license=('GPL2' 'custom:fangame-please-dont-sue')
9 if [ "$CARCH" = "x86_64" ]
10 then
11   depends=('lib32-sdl' 'lib32-sdl_image' 'lib32-sdl_mixer' 'lib32-libpng>=1.4')
12 else
13   depends=('sdl' 'sdl_image' 'sdl_mixer' 'libpng12')
15 makedepends=('wget' 'imagemagick')
16 source=("http://smw.supersanctuary.net/18Beta2/smw-$pkgver-beta2-linux.tar.gz"
17         "supermariowar.desktop")
18 md5sums=('b3ec95c382fca4f33d603d12a3889347'
19          '7ddab775ec4d9874030a45a3e6dec13d')
21 build() {
22   cd "$srcdir"
24   msg2 "Retrieving license..."
25   wget http://smw.supersanctuary.net/site/ -O- | grep "code:" | cut -d"(" -f2 | cut -d ")" -f1 > LICENSE
27   msg2 "Retrieving icon..."
28   wget http://smw.supersanctuary.net/site/logo.png -O- | convert -crop 48x48+406+12 - $pkgname.png
30   msg2 "Patching executables..."
31   sed -i "s:/usr/share/games/smw:/usr/share/smariowar:" "usr/games/smw"
32   sed -i "s:/usr/share/games/smw:/usr/share/smariowar:" "usr/games/smw-leveledit"
33   sed -i "s:/usr/share/games/smw:/usr/share/smariowar:" "usr/games/smw-worldedit"
36 package() {
37   cd "$srcdir/usr"
39   mkdir -p "$pkgdir/usr/share/doc/$pkgname"
40   mkdir -p "$pkgdir/usr/share/smariowar"
41   mkdir -p "$pkgdir/usr/bin"
43   msg2 "Packaging game..."
44   cp doc/smw-1.8b2/* "$pkgdir/usr/share/doc/$pkgname"
45   cp games/* "$pkgdir/usr/bin"
46   cp -r share/games/smw/* "$pkgdir/usr/share/smariowar"
48   # Missing libpng 1.3 fix for 64-bit
49   if [ "$CARCH" = "x86_64" ]
50   then
51     mkdir -p "$pkgdir/usr/lib32"
52     ln -s /usr/lib32/libpng14.so "$pkgdir/usr/lib32/libpng.so.3"
53   fi
55   cd ..
57   msg2 "Packaging license..."
58   install -Dm644 LICENSE \
59     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
61   msg2 "Packaging menu entry and icon..."
62   install -Dm644 "../$pkgname.desktop" \
63     "$pkgdir/usr/share/applications/$pkgname.desktop"
64   install -Dm644 "$pkgname.png" \
65     "$pkgdir/usr/share/pixmaps/$pkgname.png"
68 # vim:set ts=2 sw=2 et: