mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
47 lines
1.1 KiB
Bash
47 lines
1.1 KiB
Bash
# Original source: https://aur.archlinux.org/packages/glfw2/
|
|
|
|
pkgname=glfw2
|
|
pkgver=2.7.9
|
|
pkgrel=4
|
|
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')
|
|
source=("http://sourceforge.net/projects/glfw/files/glfw/$pkgver/glfw-$pkgver.tar.gz")
|
|
sha256sums=('b7276dcadc85a07077834d1043f11ffd6a3a379647bb94361b4abc3ffca75e7d')
|
|
|
|
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"
|
|
}
|