mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-20 20:04:19 +08:00
Add zlib recipe; use in git recipe
This commit is contained in:
parent
27bbfb298b
commit
ccfd1885ee
@ -1,5 +1,6 @@
|
||||
VERSION=2.13.1
|
||||
TAR=https://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.xz
|
||||
BUILD_DEPENDS=(zlib)
|
||||
|
||||
HOST=x86_64-elf-redox
|
||||
|
||||
@ -26,27 +27,8 @@ function recipe_update {
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
if [ ! -d zlib ]
|
||||
then
|
||||
mkdir zlib
|
||||
if [ ! -f zlib-1.2.11.tar.gz ]
|
||||
then
|
||||
wget http://zlib.net/zlib-1.2.11.tar.gz
|
||||
fi
|
||||
tar xvf zlib-1.2.11.tar.gz -C zlib --strip-components 1
|
||||
fi
|
||||
|
||||
rm -rf zlib-prefix
|
||||
mkdir zlib-prefix
|
||||
|
||||
pushd zlib
|
||||
./configure --static --prefix=/
|
||||
make -j"$(nproc)"
|
||||
make DESTDIR="$PWD/../zlib-prefix" install
|
||||
popd
|
||||
|
||||
autoconf
|
||||
./configure --host=${HOST} --prefix=/ --with-zlib="${PWD}/zlib-prefix"
|
||||
autoconf -f
|
||||
./configure --host=${HOST} --prefix=/ --with-zlib="${PWD}/../sysroot"
|
||||
make
|
||||
skip=1
|
||||
}
|
||||
|
||||
35
recipes/zlib/recipe.sh
Normal file
35
recipes/zlib/recipe.sh
Normal file
@ -0,0 +1,35 @@
|
||||
VERSION=1.2.11
|
||||
TAR=http://zlib.net/zlib-$VERSION.tar.gz
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
./configure --static --prefix=/
|
||||
make -j"$(nproc)"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
make DESTDIR="$dest" install
|
||||
rm -rf "$1"/{lib/pkgconfig,share}
|
||||
skip=1
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user