summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8e49bed6678d1bfc2aee6d597550294b649eced5 (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
# Contributor: chip_exe
# https://aur.archlinux.org/packages/openxray-git/
# <openxray@yahoo.com>
pkgname=openxray-git
pkgver=1.6.02_770202c82
pkgrel=1 
pkgdesc="Unofficial X-Ray Engine Linux port by OpenXRay team (Originally developed by GSC Game World)"                                          
arch=('x86_64') 
url="https://github.com/OpenXRay/xray-16"
license=('custom:Custom 3-—Ālause BSD')
install="info.install"
makedepends=(gcc git cmake libglvnd libjpeg6-turbo ncurses pcre2 pcre)
depends=(glew sdl2 openal intel-tbb crypto++ liblockfile freeimage libogg libtheora libvorbis lzo lzop libjpeg-turbo)  
conflicts=(openxray openxray-dev)
source=(xray-16::git+https://github.com/OpenXRay/xray-16.git#branch=xd_dev)
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/xray-16"
  printf 1.6.02_"$(git rev-parse --short HEAD)"
}

prepare(){
cd "$srcdir/xray-16"
git submodule init
git submodule update
}

build() {
   cd "$srcdir/xray-16"
   rm -fr bin
   mkdir "$srcdir/xray-16/bin"
   cd "$srcdir/xray-16/bin"
   cmake ..
   #cmake .. -DCMAKE_BUILD_TYPE=Debug
   make
}

package() {
    cd "$srcdir/xray-16/bin"
    make DESTDIR="${pkgdir}/" install
    mv "${pkgdir}/usr/games/" "${pkgdir}/usr/bin"
    mkdir -p "${pkgdir}/usr/share/licenses/$pkgname/"
    cp "$srcdir/xray-16/License.txt" "${pkgdir}/usr/share/licenses/$pkgname/"
}