summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f82fb7b37c386fd9873e292193b892bdf92be41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Rustmilian

pkgname=glew-wayland-git
pkgver=2.2.0.r49.gc43940a
pkgrel=1
pkgdesc="The OpenGL Extension Wrangler Library (wayland enabled)"
arch=('i686' 'x86_64')
url="https://github.com/nigels-com/glew"
license=('BSD' 'MIT' 'GPL')
depends=('libxmu' 'libxi' 'glu')
makedepends=('git' 'python' 'perl' 'wget')
provides=('glew' 'libGLEW.so')
conflicts=('glew')
source=("git+${url}.git"
        "glew-install.patch")
sha256sums=('SKIP'
            '30c77b49ff64f5b936368426f957a217b6d8a3f8d0c83a7eaa69222ed45cd811')

pkgver() {
  cd ${pkgname%-wayland-git}
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g; s/glew.//'
}

prepare() {
  cd ${pkgname%-wayland-git}
  patch -Np1 -i ../glew-install.patch
  sed -i 's|lib64|lib|' config/Makefile.linux
  sed -i '/^.PHONY: .*\.pc$/d' Makefile
  cd auto
  make
  cd glfixes
  ./sync.sh
}

build() {
  make extensions STRIP= SYSTEM=linux-egl -C glew
}

package() {
  cd ${pkgname%-wayland-git}
  make GLEW_DEST="$pkgdir/usr" SYSTEM=linux-egl install.all
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}