updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / steelstorm2 / PKGBUILD
blob21cc8996fa785979f6f420ad0b57f9860bceb84d
1 # Inspired by wido's steelstorm (episode 1) pkgbuild
2 # Maintainer: Jose Riha <jose1711 gmail com>
4 pkgname=steelstorm2
5 _pkgname=steelstorm
6 pkgver=2.00
7 pkgrel=02876
8 pkgdesc="a classic top down shooter, rife with explosions and things to explode, with a distinct visual style"
9 arch=('i686' 'x86_64')
10 url="http://www.steel-storm.com/"
11 license=('commercial')
12 install=(${_pkgname}.install)
13 depends=('curl' 'sdl_image' 'sdl_ttf' 'sdl_mixer' 'libvorbis' 'libogg' 'libmodplug' 'freetype2')
14 replaces=('steelstorm')
15 source=(steelstorm-br-${pkgver}.02626-release.tar.gz
16         steelstorm-br-${pkgver}.${pkgrel}-cummulative-patch.tar.gz
17         steelstorm.desktop
18         steelstorm.sh
19         steelstorm-dedicated.desktop
20         steelstorm-dedicated.sh)
21 noextract=(steelstorm-br-${pkgver}.${pkgrel}-cummulative-patch.tar.gz)
22 options=(!strip)
23 md5sums=('dec4ca58f1fc300a015ebba8768068b7'
24          '73899b1c853258474507d3ff83211ef0'
25          '92dbfd2bc861c56f4ed0be5fe1885cb3'
26          '73d596ac67fb34ebc28df1f89b789dc2'
27          '37765811bd5cc7349cee57623a1d7797'
28          '565ec1b72aff78bd2e311c289b65e2d5')
30 build() {
31 true
34 package() {
35   cd ${srcdir}
36   # patch
37   mkdir patch; cd patch
38   tar xzf ${srcdir}/steelstorm-br-${pkgver}.${pkgrel}-cummulative-patch.tar.gz
39   mv * ../steelstorm || true
40   mv gamedata/* ../steelstorm/gamedata
41   cd ..
43   cd ${_pkgname}
44   mkdir -p ${pkgdir}/opt/
45   
46   cp -r ${srcdir}/${_pkgname} ${pkgdir}/opt/
47   find ${pkgdir}/opt/steelstorm/gamedata -type f -exec chmod 0644 '{}' \;
49   if [ "${CARCH}" = "x86_64" ]; then
50       # Delete bin 32 bits
51       rm ${pkgdir}/opt/${_pkgname}/${_pkgname} ${pkgdir}/opt/${_pkgname}/${_pkgname}-dedicated
52       install -Dm 755 ${pkgdir}/opt/${_pkgname}/${_pkgname}64 ${pkgdir}/opt/${_pkgname}/${_pkgname}
53       install -Dm 755 ${pkgdir}/opt/${_pkgname}/${_pkgname}64-dedicated ${pkgdir}/opt/${_pkgname}/${_pkgname}-dedicated
55   elif [ "${CARCH}" = "i686" ]; then
56       # Delete bin 64 bits
57       rm ${pkgdir}/opt/${_pkgname}/${_pkgname}64 ${pkgdir}/opt/${_pkgname}/${_pkgname}64-dedicated
58       chmod 0755 ${pkgdir}/opt/${_pkgname}/${_pkgname}
59       chmod 0755 ${pkgdir}/opt/${_pkgname}/${_pkgname}-dedicated
60   
61   else
63       echo "If you're not running x86_64 or i686, how are you running Arch?"
64       return 1
65   fi
67   # Install .desktop, icon, license and bin
68   install -Dm 644 ${srcdir}/steelstorm.desktop ${pkgdir}/usr/share/applications/steelstorm.desktop
69   install -Dm 755 ${srcdir}/steelstorm.sh $pkgdir/usr/bin/steelstorm
70   install -Dm 644 ${srcdir}/steelstorm-dedicated.desktop ${pkgdir}/usr/share/applications/steelstorm-dedicated.desktop
71   install -Dm 755 ${srcdir}/steelstorm-dedicated.sh $pkgdir/usr/bin/steelstorm-dedicated
73   install -Dm 644 ${pkgdir}/opt/${_pkgname}/icons/ss_ep2_icon_64.png ${pkgdir}/usr/share/pixmaps/steelstorm.png
74   install -Dm 644 ${pkgdir}/opt/${_pkgname}/license.txt ${pkgdir}/usr/share/licenses/license.txt