desktop/glfw2/PKGBUILD

47 lines
1.1 KiB
Bash
Raw Normal View History

2014-02-17 02:48:03 +08:00
# Original source: https://aur.archlinux.org/packages/glfw2/
pkgname=glfw2
pkgver=2.7.9
2015-11-18 08:02:07 +08:00
pkgrel=4
2014-02-17 02:48:03 +08:00
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')
2015-11-18 08:02:07 +08:00
source=("http://sourceforge.net/projects/glfw/files/glfw/$pkgver/glfw-$pkgver.tar.gz")
sha256sums=('b7276dcadc85a07077834d1043f11ffd6a3a379647bb94361b4abc3ffca75e7d')
2014-02-17 02:48:03 +08:00
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"
}