#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi GS_VERSION=7.07.1 # Used for documentation symlinks: SHORTVER=7.07 # OK, first we need the IJS library and include files. # Since it doesn't use an soname, and is very small (about 20K) # there's no good reason to compile it shared, and it would be # likely to be a bad idea anyway as the author says the protocol # is still very much in flux. cd $TMP rm -rf espgs-$GS_VERSION tar xjvf $CWD/espgs-$GS_VERSION-source.tar.bz2 cd espgs-$GS_VERSION # Make sure -lz is used with -lpng, or PNG detection will fail # and PNG devices will not be included. zcat $CWD/espgs.png.lz.diff.gz | patch -p1 --verbose # Kludge around a substitution failure that would prevent IJS from building: zcat $CWD/espgs.ijs.makefile.in.bug.diff.gz | patch -p1 --verbose chown -R root.root . cd ijs ./configure --prefix=/usr make CFLAGS="-ansi -pedantic -Wmissing-prototypes" cat libijs.a > /usr/lib/libijs.a #strip --strip-unneeded libijs.so #cat libijs.so > /usr/lib/libijs.so #chmod 755 /usr/lib/libijs.so cat ijs-config > /usr/bin/ijs-config chown root.bin /usr/bin/ijs-config chmod 755 /usr/bin/ijs-config mkdir -p /usr/include/ijs cp -a ijs.h ijs_client.h ijs_server.h /usr/include/ijs ( cd /usr/include/ijs chmod 644 ijs.h ijs_client.h ijs_server.h chown root.root ijs.h ijs_client.h ijs_server.h ) # Now the main source is compiled: cd $TMP # This should have been untarred when we compiled libijs. #tar xjvf $CWD/espgs-$GS_VERSION-source.tar.bz2 cd espgs-$GS_VERSION # Build the version with X11/CUPS/Omni/gimp-print/etc support: ./configure --prefix=/usr \ --enable-cups \ --with-drivers=ALL \ --with-ijs \ --with-gimp-print \ --with-omni \ --with-x \ i486-slackware-linux make clean make make install # Now make a "basic" version of gs: ./configure --prefix=/usr \ --enable-cups=no \ --with-drivers=ALL \ --with-ijs \ --with-gimp-print=no \ --with-omni=no \ --with-x=no \ i486-slackware-linux make clean make cat bin/gs > /usr/bin/gs-no-x11 chmod 755 /usr/bin/gs-no-x11 mkdir -p /usr/doc/espgs-$GS_VERSION ( cd /usr/doc/espgs-$GS_VERSION rm -rf doc examples ln -sf /usr/share/ghostscript/$SHORTVER/doc doc ln -sf /usr/share/ghostscript/$SHORTVER/examples examples ) mkdir -p /install cat $CWD/slack-desc > /install/slack-desc