summaryrefslogtreecommitdiff
path: root/libre/lib32-mesa-demos-libre/PKGBUILD
blob: d096b5c000582c6f285e3716300901395ad82c8a (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
45
46
# $Id: PKGBUILD 94584 2013-07-27 15:01:38Z lcarlier $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Maintainer (Parabola): André Silva <emulatorman@parabola.nu>

_pkgbasename=mesa-demos-libre
pkgname=lib32-$_pkgbasename
pkgver=8.1.0
pkgrel=3
arch=(x86_64)
pkgdesc="Mesa demos and tools (32-bit), without nonfree demos"
url="http://mesa3d.sourceforge.net"
license=('custom')
provides=("lib32-mesa-demos=$pkgver")
replaces=('lib32-mesa-demos')
conflicts=('lib32-mesa-demos')
makedepends=(gcc-multilib 'lib32-mesa' 'lib32-glew')
source=(https://repo.parabolagnulinux.org/sources/mesa-demos-libre-${pkgver}.tar.bz2)
md5sums=('18225619a97e6900afd2b48a89dcbd4e')

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  cd "${srcdir}/mesa-demos-${pkgver}"
  ./configure --prefix=/usr 

  make
}

package() {
  depends=('lib32-glew' mesa-demos-libre)

  cd "${srcdir}/mesa-demos-${pkgver}"
  make DESTDIR="${pkgdir}" install

  for i in "$pkgdir/usr/bin/"*; do
    mv "$i" "$i"32
  done

  rm -r "$pkgdir/usr/share/mesa-demos"

  mkdir -p "$pkgdir/usr/share/licenses"
  ln -s mesa-demos "$pkgdir/usr/share/licenses/lib32-mesa-demos"
}