summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8be55884994061b6cbd4428f50a1e6de63762568 (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
# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG

pkgname=alephone-git
pkgver=1.3a2.r4938.7d24fec4
pkgrel=1
pkgdesc='A free, enhanced port of the classic FPS "Marathon 2" by Bungie Software (development version)'
arch=('i686' 'x86_64')
url="https://alephone.lhowon.org/"
license=('GPL3')
conflicts=("alephone")
provides=("alephone")
depends=('sdl2_ttf' 'sdl2_image' 'sdl2_net' 'libmad' 'glu' 'zziplib' 'ffmpeg'
         'boost-libs' 'curl')
optdepends=('alephone-eternalx: community-made scenario'
            'alephone-evil: community-made scenario'
            'alephone-infinity: original data for Marathon Infinity'
            'alephone-marathon: M1A1 data converted for AlephOne'
            'alephone-marathon2: original data for Marathon 2: Durandal')
makedepends=('boost' 'mesa' 'icoutils')
source=("git+https://github.com/Aleph-One-Marathon/alephone")
md5sums=('SKIP')

pkgver() {
  cd alephone/Source_Files/Misc

  local _ver="$(grep '^#define A1_DISPLAY_VERSION' alephversion.h | cut -d\" -f2)"
  printf "%s.r%s.%s" "$_ver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd alephone

  # convert the windows icons
  cd Resources/Windows
  icotool -x -w 48 alephone.ico -o "$srcdir"/alephone.png
  icotool -x -w 48 marathon.ico -o "$srcdir"/alephone-marathon.png
  icotool -x -w 48 marathon2.ico -o "$srcdir"/alephone-marathon2.png
  icotool -x -w 48 marathon-infinity.ico -o "$srcdir"/alephone-infinity.png
}

build() {
  cd alephone
  
  ./autogen.sh --prefix=/usr --without-smpeg
  make
}

package() {
  cd alephone

  make DESTDIR="$pkgdir/" install

  # icons
  install -d "$pkgdir"/usr/share/icons
  install -m644 "$srcdir"/*.png "$pkgdir"/usr/share/icons

  # docs
  install -Dm644 README "$pkgdir"/usr/share/doc/alephone/README
  install -m644 docs/*.html "$pkgdir"/usr/share/doc/alephone
}