aboutsummaryrefslogtreecommitdiffstats
path: root/testing/jbigkit/APKBUILD
blob: 07f28aa83675c2371a5cf9e02e8a09f449a8ef90 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=jbigkit
pkgver=2.1
pkgrel=0
pkgdesc="Data compression library/utilities for bi-level high-resolution images"
url="http://www.cl.cam.ac.uk/~mgk25/jbigkit/"
arch="all"
license="GPL"
# test fails
options="!check"
makedepends="imagemagick-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.cl.cam.ac.uk/~mgk25/download/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	cd "$builddir"
	unset CFLAGS CPPFLAGS LDFLAGS
	if [ "$CARCH" == "x86_64" ]; then 
		export CFLAGS="$CFLAGS -fPIC"
	else
		export CFLAGS="$CFLAGS"
	fi
}

build() {
	cd "$builddir"
	make CFLAGS="$CFLAGS"
}

package() {
	cd "$builddir"
	install -D -m644 libjbig/libjbig.a "$pkgdir"/usr/lib/libjbig.a
	install -D -m644 libjbig/libjbig85.a "$pkgdir"/usr/lib/libjbig85.a
	install -D -m644 libjbig/jbig.h "$pkgdir"/usr/include/jbig.h
	install -D -m644 libjbig/jbig_ar.h "$pkgdir"/usr/include/jbig_ar.h
	install -D -m644 libjbig/jbig85.h "$pkgdir"/usr/include/jbig85.h
	install -D -m755 pbmtools/jbgtopbm "$pkgdir"/usr/bin/jbgtopbm
	install -D -m755 pbmtools/pbmtojbg "$pkgdir"/usr/bin/pbmtojbg
	install -D -m755 pbmtools/jbgtopbm85 "$pkgdir"/usr/bin/jbgtopbm85
	install -D -m755 pbmtools/pbmtojbg85 "$pkgdir"/usr/bin/pbmtojbg85
	install -d -m755 "$pkgdir"/usr/share/man/man1
	install -m644 pbmtools/*.1* "$pkgdir"/usr/share/man/man1
}

sha512sums="c4127480470ef90db1ef3bd2caa444df10b50ed8df0bc9997db7612cb48b49278baf44965028f1807a21028eb965d677e015466306b44683c4ec75a23e1922cf  jbigkit-2.1.tar.gz"