summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a425ebae621277e97bed0b2cc1039e7e738c5dad (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
# Maintainer: Martin Chang <marty188586@gmail.com>
pkgname=diligent-engine-git
pkgver=2.5.2.r0.ga4e03562
pkgrel=1
pkgdesc='A modern cross-platform low-level graphics library and rendering framework '
arch=('x86_64')
url='https://github.com/DiligentGraphics/DiligentEngine'
license=('Apache')
depends=(libxcursor mesa-utils python-distlib libxrandr libglvnd libxinerama libxi)
makedepends=(cmake git make clang)
checkdepends=()
optdepends=(vulkan-devel)
provides=(diligent-engine)
conflicts=()
replaces=()
options=()
source=("$pkgname::git+https://github.com/DiligentGraphics/DiligentEngine.git")
sha256sums=('SKIP')

prepare() {
  cd "$pkgname"
  git checkout master
  git pull
  git submodule update --recursive --init
}

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

build() {
	cd "$pkgname"
  [ -d build ] && rm -rf build
  mkdir build
  cd build
  cmake                          \
    -DCMAKE_BUILD_TYPE=RELEASE   \
    -DCMAKE_INSTALL_PREFIX=/usr  \
    -DCMAKE_C_COMPILER=clang     \
    -DCMAKE_CXX_COMPILER=clang++ \
    ..
	make -j4
}

package() {
	cd "$pkgname/build"
	make DESTDIR="$pkgdir/" install
}