summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0bfacda3f790b02aee3f11eb90a63f1e72388c0a (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
# Maintainer: Matthew T Hoare <matthew.t.hoare dot gmail at com>

_pkgname='pbrt-v3'
pkgname="${_pkgname}-git"
pkgver=r677.63a0699
pkgrel=1
pkgdesc="Physically based rendering system"
arch=('x86_64')
url="pbrt.org"
license=('BSD')
depends=('zlib' 'gcc-libs')
makedepends=('cmake' 'git')
source=("${_pkgname}::git+https://github.com/mmp/${_pkgname}#branch=master")
md5sums=('SKIP')

pkgver() {
        cd "${_pkgname}"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
        cd "${_pkgname}"
        git submodule update --init --recursive
        mkdir build
        cd build
        cmake ../
        make
}

package() {
        cd "${srcdir}"
        install -dm 755 "${pkgdir}/usr/share/licenses/${pkgname}"
        install -Dm 644 "${_pkgname}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
        install -Dm 755 "${_pkgname}/build/pbrt" "${pkgdir}/usr/bin/pbrt"
        install -Dm 755 "${_pkgname}/build/obj2pbrt" "${pkgdir}/usr/bin/obj2pbrt"
        install -Dm 755 "${_pkgname}/build/imgtool" "${pkgdir}/usr/bin/imgtool"
}