updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cosmicbreak / PKGBUILD
blobb1437cc58ff39ccf270de1496fddcb2431bf2e24
1 # Maintainer: Perberos <perberos@gmail.com>
2 pkgname=cosmicbreak
3 pkgver=0.14.0
4 pkgrel=20110525
5 pkgdesc="CosmicBreak is an MMO third person shooter featuring massive PvP battles of up to 30 vs. 30 players at one time. Familiar WASD control and fast-paced Arena action makes CosmicBreak quick and easy to get into for any gamer."
6 arch=('any')
7 url="http://www.cosmicbreak.com/"
8 license=('custom:eula')
9 depends=('wine' 'icoutils')
10 makedepends=('cabextract')
11 source=(cosmicbreak.desktop
12                 cosmicbreak.sh)
13 md5sums=('8bef55b96971572b79cd410deb3c7eb2'
14          'f0dda822c63df97c32d7a7510fffe4ff')
16 install=cosmicbreak.install
17 _fileinstaller="CosmicBreakSetup_eng.exe"
19 package() {
21         # hago esto para que en caso de que actualicen el ejecutable, no tire error
22         # de md5sum
23         # si, muy malo
24         wget -c http://download.getamped.com/CosmicBreakSetup_eng.exe
25         # carpetas basicas
26         install -dm775 ${pkgdir}/opt/cosmicbreak
27         install -dm644 ${pkgdir}/usr/share/licenses/${pkgname}/
28         install -dm644 ${pkgdir}/usr/share/doc/${pkgname}/
30         # el archivo ejecutable se puede descomprimir como .cab
31         cabextract --directory=${pkgdir}/opt/cosmicbreak/ ${_fileinstaller}
32         
33         # quitando archivos sin usar
34         rm -f ${pkgdir}/opt/cosmicbreak/install-panel.bmp
35         rm -f ${pkgdir}/opt/cosmicbreak/install-icon.bmp
36         rm -f ${pkgdir}/opt/cosmicbreak/cs-banner.bmp
37         rm -f ${pkgdir}/opt/cosmicbreak/CosmicBreak.com.URL
38         
39         # grupo y permisos
40         chgrp games -R ${pkgdir}/opt/cosmicbreak/
41         chmod 775 -R ${pkgdir}/opt/cosmicbreak/
42         
43         # extracción de los iconos
44         wrestool -x -n 256 ${pkgdir}/opt/cosmicbreak/CosmicBreak.exe > \
45                 ${srcdir}/cosmicbreak.ico
46         convert ${srcdir}/cosmicbreak.ico ${srcdir}/cosmicbreak.png
47         
48         # movemos la licencia y copyright a su debida carpeta
49         mv ${pkgdir}/opt/cosmicbreak/CosmicBreakClientSoftwareLicenseAgreement.txt \
50                 ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
51         mv ${pkgdir}/opt/cosmicbreak/readme.txt \
52                 ${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT
53         mv ${pkgdir}/opt/cosmicbreak/StageEditorManual.pdf \
54                 ${pkgdir}/usr/share/doc/${pkgname}/
55         
56         # menu icon
57         install -Dm644 ${srcdir}/cosmicbreak.desktop \
58                 ${pkgdir}/usr/share/applications/cosmicbreak.desktop
59         install -Dm644 ${srcdir}/cosmicbreak.sh \
60                 ${pkgdir}/usr/bin/cosmicbreak
61         chmod +x ${pkgdir}/usr/bin/cosmicbreak
62         
63         # los iconos
64         install -Dm644 ${srcdir}/cosmicbreak-0.png \
65                 ${pkgdir}/usr/share/icons/hicolor/16x16/apps/cosmicbreak.png
66         install -Dm644 ${srcdir}/cosmicbreak-2.png \
67                 ${pkgdir}/usr/share/icons/hicolor/32x32/apps/cosmicbreak.png
68         install -Dm644 ${srcdir}/cosmicbreak-4.png \
69                 ${pkgdir}/usr/share/icons/hicolor/64x64/apps/cosmicbreak.png
70         
71         rm ${srcdir}/cosmicbreak-*.png