summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 157431b68c5591e0cb9be9d145684f8eb1a15e2a (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
_pkgname=ericw-tools
pkgname=${_pkgname}-git
pkgver=v0.18.2.rc1.r149.g968a840
pkgrel=1
pkgdesc="Quake/Hexen 2 Map compiling tools"
arch=('x86_64')
url="http://ericwa.github.io/ericw-tools"
_giturl="https://github.com/ericwa/ericw-tools"
license=('GPL3')
depends=('embree' 'groff')
makedepends=('cmake')
conflicts=(${_pkgname})
source=("${_pkgname}::git+${_giturl}.git")
sha256sums=('SKIP')

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

prepare() {
    cd ${_pkgname}
    # HACK fixes cmake not able to find embree license
    touch light/EMBREE_LICENSE-NOTFOUND
    git submodule update --init --recursive --force
}

build() {
    cd ${_pkgname}
    mkdir build
    cd build
    cmake ..
    make
}

package() {
    _files=(qbsp vis light bspinfo bsputil)
    for _i in "${_files[@]}"
    do
      install -Dm755 ${_pkgname}/build/${_i}/${_i} "$pkgdir"/usr/bin/${_i}
      install -Dm644 ${_pkgname}/build/man/${_i}.html -t "${pkgdir}"/usr/share/doc/${_pkgname}
    done
}