summaryrefslogtreecommitdiffstats
path: root/extra/bzip2/APKBUILD
blob: 09721bb7609ae3614770b78daddc3acd871488ea (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bzip2
pkgver=1.0.5
pkgrel=1
pkgdesc="A high-quality data compression program"
url="http://sources.redhat.com/bzip2"
license="BZIP2"
depends="uclibc"
install="$pkgname.post-deinstall"
source="http://www.bzip.org/$pkgver/$pkgname-$pkgver.tar.gz
	$install
	bzip2-1.0.4-POSIX-shell.patch
	bzip2-1.0.4-makefile-CFLAGS.patch
	bzip2-1.0.4-man-links.patch
	bzip2-1.0.4-saneso.patch
	"
subpackages="$pkgname-dev $pkgname-doc"

build () { 
	local i
	cd "$srcdir"/$pkgname-$pkgver
	for i in ../*.patch; do
		msg "Applying ${i##*/}"
		patch -p1 < $i || return 1
	done

	# Fix man path
	# Generate relative symlinks
	sed -i \
		-e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
		-e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
		Makefile || return 1

	# fixup broken version stuff
	sed -i \
		-e "s:1\.0\.4:$pkgver:" \
		bzip2.1 bzip2.txt Makefile-libbz2_so manual.* || return 1

	make -f Makefile-libbz2_so all || return 1
	make all || return 1
	make PREFIX="$pkgdir"/usr install || return 1
}
md5sums="3c15a0c8d1d3ee1c46a1634d00617b1a  bzip2-1.0.5.tar.gz
b84506d253e04db3c5af9016fead45a3  bzip2.post-deinstall
2e9bcfeb1614b55f5ba2d087ac65a3fe  bzip2-1.0.4-POSIX-shell.patch
56b90131e3c2ae425b758de9c7be7682  bzip2-1.0.4-makefile-CFLAGS.patch
fd13ef6bc55276c7e3adc346bde56cd1  bzip2-1.0.4-man-links.patch
643983e8134723ebe53c858b1a3938ad  bzip2-1.0.4-saneso.patch"