summaryrefslogtreecommitdiffstats
path: root/abs/core/libjpeg-turbo/PKGBUILD
blob: 954db63f18763c7796c82fa00c53dec3e614a0af (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
51
# $Id$
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>

pkgname=libjpeg-turbo
pkgver=1.4.2
pkgrel=2
pkgdesc='JPEG image codec with accelerated baseline compression and decompression'
url='http://libjpeg-turbo.virtualgl.org/'
arch=('i686' 'x86_64')
license=('custom')
makedepends=('nasm' 'jdk8-openjdk')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha1sums=('2666158ccd5318513f875867bbc4af52f6eb9f0b')

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

options=('!makeflags')

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	export JNI_CFLAGS='-I/usr/lib/jvm/default/include -I/usr/lib/jvm/default/include/linux'
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-jpeg8 \
		--with-java \

	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
}