/
bzip2-1.0.8.recipe
110 lines (95 loc) · 2.77 KB
/
bzip2-1.0.8.recipe
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
SUMMARY="Data compression utilities and libraries"
DESCRIPTION="bzip2 is a patent free, high-quality data compressor. It \
typically compresses files to within 10% to 15% of the best available \
techniques (the PPM family of statistical compressors), whilst being around \
twice as fast at compression and six times faster at decompression. bzip2 \
supports recovery from media errors as well. Its command line flags are \
similar to those of GNU Gzip."
HOMEPAGE="https://sourceware.org/bzip2/"
COPYRIGHT="1996-2019 Julian R Seward"
LICENSE="bzip2"
REVISION="3"
SOURCE_URI="https://sourceware.org/pub/bzip2/bzip2-$portVersion.tar.gz"
CHECKSUM_SHA256="ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
PATCHES="bzip2-$portVersion.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86 x86_gcc2"
PROVIDES="
bzip2$secondaryArchSuffix = $portVersion compat >= 1
lib:libbz2$secondaryArchSuffix = $portVersion compat >= 1.0
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:bzcat = $portVersion compat >= 1
cmd:bzcmp = $portVersion compat >= 1
cmd:bzdiff = $portVersion compat >= 1
cmd:bzegrep = $portVersion compat >= 1
cmd:bzfgrep = $portVersion compat >= 1
cmd:bzgrep = $portVersion compat >= 1
cmd:bzip2 = $portVersion compat >= 1
cmd:bzip2recover = $portVersion compat >= 1
cmd:bzless = $portVersion compat >= 1
cmd:bzmore = $portVersion compat >= 1
cmd:bunzip2 = $portVersion compat >= 1
"
fi
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
bzip2${secondaryArchSuffix}_devel = $portVersion compat >= 1
devel:libbz2$secondaryArchSuffix = $portVersion compat >= 1.0
"
REQUIRES_devel="
bzip2$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:ar$secondaryArchSuffix
cmd:cmp
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
debugList=("$libDir"/libbz2.so.$portVersion)
if [ -z "$secondaryArchSuffix" ]; then
debugList+=("$binDir"/bzip2)
debugList+=("$binDir"/bzip2recover)
fi
defineDebugInfoPackage bzip2$secondaryArchSuffix "${debugList[@]}"
BUILD()
{
make $jobArgs
make $jobArgs -f Makefile-libbz2_so
# shared libary not built by default
}
INSTALL()
{
make install PREFIX=$prefix BINDIR=$binDir \
LIBDIR=$libDir \
INCLUDEDIR=$includeDir \
MANDIR=$manDir/man1
# also install shared lib
ln -sf libbz2.so.$portVersion libbz2.so
cp -a libbz2.so.$portVersion libbz2.so.1.0 libbz2.so $libDir
# remove static library
rm $libDir/*.a
# cleanup empty directory
rm -rf $manDir/man1/man
prepareInstalledDevelLib libbz2
# devel package
packageEntries devel \
$developDir
#remove bin commands and man pages when building for secondary arch
if [ -n "$secondaryArchSuffix" ];then
rm -rf $prefix/bin
rm -rf $manDir
fi
}
TEST()
{
make test
}