1SUMMARY="A stateless, zlib-compatible, and very fast compression library"
2DESCRIPTION="SLZ is a fast and memory-less stream compressor which produces an \
3output that can be decompressed with zlib or gzip. It does not implement \
4decompression at all, zlib is perfectly fine for this.
5
6The purpose is to use SLZ in situations where a zlib-compatible stream is \
7needed and zlib's resource usage would be too high while the compression ratio \
8is not critical. The typical use case is in HTTP servers and gateways which \
9have to compress many streams in parallel with little CPU resources to assign \
10to this task, and without having to thottle the compression ratio due to the \
11memory usage. In such an environment, the server's memory usage can easily be \
12divided by 10 and the CPU usage by 3. In addition its high performance made it \
13fill a gap in network backup applications."
14HOMEPAGE="http://www.libslz.org/"
15COPYRIGHT="2013-2015 Willy Tarreau"
16LICENSE="MIT"
17REVISION="2"
18SOURCE_URI="http://git.1wt.eu/web?p=libslz.git;a=snapshot;h=v$portVersion;sf=tbz2"
19CHECKSUM_SHA256="cf6b2c00066890d3c7f40ef00e6620784b9dc4662e9a3b35f2059997037be728"
20SOURCE_FILENAME="libslz-$portVersion.tar.bz2"
21SOURCE_DIR="libslz"
22PATCHES="libslz-$portVersion.patchset"
23
24ARCHITECTURES="all !x86_gcc2"
25SECONDARY_ARCHITECTURES="x86"
26
27libVersion="${portVersion%%.*}"
28
29PROVIDES="
30	libslz$secondaryArchSuffix = $portVersion
31	cmd:zdec$secondaryArchSuffix = $portVersion
32	cmd:zenc$secondaryArchSuffix = $portVersion
33	lib:libslz$secondaryArchSuffix = $libVersion
34	"
35REQUIRES="
36	haiku$secondaryArchSuffix
37	"
38
39PROVIDES_devel="
40	libslz${secondaryArchSuffix}_devel = $portVersion
41	devel:libslz$secondaryArchSuffix = $libVersion
42	"
43REQUIRES_devel="
44	libslz$secondaryArchSuffix == $portVersion base
45	"
46
47BUILD_REQUIRES="
48	haiku${secondaryArchSuffix}_devel
49	"
50BUILD_PREREQUIRES="
51	cmd:gcc$secondaryArchSuffix
52	cmd:make
53	"
54
55defineDebugInfoPackage libslz$secondaryArchSuffix \
56	"$binDir"/z{dec,enc} \
57	"$libDir/libslz.so.$libVersion"
58
59BUILD()
60{
61	make $jobArgs
62}
63
64INSTALL()
65{
66	install -d -m 755 "$binDir" "$libDir" "$includeDir"
67
68	# header
69	install -t "$includeDir" -m 644 src/slz.h
70	# lib
71	install -t "$libDir" -m 755 libslz.so.$libVersion
72	ln -s libslz.so.$libVersion "$libDir/libslz.so"
73	# bins
74	install -t "$binDir" -m 755 zdec zenc
75
76	prepareInstalledDevelLib libslz
77	packageEntries devel "$developDir"
78}
79