# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
pkgname=ptex
pkgver=2.0.62
pkgrel=1
pkgdesc="Per-Face Texture Mapping for Production Rendering"
arch=(i686 x86_64)
url="http://ptex.us/"
license=('BSD')
depends=(zlib)
makedepends=(git doxygen python2)
options=(!makeflags)
source=("https://github.com/wdas/ptex/archive/v${pkgver}.tar.gz")
md5sums=('548e0b1c8ef542c01c92418803c56e88')

prepare() {
	cd "$pkgname-$pkgver"/src

    sed -i "s/python/python2/g" tests/run_tests.py
}

build() {
	cd "$pkgname-$pkgver"/src
	make

    cd doc
    make
}

package() {
	cd "$pkgname-$pkgver"

    install -d ${pkgdir}/usr/share

    cp -r install/{bin,include,lib} ${pkgdir}/usr
    cp -r install/doc ${pkgdir}/usr/share/

    install -Dm644 src/doc/License.txt ${pkgdir}/usr/share/licenses/${pkgname}/License.txt
}
