blob: 95382248091d95a41be17e8be41013e9c06395a5 (
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
73
74
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bzip2
pkgver=1.0.6
pkgrel=1
pkgdesc="A high-quality data compression program"
url="http://sources.redhat.com/bzip2"
arch="all"
license="BZIP2"
depends=""
install="$pkgname.post-deinstall"
source="http://www.bzip.org/$pkgver/$pkgname-$pkgver.tar.gz
bzip2-1.0.4-makefile-CFLAGS.patch
bzip2-1.0.6-saneso.patch
bzip2-1.0.4-man-links.patch
bzip2-1.0.2-progress.patch
bzip2-1.0.3-no-test.patch
bzip2-1.0.4-POSIX-shell.patch
"
subpackages="$pkgname-dev $pkgname-doc libbz2"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || return 1
;;
esac
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
}
build () {
cd "$_builddir"
make -f Makefile-libbz2_so all || return 1
make all || return 1
}
package() {
cd "$_builddir"
make PREFIX="$pkgdir"/usr install || return 1
install -D libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so.$pkgver
ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so
ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so.${pkgver%%.*}
}
libbz2() {
pkgdesc="Shared library for bz2"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.so.* "$subpkgdir"/usr/lib/
}
md5sums="00b516f4704d4a7cb50a1d97e6e8e15b bzip2-1.0.6.tar.gz
3675cd4db6affe64e1d7d40bc2ad4f26 bzip2-1.0.4-makefile-CFLAGS.patch
d47a4aa8f08d101aa5aa0dd2030338d1 bzip2-1.0.6-saneso.patch
fd13ef6bc55276c7e3adc346bde56cd1 bzip2-1.0.4-man-links.patch
5f7a98f0aaaed6554126d30e28383ee0 bzip2-1.0.2-progress.patch
804bd17c96297968a89fc4eddc9a6713 bzip2-1.0.3-no-test.patch
55ac0e9be7821190b99376e0205707be bzip2-1.0.4-POSIX-shell.patch"
|