summaryrefslogtreecommitdiff
path: root/extra/libjpeg-turbo/PKGBUILD
blob: 75c606a81b93adb6e00106f3b4fce8672f51f415 (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
47
48
49
50
# $Id: PKGBUILD 201420 2013-12-11 04:56:37Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>

pkgname=libjpeg-turbo
pkgver=1.3.0
pkgrel=4
pkgdesc='JPEG image codec with accelerated baseline compression and decompression'
url='http://libjpeg-turbo.virtualgl.org/'
license=('GPL' 'custom')
arch=('i686' 'x86_64' 'mips64el')
makedepends=('nasm')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
        'cve-2013-6629.patch')
sha1sums=('1792c964b35604cebd3a8846f1ca6de5976e9c28'
          '10f2cf2276244d2b94d35bfca24639bc83ce1185')

provides=('libjpeg=8.0.2' 'turbojpeg')
conflicts=('libjpeg' 'turbojpeg')
replaces=('libjpeg' 'turbojpeg')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	patch -i ../cve-2013-6629.patch # FS#38094
}

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

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

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make \
		DESTDIR="${pkgdir}" \
		docdir="/usr/share/doc/${pkgname}" \
		exampledir="/usr/share/doc/${pkgname}" \
		install
	
	install -d "${pkgdir}/usr/share/licenses/libjpeg-turbo"
	ln -t "${pkgdir}/usr/share/licenses/libjpeg-turbo" -s ../../doc/libjpeg-turbo/README{,-turbo.txt}
	install -m644 jpegint.h "${pkgdir}/usr/include" # required by other software
}