summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 582fb3fdb67184e1a56fe4b31c5d0a2829dec82f (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
#Maintainer: Evert Vorster <evorster@gmail.com>
pkgname=vegastrike-engine-release-git
pkgver=rev.13874
pkgrel=1
pkgdesc="A spaceflight simulator in massive universe"
arch=('i686' 'x86_64')
url="www.vega-strike.org"
license=('GPL')
depends=('boost-libs' 'python' 'freeglut' 'gtk2' 'openal' 'sdl' 'glu')
#optdepends=('vegastrike-data: original dataset')
makedepends=('git' 'cmake')
provides=('vegastrike-engine')
conflicts=('vegastrike-engine')
#install=$pkgname.install
#options=(!makeflags debug !strip)

source=('git+https://github.com/vegastrike/Vega-Strike-Engine-Source#branch=0.6.x')
sha1sums=('SKIP')

pkgver() {
  cd "${srcdir}"/Vega-Strike-Engine-Source
  echo "rev.$(git rev-list --count HEAD)"
}

prepare(){
#PR patches here.
cd "${srcdir}"/Vega-Strike-Engine-Source
#patch -Np1 -i ../../install.patch

cd ..
#personal patches
mkdir -p build
#for now, these two patches modify the same line in CMakelists.txt
#patch -Np1 -i ../py2.patch
patch -Np1 -i ../Python.patch
#patch -Np1 -i ../galaxy.patch
#patch -Np1 -i ../nav.patch
#patch -Np1 -i ../nav_galaxy.patch
}

build(){
	cd build
	cmake ../Vega-Strike-Engine-Source/engine/ \
	-DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
	-DENABLE_PIE=ON \
	-DUSE_SYSTEM_BOOST=ON \
	-DUSE_PYTHON_3=ON 
	make
}

package() {
#mkdir -p "${pkgdir}"/usr/bin
#  cd build
#  mv -vf setup/vssetup setup/vegasettings
#  cp -vp {vegastrike,setup/vegasettings,objconv/mesh_tool} "${pkgdir}"/usr/bin
make -C build DESTDIR="${pkgdir}" install
}