2021-07-31 09:22:10 +00:00
|
|
|
pkgname=zlib-ng
|
|
|
|
pkgver=2.0.5
|
|
|
|
|
|
|
|
fetch() {
|
|
|
|
curl -L "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz
|
|
|
|
tar -xf $pkgname-$pkgver.tar.xz
|
|
|
|
mkdir $pkgname-$pkgver/build
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
cd build
|
2022-04-21 21:03:11 +00:00
|
|
|
|
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
[ -z "$WITH_CROSS" ] || cmake_extra_flags="-DCMAKE_CROSSCOMPILING=ON \
|
|
|
|
-DCMAKE_SYSROOT=$WITH_CROSS_DIR \
|
|
|
|
-DCMAKE_C_COMPILER_TARGET=$ARCH-linux-musl"
|
|
|
|
[ -z "$FOR_CROSS" ] || PREFIX=$FOR_CROSS_DIR
|
|
|
|
|
2021-07-31 09:22:10 +00:00
|
|
|
cmake -G Ninja ../ \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2022-04-21 21:03:11 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=$PREFIX \
|
2021-07-31 09:22:10 +00:00
|
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
2022-04-21 21:03:11 +00:00
|
|
|
-DZLIB_COMPAT=ON \
|
|
|
|
$cmake_extra_flags
|
|
|
|
|
2021-07-31 09:22:10 +00:00
|
|
|
samu
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
cd build
|
|
|
|
DESTDIR=$pkgdir samu install
|
|
|
|
}
|
|
|
|
|
|
|
|
license() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
cat LICENSE.md
|
|
|
|
}
|
2022-04-21 21:03:11 +00:00
|
|
|
|
|
|
|
backup() {
|
|
|
|
return
|
|
|
|
}
|