Files
haikuports/app-arch/lzip/lzip-1.17.recipe
2015-08-17 22:10:32 +00:00

84 lines
2.8 KiB
Bash

SUMMARY="Lossless data compressor based on the LZMA algorithm"
DESCRIPTION="Lzip is a lossless data compressor with a user interface \
similar to the one of gzip or bzip2. Lzip is about as fast as gzip, \
compresses most files more than bzip2, and is better than both \
from a data recovery perspective. Lzip is a clean implementation \
of the LZMA "algorithm".
The lzip file format is designed for data sharing and long-term \
archiving, taking into account both data integrity and decoder \
availability:
- The lzip format provides very safe integrity checking and some \
data recovery means. The lziprecover program can repair bit-flip \
errors (one of the most common forms of data corruption) in lzip \
files, and provides data recovery capabilities, including \
error-checked merging of damaged copies of a file.
- The lzip format is as simple as possible (but not simpler). \
The lzip manual provides the code of a simple decompressor along \
with a detailed explanation of how it works, so that with the only \
help of the lzip manual it would be possible for a digital \
archaeologist to extract the data from a lzip file long after \
quantum computers eventually render LZMA obsolete.
- Additionally the lzip reference implementation is copylefted, \
which guarantees that it will remain free forever."
HOMEPAGE="http://lzip.nongnu.org/lzip.html"
COPYRIGHT="2014 Antonio Diaz Diaz"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://download.savannah.gnu.org/releases/lzip/lzip-$portVersion.tar.gz"
CHECKSUM_SHA256="9443855e0a33131233b22cdb6c62c9313a483f16cc7415efe88d4a494cea0352"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
lzip$secondaryArchSuffix = $portVersion
cmd:lzip$commandSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:gcc$secondaryArchSuffix
"
BUILD()
{
./configure --prefix=$prefix \
--bindir=$commandBinDir \
--datarootdir=$dataRootDir \
--infodir=$infoDir \
--mandir=$manDir
make $jobArgs
}
INSTALL()
{
make install
# Create expander rule
mkdir -p $dataDir/expander/rules
echo '"application/x-lzip" .tar.lz "'$binDir/'lzip -cd %s | tar -tvf -" "'$binDir/'lzip -cd %s | tar -xvf -"' > $dataDir/expander/rules/lzip
echo '"application/x-lzip" .tlz "'$binDir/'lzip -cd %s | tar -tvf -" "'$binDir/'lzip -cd %s | tar -xvf -"' >> $dataDir/expander/rules/lzip
echo '"application/x-lzip" .lz "echo %s | sed '\''s/.lz$//g'\''" "'$binDir/'lzip -df %s"' >> $dataDir/expander/rules/lzip
}
TEST()
{
make check
}