summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 317d988d58ed1b03c94c840da1c3f18a98d83e2d (plain)
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
63
64
# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG

pkgname=hurrican-svn
pkgver=r193
pkgrel=1
pkgdesc="Freeware jump and shoot game based on the Turrican game series (development version)"
arch=('i686' 'x86_64')
url="http://hurrican.sourceforge.net"
license=('custom: MIT')
depends=('sdl_image' 'sdl_mixer' 'libmodplug' 'libgl')
makedepends=('subversion' 'mesa')
conflicts=('hurrican')
source=(hurrican::"svn+http://svn.code.sf.net/p/hurrican/code/trunk#revision=193"
        hurrican.desktop
        hurrican.png)
sha256sums=('SKIP'
            '11f6a06115d543b9dfb74781c4db79224fceec2f6c0ceecd9c2cd15081d96174'
            'be6b84adf5bd89430f2e087d9fe51e9e769cf1a17fb89f4288e8d4551ecf0b84')

pkgver() {
  cd hurrican
  local ver="$(svnversion)"
  printf "r%s" "${ver//[[:alpha:]]}"
}

prepare() {
  cd hurrican/Hurrican/src

  # use different data directory
  sed 's|^DEFINES :=.*|& -DUSE_STORAGE_PATH="\\"/usr/share/hurrican\\""|' -i Makefile
  # add our C(XX)FLAGS
  sed "s/^CFLAGS :=.*/& $CFLAGS/g" -i Makefile
  # disable compressed texture support (broken)
  sed -r "s/-DUSE_PVRTC|-DUSE_ETC1//g" -i Makefile
}

build() {
  make TARGET=linux -C hurrican/Hurrican/src
}

package() {
  cd hurrican/Hurrican

  # executable
  install -Dm0755 hurricanlinux "$pkgdir"/usr/bin/hurrican

  # data
  for d in lang data/{levels,music,sfx,shaders,textures}; do
    install -d "$pkgdir"/usr/share/hurrican/$d
    install -m644 $d/*.* "$pkgdir"/usr/share/hurrican/$d
  done

  cd ..
  # readme and license
  install -Dm0644 README.txt "$pkgdir"/usr/share/doc/hurrican/README.txt
  install -m0644 Hurrican/readme.txt "$pkgdir"/usr/share/doc/hurrican
  install -d "$pkgdir"/usr/share/licenses/hurrican
  ln -s /usr/share/doc/hurrican/README.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

  cd ..
  # .deskop integration
  install -Dm0644 hurrican.desktop "$pkgdir"/usr/share/applications/hurrican.desktop
  install -Dm0644 hurrican.png "$pkgdir"/usr/share/pixmaps/hurrican.png
}