summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1c527c500c5302a0456759cb5a872a180eb24dba (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
# Maintainer: Arthur HUGEAT <hugeat dot arthur at gmail dot com>
pkgname=gf-git
pkgver=0.18.1.r2.g9de9dd7
pkgrel=1
pkgdesc="Gamedev Framework (gf) is a framework to build 2D games in C++14. It is based on SDL and OpenGL ES 2.0, and presents an API that is very similar to the graphics module of SFML with additional features (development version)."
arch=('x86_64' 'i686')
url="https://gamedevframework.github.io/"
license=('ZLIB')
depends=('sdl2' 'boost-libs' 'freetype2' 'zlib' 'pugixml')
makedepends=('boost' 'cmake' 'git')
provides=('gf')
conflicts=('gf')

source=("git+https://github.com/GamedevFramework/gf")
sha256sums=('SKIP')

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

prepare() {
	cd "${srcdir}/gf"
  git checkout develop
	git submodule update --init
}

build() {
  cd "${srcdir}/gf"
  cmake -DGF_USE_EMBEDDED_LIBS=ON \
        -DGF_BUILD_GAMES=OFF \
        -DGF_BUILD_EXAMPLES=OFF \
        -DGF_BUILD_DOCUMENTATION=OFF \
        -DGF_SINGLE_COMPILTATION_UNIT=OFF \
        -DCMAKE_INSTALL_PREFIX=/usr \
        .
  make
}

check() {
  cd "${srcdir}/gf"
  make test
}

package() {
	cd "${srcdir}/gf"

	make DESTDIR="$pkgdir/" install
	mv ${pkgdir}/usr/share/doc/GF ${pkgdir}/usr/share/doc/gf
	install -Dm644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt
}