Details on this package are located in Section 10.40.2, “Contents of Zlib.”
The Zlib package contains compression and decompression routines used by some programs.
This patch will add -fPIC to our build and allow us to build a static and shared library at the same time:
patch -Np1 -i ../zlib-1.2.3-fPIC-1.patch
Prepare Zlib for compilation:
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ./configure --prefix=/usr \ --shared --libdir=/usr/lib32
Compile the package:
make
To test the results, issue: make check.
Install the package:
make install
The previous command installed a .so file in /usr/lib32. We will remove itinto /lib32 and then relink it to /usr/lib32:
mv -v /usr/lib32/libz.so.* /lib32 ln -svf ../../lib32/libz.so.1 /usr/lib32/libz.so
Now we fix the permissions on the static library:
chmod -v 644 /usr/lib32/libz.a
Details on this package are located in Section 10.40.2, “Contents of Zlib.”