summaryrefslogtreecommitdiff
path: root/community/lib32-libtxc_dxtn/PKGBUILD
blob: 6306e1c7eefc8f9b66caf60acecde9cc8cb617b1 (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
# $Id: PKGBUILD 91929 2013-05-29 16:41:31Z lcarlier $
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>

_pkgbasename=libtxc_dxtn
pkgname=lib32-$_pkgbasename
pkgver=1.0.1
pkgrel=4
arch=(x86_64)
pkgdesc="S3 Texture Compression (S3TC) library for Mesa (32-bit)"
url="http://dri.freedesktop.org/wiki/S3TC"
license=(custom:BSD)
depends=(lib32-mesa)
makedepends=(gcc-multilib)
options=(!libtool)
source=(http://people.freedesktop.org/~cbrill/$_pkgbasename/$_pkgbasename-$pkgver.tar.bz2)
md5sums=('7105107f07ac49753f4b61ba9d0c79c5')

build() {
  cd "$srcdir/$_pkgbasename-$pkgver"

  CC="gcc -m32" ./configure --prefix=/usr --libdir=/usr/lib32
  make
}

package() {
  cd "$srcdir/$_pkgbasename-$pkgver"

  make DESTDIR="$pkgdir" install

  rm -rf "$pkgdir/usr/include"

  # License
  mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
  sed -n '5,22{s|^ \* \?||;p}' txc_dxtn.h \
    > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}