3.5. zlib-1.2.11

#!/bin/sh
# Copyright © 1999-2022 Gerard Beekmans
# Copyright © 2017-2022 Random Crew
# Distributed under the terms of MIT License.

Configuration

src_config()
{
    ./configure \
        --prefix=${PREFIX}
}

Compilation

src_compile()
{
    make ${MAKEOPTS}
}

Installation

The string with ause calls means the block after will be performed, if the project uses installation into root prefix / and at the same time does not use tools technology for tmp system.

src_install()
{
    make install ${MAKEOPTS} DESTDIR=${D}

    if ! ause 'tools' && ause 'rootprefix' ; then
        mkdir -p ${D}/lib/
        mv ${D}${PREFIX}/lib/libz.so.* ${D}/lib/
        ln -sf ../../lib/$(readlink ${D}${PREFIX}/lib/libz.so) ${D}${PREFIX}/lib/libz.so
    fi
}

Unit testing

src_check()
{
    make check
}

Build code

zlib.build

Other files

meta.txt
text

Links

url.lfs: https://linuxfromscratch.org/lfs/view/11.0/chapter08/zlib.html
url.lfs.stage1: