updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / opengl-tutors / PKGBUILD
blob724e4bfa148181a004a78483ee540d0b57aed72f
1 pkgname=opengl-tutors
2 pkgver=20110213
3 pkgrel=1
4 pkgdesc="A collection of opengl example programs"
5 arch=(x86_64 i686)
6 url="http://www.xmission.com/~nate/tutors.html"
7 license=('unknown')
8 depends=('freeglut' 'libgl')
9 source=(http://www.xmission.com/~nate/tutors/tutors-src.zip)
10 md5sums=('b586794ac73a02a92f3c73033b521658')
12 build() {
13     cd $srcdir/tutors
15     sed -i -e 's,^LDFLAGS =\(.*\) -lglu \(.*\)$,LDFLAGS = \1 -lGLU \2,' Makefile
17     # fix the resources path
18     for file in \
19         fog.c glm.c lightmaterial.c lightposition.c projection.c shapes.c \
20         texture.c transformation.c glm.h materials.h
21     do
22         sed -i -e "s,data/,/usr/share/$pkgname/," $file
23     done
25     make
28 package() {
29     mkdir -p $pkgdir/usr/bin
30     mkdir -p $pkgdir/usr/share/$pkgname/
32     for app in \
33         fog lightmaterial lightposition projection \
34         shapes texture transformation
35     do
36         cp $srcdir/tutors/$app $pkgdir/usr/bin/
37     done
39     cp $srcdir/tutors/data/*.{ppm,mtl,obj} $pkgdir/usr/share/$pkgname/