Proposed Zlib changes

Greg Schafer diy-linux-dev@diy-linux.org
Wed, 1 Nov 2006 15:00:45 +1100


Hi Guys,

In order to make life easier for the upcoming "install" cmd partitioning,
I'm proposing to alter the Zlib build cmds. In essence, build the static lib
first instead of second like we do currently, rename it to "xlibz.a" (to
prevent "make clean" from whacking it), then build the shared lib as usual,
then cp xlibz.a to $PM_DEST/usr/lib/libz.a

Although `make install' will install other stuff besides the libs, the only
difference between the shared versus static cases is the libs themselves.
This is why we only need libz.a from the static build.

In other words:


./configure \
	--prefix=/usr
make
mv -v {,x}libz.a
make clean

./configure \
	--prefix=/usr \
	--shared
make
make check
make prefix=$PM_DEST/usr install
cp -v xlibz.a $PM_DEST/usr/lib/libz.a
mkdir -pv $PM_DEST/lib
mv -v $PM_DEST/usr/lib/libz.so.* $PM_DEST/lib
ln -sfv ../../lib/libz.so.1 $PM_DEST/usr/lib/libz.so


In the process, we also lose an unneeded chmod cmd. And while we're at it,
remove the first "make check" (just run it for the shared case). I'll
implement this unless someome points out it's flawed.

(Sidenote: maybe we should drop the static lib altogether? Static libs in
general are about as useful as tits on a bull.. :-)

Regards
Greg