#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-devel32 VERSION=6b ARCH=x86_64 BUILD=4 DISTRO=${DISTRO:-slamd64} if [ $DISTRO = slackware ]; then PKGARCH=$ARCH else PKGARCH=${ARCH}_${DISTRO} fi if [ $DISTRO = slamd64 ]; then LIBSUFFIX=${LIBSUFFIX:-64} else LIBSUFFIX=${LIBSUFFIX:-} fi if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi echo "+=============+" echo "| jpegsrc.v6b |" echo "+=============+" cd $TMP rm -rf jpeg-6b tar xzvf $CWD/jpegsrc.v6b.tar.gz cd jpeg-6b chown -R root.root . zcat $CWD/jpeg-6b.diff.gz | patch -p0 -E || exit 1 zcat $CWD/makefile.cfg.diff.gz | patch -p0 --verbose || exit 1 CFLAGS=-fPIC ./configure make CFLAGS=-fPIC CC="gcc -m32" libjpeg.so.62.0.0 strip --strip-unneeded libjpeg.so.62.0.0 (cd $PKG; explodepkg $CWD/_libjpeg.tar.gz ) cat libjpeg.so.62.0.0 > $PKG/usr/lib$LIBSUFFIX/libjpeg.so.62.0.0 cat libjpeg.a > $PKG/usr/lib$LIBSUFFIX/libjpeg.a