summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a08a27841bcd9e0a8e26a68764c2ab2cf9997419 (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
# Maintainer: Dalton "naelstrof" Nell <naelstrof@gmail.com>
pkgname=tmxlite-git
pkgver=v1.0.0.r0.gfa0845c
pkgrel=1
pkgdesc="Lightweight C++14 parser for Tiled tmx files"
arch=('x86_64' 'x86')
url="https://github.com/fallahn/tmxlite"
license=('GPL')
groups=()
depends=()
makedepends=('git') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=('tmxlite::git+https://github.com/fallahn/tmxlite.git#branch=master')
noextract=()
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"

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

prepare() {
	cd "$srcdir/${pkgname%-git}/tmxlite"
    cmake ./
}

build() {
	cd "$srcdir/${pkgname%-git}/tmxlite"
	make
}

package() {
	cd "$srcdir/${pkgname%-git}/tmxlite"
    mkdir -p "$pkgdir/usr/lib"
    mkdir -p "$pkgdir/usr/include"
    cp -r include/tmxlite "$pkgdir/usr/include"
    cp libtmxlite.so "$pkgdir/usr/lib"
}