The IBM Omni driver Tweaks applied to the Omni driver on its last RPMization for Mandriva Linux # Uncompress Omni cd
cd src tar -xvjf Omni-0.9.1.tar.bz2 cd .. # Set a link so that GhostScripts "configure" script finds Omni ln -s src/Omni . # Suppress the generation of debug output files perl -p -i -e "s:/tmp/blit_debug.out:/dev/null:g" "src/Omni/Epson/Epson High Res ESCP2 Blitter.cpp" # Fix entity in Foomatic printer XML files. perl -p -i -e "s:Partially\":Partially\":" src/Omni/Foomatic/OmniFoomaticGenerator.cpp # Replace "-dSAFER" by "-dPARANOIDSAFER" in GhostScript command lines perl -p -i -e "s/-dSAFER/-dPARANOIDSAFER/" src/Omni/Foomatic/OmniFoomaticGenerator.cpp # Copy the original gomni.c of Omni into GhostScript cp -f src/Omni/Ghostscript/new_src/gomni.c src cd src cd Omni patch -p0 < omni-0.9.1-fix-compile-gcc-3.4.patch.bz2 # Only needed on PPC architecture ln -s 'HP LaserJet' HP cd .. cd .. cd src/Omni # autoconf 2.5 is needed # Let automake 1.7 be used ln -s /usr/bin/automake-1.7 automake ln -s /usr/bin/aclocal-1.7 aclocal # Fix cups dir for 64-bit architectures perl -pi -e 's,^(DEFAULTCUPSEXEROOT)=/usr/lib/(cups/filter),\1=/usr/lib64/\2,' configure.ac # Let setupOmni use also the current directory in the $PATH, so that the # new automake and aclocal gets used perl -pi -e 's@^(\#.\s*/bin/bash.*)$@$1\nexport PATH=\`pwd\`:\$PATH\n@' setupOmni # Override check for automake version, it is broken perl -pi -e 's:^\s*if\s*\(.4\s*>=\s*version\)\s*$: if (1 >= 0)\n:g' setupOmni # Fix missing slash in OmniFoomaticGenerator.cpp perl -pi -e 's:\"foo2omni\":\"/foo2omni\":g' Foomatic/OmniFoomaticGenerator.cpp # Build Omni ./setupOmni --libdir=/usr/lib # Build Omni on 64-bit ./setupOmni --libdir=/usr/lib64 make # Build PPDs for CUPS ( cd CUPS; make generateBuildPPDs ) cd ../.. # When building GhostScript the following is needed so that # GhostScript can communicate with Omni, this makes libstdc++ instead # of libsupc++ being used # The "-lz" is needed to make GhostScript's configure script auto-detecting # libpng export LDFLAGS="-rdynamic -lgmodule -lglib -ldl -lstdc++ -lz" # Generate Foomatic data mkdir omnifoomatic cd omnifoomatic mkdir -p foomatic-db/db/source/driver mkdir -p foomatic-db/db/source/opt mkdir -p foomatic-db/db/source/printer export PATH=$PATH:/usr/lib/Omni/bin /usr/lib/Omni/bin/OmniFoomaticGenerator # Install the Omni Foomatic data foomatic-kitload -k foomatic-db/db/source cd .. rm -rf omnifoomatic # Determine the recommended drivers taking Omni into account /usr/sbin/foomatic-preferred-driver # Add /usr/lib/Omni/lib to /etc/ld.so.conf if ! grep /usr/lib/Omni /etc/ld.so.conf >/dev/null 2>&1; then \ cp /etc/ld.so.conf /etc/ld.so.conf.preomni; \ echo /usr/lib/Omni >> /etc/ld.so.conf; \ ldconfig; \ fi # Restart CUPS killall -HUP cupsd