2023-12-05 04:47:04 +00:00
|
|
|
# Maintainer: Daryl Ronningen <relms@relms.dev>
|
|
|
|
|
|
|
|
pkgname=zstd
|
|
|
|
pkgver=1.5.5
|
|
|
|
pkgrel=1
|
2023-12-08 02:05:38 +00:00
|
|
|
pkgdesc="Zstandard - Fast real-time compression algorithm"
|
|
|
|
arch=("x86_64")
|
|
|
|
url="https://facebook.github.io/zstd/"
|
2023-12-05 04:47:04 +00:00
|
|
|
license=(BSD GPL2)
|
2023-12-08 02:05:38 +00:00
|
|
|
source=("https://github.com/facebook/zstd/releases/download/v$pkgver/zstd-$pkgver.tar.gz")
|
|
|
|
sha256sums=("9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4")
|
2023-12-05 04:47:04 +00:00
|
|
|
|
|
|
|
prepare() {
|
2023-12-08 02:05:38 +00:00
|
|
|
cd $pkgname-$pkgver
|
|
|
|
# avoid error on tests without static libs, we use LD_LIBRARY_PATH
|
|
|
|
sed "/build static library to build tests/d" -i build/cmake/CMakeLists.txt
|
|
|
|
sed "s/libzstd_static/libzstd_shared/g" -i build/cmake/tests/CMakeLists.txt
|
2023-12-05 04:47:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2023-12-08 02:05:38 +00:00
|
|
|
cd $pkgname-$pkgver
|
2023-12-05 04:47:04 +00:00
|
|
|
|
2023-12-08 02:05:38 +00:00
|
|
|
cmake -S build/cmake -B build -G Ninja \
|
|
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DZSTD_ZLIB_SUPPORT=ON \
|
|
|
|
-DZSTD_BUILD_CONTRIB=ON \
|
|
|
|
-DZSTD_BUILD_STATIC=OFF \
|
|
|
|
-DZSTD_BUILD_TESTS=ON \
|
|
|
|
-DZSTD_PROGRAMS_LINK_SHARED=ON
|
|
|
|
|
|
|
|
ninja -C build
|
2023-12-05 04:47:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2023-12-08 02:05:38 +00:00
|
|
|
cd $pkgname-$pkgver
|
|
|
|
DESTDIR=$pkgdir ninja -C build install
|
|
|
|
install -Dm 644 LICENSE -t $pkgdir/usr/share/licenses/$pkgname
|
2023-12-05 04:47:04 +00:00
|
|
|
|
2023-12-08 02:05:38 +00:00
|
|
|
mv $pkgdir/usr/lib64 $pkgdir/usr/lib
|
2023-12-05 04:47:04 +00:00
|
|
|
}
|