aboutsummaryrefslogtreecommitdiffstats
path: root/main/libjpeg-turbo/APKBUILD
blob: 17528de211b20a7ad7e9210331946842e315daed (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libjpeg-turbo
pkgver=1.4.0
pkgrel=0
pkgdesc="accelerated baseline JPEG compression and decompression library"
url="http://libjpeg-turbo.virtualgl.org/"
arch="all"
license="GPL"
depends=""
depends_dev=""
makedepends="$depends_dev nasm"
install=""
replaces="libjpeg"
subpackages="$pkgname-dev $pkgname-doc $pkgname-utils"
source="http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$pkgver.tar.gz
	"

_builddir="$srcdir"/libjpeg-turbo-$pkgver
prepare() {
	local i
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-jpeg8 \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" docdir=/usr/share/doc/$pkgname \
		install || return 1
	rm -f "$pkgdir"/usr/lib/*.la
}

utils() {
	pkgdesc="Utilities for manipulating JPEG images"
	replaces="jpeg"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

doc() {
	default_doc
	replaces="jpeg-doc"
}

dev() {
	default_dev
	replaces="jpeg-dev"
}

md5sums="039153dabe61e1ac8d9323b5522b56b0  libjpeg-turbo-1.4.0.tar.gz"
sha256sums="d93ad8546b510244f863b39b4c0da0fa4c0d53a77b61a8a3880f258c232bbbee  libjpeg-turbo-1.4.0.tar.gz"
sha512sums="60d038413acee43a23bb81d18309eed16e771d48b839b7aea52f582bbf9f99f04b3cc991e13cafc3d5df1441b726ea0792e7ad593ce4e52c96792c3b1df42c09  libjpeg-turbo-1.4.0.tar.gz"