0
0
Fork 0
haikuports/app-arch/snappy/snappy-1.1.8.recipe

81 lines
1.9 KiB
Bash

SUMMARY="A fast compressor/decompressor"
DESCRIPTION="Snappy is a compression/decompression library. It does not aim \
for maximum compression, or compatibility with any other compression library; \
instead, it aims for very high speeds and reasonable compression. For instance, \
compared to the fastest mode of zlib, Snappy is an order of magnitude faster \
for most inputs, but the resulting compressed files are anywhere from 20% to \
100% bigger."
HOMEPAGE="https://google.github.io/snappy/"
COPYRIGHT="2005-2017 Google Inc"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/google/snappy/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
snappy$secondaryArchSuffix = $portVersion compat >= 1
lib:libsnappy$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
snappy${secondaryArchSuffix}_devel = $portVersion compat >= 1
devel:libsnappy$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES_devel="
snappy$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
mkdir -p build && cd build
cmake .. $cmakeDirArgs -DBUILD_SHARED_LIBS=ON
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLib libsnappy
mkdir -p $developLibDir/pkgconfig
cat > $developLibDir/pkgconfig/snappy.pc << EOF
prefix=${prefix}
exec_prefix=${prefix}
libdir=${libDir}
includedir=${includeDir}
Name: snappy
Description: A fast compression/decompression library
Version: $portVersion
Libs: -L${developLibDir} -lsnappy
Cflags: -I${includedir}
EOF
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
build/snappy_unittest
}