summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 954ec6fc8f488aa8df3821588ea8db747aa38263 (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
pkgname=ecwolf-git
_pkgname=ecwolf
pkgver=1.3.3.r365.g0fc332d
pkgrel=1
pkgdesc='Advanced source port of "Wolfenstein 3D" and "Spear of Destiny" based on Wolf4SDL (development version)'
arch=('i686' 'x86_64')
url="http://maniacsvault.net/ecwolf"
license=('GPL' 'custom: ID')
provides=('ecwolf')
depends=('libvorbis' 'flac' 'opusfile' 'libmodplug' 'fluidsynth' 'libjpeg' 'sdl2' 'sdl2_net')
makedepends=('git' 'cmake' 'sdl' 'sdl2')
optdepends=('wolf3d-shareware: Demo version of Wolfenstein 3D')
conflicts=('ecwolf')

source=("git+https://bitbucket.org/ecwolf/ecwolf")
sha256sums=('SKIP')

pkgver() {
  cd $_pkgname
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  echo "Building ecwolf..."
  export LDFLAGS="-lvorbisfile -lopusfile -lFLAC  -lmodplug -lfluidsynth $LDFLAGS"
  cmake -B build ecwolf -DGPL=ON
  make -C build
}

package() {
  cd build
  # binaries
  mkdir -p $pkgdir/usr/bin
  ln -s /usr/share/ecwolf/ecwolf $pkgdir/usr/bin/ecwolf
  install -Dm755 ecwolf $pkgdir/usr/share/ecwolf/ecwolf
  # data
  install -Dm644 ecwolf.pk3 $pkgdir/usr/share/ecwolf/ecwolf.pk3
  cd ../ecwolf
  #icon and shortcut
  install -Dm644 $startdir/icon.png $pkgdir/usr/share/ecwolf/icon.png
  install -Dm755 $startdir/ecwolf.desktop $pkgdir/usr/share/applications/ECWolf.desktop
  # doc
  install -d $pkgdir/usr/share/doc/$pkgname
  install -Dm644 README.* $pkgdir/usr/share/doc/$pkgname
  # license
  install -Dm644 docs/license-id.txt $pkgdir/usr/share/licenses/$pkgname/license-id.txt
}