summaryrefslogtreecommitdiff
path: root/extra/libjpeg-turbo/PKGBUILD
blob: 75121fc8f7ae01f29ac42e250df67df24382e9a3 (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
# $Id: PKGBUILD 186466 2013-05-26 22:08:45Z eric $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>

pkgname=libjpeg-turbo
pkgver=1.3.0
pkgrel=2
pkgdesc="libjpeg derivative with accelerated baseline JPEG compression and decompression"
arch=('i686' 'x86_64')
url="http://libjpeg-turbo.virtualgl.org/"
license=('GPL' 'custom')
depends=('glibc')
makedepends=('nasm')
provides=('libjpeg=8.0.2' 'turbojpeg')
conflicts=('libjpeg' 'turbojpeg')
replaces=('libjpeg' 'turbojpeg')
options=('!libtool')
source=(http://sourceforge.net/projects/$pkgname/files/$pkgver/$pkgname-$pkgver.tar.gz)
sha1sums=('1792c964b35604cebd3a8846f1ca6de5976e9c28')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --with-jpeg8 --mandir=/usr/share/man
  make
}

check() {
  cd "$srcdir/$pkgname-$pkgver"
  make test
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir/" docdir=/usr/share/doc/libjpeg-turbo \
    exampledir=/usr/share/doc/libjpeg-turbo install
  
  # provide jpegint.h as it is required by various software
  install -m644 jpegint.h "$pkgdir/usr/include/"
  
  install -dm755 "$pkgdir/usr/share/licenses/libjpeg-turbo/"
  ln -s ../../doc/libjpeg-turbo/README \
    "$pkgdir/usr/share/licenses/libjpeg-turbo/README"
  ln -s ../../doc/libjpeg-turbo/README-turbo.txt \
    "$pkgdir/usr/share/licenses/libjpeg-turbo/README-turbo.txt"
}