# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Peter Hatina <phatina AT gmail.com>
pkgname=glm
pkgver=0.9.7.1
pkgrel=1
pkgdesc="C++ mathematics library for 3D software based on the OpenGL Shading Language (GLSL) specification"
arch=('any')
license=('MIT')
url="http://glm.g-truc.net"
makedepends=('cmake')
source=("https://github.com/g-truc/glm/releases/download/${pkgver}/glm-${pkgver}.zip")
md5sums=('d8eb837be847e57d2599934c7cfc1448')

package() {
    cd $pkgname

    mkdir build
    cd build

    cmake -DCMAKE_INSTALL_PREFIX=/usr ..
    make DESTDIR=$pkgdir install

    cd ..

    mkdir -p $pkgdir/usr/share/doc
    cp -r doc $pkgdir/usr/share/doc/glm

    find $pkgdir -type f -exec chmod 644 {} \;
    find $pkgdir -type d -exec chmod 755 {} \;

    install -Dm644 copying.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
