desktop/glfw2/PKGBUILD
2014-02-16 18:53:19 +00:00

49 lines
1.1 KiB
Bash

# Original source: https://aur.archlinux.org/packages/glfw2/
pkgname=glfw2
pkgver=2.7.9
pkgrel=3
pkgdesc="A free, open source, portable framework for OpenGL application development (LEGACY 2.x)"
arch=('i686' 'x86_64')
url="http://www.glfw.org/"
license=('custom:ZLIB')
depends=('libgl' 'libxrandr' 'glu')
makedepends=('mesa')
conflicts=('glfw')
provides=('glfw')
replaces=('glfw')
source=("http://switch.dl.sourceforge.net/sourceforge/glfw/glfw-$pkgver.tar.bz2")
md5sums=('96e12be48801984f0f0c23e38549b277')
prepare() {
cd "$srcdir/glfw-$pkgver"
# rename to glfw2
sed -i 's/glfw\.so/glfw2.so/g' compile.sh lib/x11/Makefile.x11.in
sed -i 's/lglfw/&2/' compile.sh
}
build() {
cd "$srcdir/glfw-$pkgver"
export LFLAGS+="-lrt"
make x11
}
package() {
cd "$srcdir/glfw-$pkgver"
make PREFIX="$pkgdir/usr" x11-dist-install
# license
install -Dm644 COPYING.txt \
"$pkgdir/usr/share/licenses/$pkgname/COPYING"
# docs
install -d "$pkgdir/usr/share/doc/$pkgname"
install -Dm644 docs/*.pdf "$pkgdir/usr/share/doc/$pkgname"
# fix pc file prefix path
sed -i "s|$pkgdir||g" "$pkgdir/usr/lib/pkgconfig/libglfw.pc"
}