Files
haikuports/app-arch/pigz/pigz-2.8.recipe
2024-09-06 11:17:14 +02:00

81 lines
1.7 KiB
Bash

SUMMARY="A parallel implementation of gzip for multi-processor machines"
DESCRIPTION="
pigz, which stands for Parallel Implementation of GZip, is a fully functional \
replacement for gzip that exploits multiple processors and multiple cores to \
the hilt when compressing data.
pigz was written by Mark Adler, and uses the zlib and pthread libraries.
This version of pigz is written to be portable across Unix-style operating \
systems that provide the zlib and pthread libraries."
HOMEPAGE="http://www.zlib.net/pigz"
COPYRIGHT="2008-2013 Mark Adler"
LICENSE="Zlib"
REVISION="1"
SOURCE_URI="http://www.zlib.net/pigz/pigz-$portVersion.tar.gz"
CHECKSUM_SHA256="eb872b4f0e1f0ebe59c9f7bd8c506c4204893ba6a8492de31df416f0d5170fd0"
ARCHITECTURES="all !x86_gcc2"
if [ "$targetArchitecture" = x86_gcc2 ]; then
SECONDARY_ARCHITECTURES="x86"
fi
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
fi
PROVIDES="
pigz$secondaryArchSuffix = $portVersion
cmd:pigz = $portVersion
cmd:pigzj = $portVersion
cmd:pigzn = $portVersion
cmd:pigzt = $portVersion
cmd:unpigz = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
"
TEST_REQUIRES="
cmd:cmp
cmd:compress
cmd:which
"
PATCH()
{
sed -i 's/-lm//g' Makefile
sed -i 's/-lpthread//g' Makefile
sed -i 's/ln -f/ln -sf/g' Makefile
}
BUILD()
{
make all
}
INSTALL()
{
mkdir -p $commandBinDir
cp -af pigz pigzj pigzn pigzt unpigz $commandBinDir
mkdir -p $manDir/man1
cp -af pigz.1 $manDir/man1
}
TEST()
{
make test
}