|
This article explains how I Installed gutten print (formelly known as gimp print) onto a thinstation 2.2 build, to be used in conjunction with my cups install. It is really a continuation of my cups install how-to , but I don't see why it could not be used as a standalone guide, for when you need guttenprint for other reasons than using it with cups. So lets start.
The first step was to get the thinstation 2.2 compile evnvironment setup. I already have this done, as I had previously built and added 'saned' to my thinstation, but for completeness, I will include the instructions again. I use my gentoo based laptop to do the build. All the work is done under my home folder on the laptop : cd /home/<username> mkdir thinstation-compile cd thinstation-compile I use thinstation 2.2, so I get the appropriate source tree: wget http://optusnet.dl.sourceforge.net/sourceforge/thinstation/thinstation_src-2.2.tar.bz2 Unpack it and cd into the unpacked folder tar xvf ./thinstation_src-2.2.tar.bz2 cd thinstation_src-2.2 Inside the unpacked folder is a source folder (called source) This is where Thinstation stores the source for packages cd into this folder cd source You are now in the folder where all the real work to build guttenprint will be done. Download the latest guttenprint source. At the time of writing, the latest version was gutenprint-5.0.2 wget http://garr.dl.sourceforge.net/sourceforge/gimp-print/gutenprint-5.0.2.tar.bz2 unpack tar xvf guttenprint-5.0.2.tar.bz2 cd into the new folder cd gutenprint-5.0.2 Create a setup file. I copied the one from my previous cups install, and then just edited it. cp ../cups-1.3.5/setup.sh ./ Mine looks like this THINSTATION_PATH=`cat ../../THINSTATION_PATH` . ../SET_ENV ./configure --prefix=/ --bindir=/bin --sbindir=/bin --libexecdir=/lib --sysconfdir=/etc --enable-debug --without-x make clean make make the file executable chmod +x ./setup.sh Enter the thinstation build environment (DON'T FORGET TO DO THIS!) cd ../../ ./RUNME cd back into the source/ghostscript-8.61 folder and run the setup.sh file cd ./source/gutenprint-5.0.2 ./setup.sh Sit back, and pray the compile works. After the compile install it. make install exit the compile enfironment exit Thats it for the compile/build bit, next you will create the thinstation package . cd into where you have the thinstation package build setup. mine is located in my home folder under the a folder called Thinstation-2.2 cd /home/<username>/Thinstation-2.2/packages Create a guttenprint package folder by copying the template cp -xav ./template ./guttenprint cd into the new folder cd guttenprint Now you must copy all the required files (those that you have just built) into this folder, thus creating the thinstation package. I have created a script that does all this for you. You can download it here. For those who cannot download the file, here it is: You must place this file into the guttenprint package folder, and pass it the path to where your thinstation compile folder is (don't include the /source/ folder in the path given) #!/bin/bash
echo "have $1"
if [ -n "$1" ]; then COMPILEFOLDER=$1 else echo "please call with path to your Thinstation compile folder" exit 1; fi
mkdir ./lib cp -xav ${COMPILEFOLDER}/lib/gutenprint ./lib cp -xav ${COMPILEFOLDER}/lib/libgut* ./lib
mkdir -p ./lib/pkgconfig cp -xav ${COMPILEFOLDER}/lib/pkgconfig/guten* ./lib/pkgconfig/
mkdir ./share cp -xav ${COMPILEFOLDER}/share/gutenprint ./share/
mkdir ./bin cp -xav ${COMPILEFOLDER}/bin/escputil ./bin/ cp -xav ${COMPILEFOLDER}/lib/gimp ./lib/ cp -xav ${COMPILEFOLDER}/bin/cups-calibrate ./bin/
mkdir -p ./lib/cups/backend mkdir ./usr cd ./usr ln -s ../lib ./lib cd ../ cp -xav ${COMPILEFOLDER}/source/gutenprint-5.0.2/src/cups/{epson,canon} ./lib/cups/backend/ mkdir -p ./lib/cups/driver cp -xav ${COMPILEFOLDER}/source/gutenprint-5.0.2/src/cups/gutenprint.5.0 ./lib/cups/driver/ mkdir -p ./lib/cups/filter cp -xav ${COMPILEFOLDER}/source/gutenprint-5.0.2/src/cups/rastertogutenprint.5.0 ./lib/cups/filter/ cp -xav ${COMPILEFOLDER}/source/gutenprint-5.0.2/src/cups/commandtoepson ./lib/cups/filter/ cp -xav ${COMPILEFOLDER}/source/gutenprint-5.0.2/src/cups/commandtocanon ./lib/cups/filter/ cp -xav ${COMPILEFOLDER}/bin/cups-genppd* ./bin/ mkdir -p ./share/cups cd ./usr ln -s ../share ./share cd .. cp -xav ${COMPILEFOLDER}/usr/share/cups/calibrate.ppm ./share/cups/ mkdir -p ./etc/cups cp -xav ${COMPILEFOLDER}/etc/cups/command.types ./etc/cups/ cp -xav ${COMPILEFOLDER}/bin/testpattern ./bin cp -xav ${COMPILEFOLDER}/share/locale/ ./share/
rm ./etc/console/README touch ./etc/console/guttenprint echo 'CMD_GLOBAL=""' >./etc/cmd/guttenprint.global rm ./bin/your_own_binaries_should_go_here echo "done"
After you ran the file above all the required files will be copied to your package folder. There are no init scripts required for this install, so remove the defaults rm ./etc/init.d/your_start_up_script rm ./etc/rc5.d/S10this_is_a_symlink_to_start_up_script fix the dependencies file (the commented line gives a warning when doing the build) sed -i 's/^\#\(.*\)//' ./dependencies add guttenprint to the build config file cd ../../ echo "package guttenprint # guttenprint binary " >> ./build.conf ok, that should be it. Rebuild your boot image. ./build After the rebuild, reboot from your new image (I use pxe network boot, so I copied the new boot image to my bootp server) scp ./boot-images/pxe/initrd root@10.0.0.3:/tftpboot/
and reboot the thinstation to load the new image. Once rebooted test the install via the command line. Either telnet into the thinstation, or use the local thinstation console (CTRL+ALT+F2) No real way to test this, except with cups web interface (you will get all the guttenprint devices etc when setting up a printer). So, lets open the web interface, and try and add a printer. http://<ip of thinstation>:631 First test click on 'Add Printer'. In the next screen, put anything for the Name, Location and Description, and then click 'Continue'. The next screen should produce a drop-down box with a list of devices. In this list should be a device listed as 'Guttenprint .....' (mine says 'Guttenprint USB printer #1) If you see that, then it is working :) Well done, you have installed guttenprint to thinstation. If you were following the main cups install guide, go back to it now |