main/glm: modernize APKBUILD

This commit is contained in:
Roberto Oliveira 2018-02-16 13:49:26 +00:00 committed by Sören Tempel
parent 40cdf3534f
commit 26d4439e33

View File

@ -1,43 +1,30 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glm pkgname=glm
pkgver=0.9.8.5 pkgver=0.9.8.5
pkgrel=0 pkgrel=1
pkgdesc="C++ mathematics library for graphics programming" pkgdesc="C++ mathematics library for graphics programming"
url="http://glm.g-truc.net/" url="http://glm.g-truc.net/"
arch="all" arch="all"
license="MIT" license="MIT"
depends="" makedepends="cmake"
depends_dev=""
makedepends="$depends_dev cmake"
install=""
subpackages="$pkgname-dev" subpackages="$pkgname-dev"
source="https://github.com/g-truc/glm/releases/download/$pkgver/glm-$pkgver.zip" source="https://github.com/g-truc/glm/releases/download/$pkgver/glm-$pkgver.zip"
_builddir="$srcdir"/glm builddir="$srcdir/$pkgname"
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() { build() {
cd "$_builddir" cd "$builddir"
mkdir build mkdir build
cd build cd build
cmake .. \ cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_INSTALL_LIBDIR=lib
|| return 1
make make
} }
package() { package() {
cd "$_builddir"/build cd "$builddir"/build
make install DESTDIR="$pkgdir" make install DESTDIR="$pkgdir"
} }