createPPD.sh is a mess and and does not do what was intended on Solaris. I had to patch it and remove most of the code. This is an upstream bug. --- a/createPPD.sh 2022-06-23 06:56:29.000000000 +0200 +++ b/createPPD.sh 2022-07-20 08:36:00.629920419 +0200 @@ -19,108 +19,33 @@ # Author: # #echo "HP Linux Imaging and Printing System createPPD file" -make -f Makefile_dat2drv +gmake -f Makefile_dat2drv rip="foomatic-rip-hplip" -for argument in $*;do - - if [ "$argument" = "-f" ] - then - classDriver="-f" - ./Dat2drv $classDriver - - elif [ "$argument" = "-q" ] - then - ./Dat2drv - fi - -done -ppd_version=`grep AC_INIT configure.in | awk '{print $7}' | sed 's/.*\[\(.*\)\].*/\1/'|egrep -o '[[:digit:]]{1,}\.[[:digit:]]{1,}\.[[:digit:]]{1,}'` +./Dat2drv +ppd_version=`grep AC_INIT configure.in | awk '{print $7}' | sed 's/.*\[\(.*\)\].*/\1/'|ggrep -E -o '[[:digit:]]{1,}\.[[:digit:]]{1,}\.[[:digit:]]{1,}'` sed -e "s/@VERSION@/$ppd_version/g;s/@foomatic_filter@/$rip/g" prnt/drv/hpijs.drv.in >prnt/drv/hpijs.drv sed -e "s/@VERSION@/$ppd_version/g" prnt/drv/hpcups.drv.in >prnt/drv/hpcups.drv -# disabling the removal of ppd folder -#rm -fr ppd - -if [ "$classDriver" = "-f" ] # class drivers -then - echo $PWD - install -d ppd/classppd - install -d ppd/classppd/hpcups - install -d ppd/classppd/ps - ppdc -d ppd/classppd/hpcups prnt/drv/hpcups.drv - #ppdc -d ppd/classppd/hpcups prnt/spd/hpcupsSPD.drv - if [ -f "prnt/ps/hp-postscript-inkjet.ppd.gz" ] - then - cp prnt/ps/hp-postscript*.ppd.gz ppd/classppd/ps - else - cp prnt/ps/hp-postscript*.ppd ppd/classppd/ps - for i in ppd/classppd/ps/*.ppd; do - gzip -c "$i" > "$i.gz" - done - fi - #cp prnt/spd/*.ppd ppd/classppd/hpcups/. - #cp prnt/ps/hp-postscript*.ppd.gz ppd/classppd/ps - for i in ppd/classppd/hpcups/*.ppd; do - gzip -c "$i" > "$i.gz" - done - #for i in ppd/classppd/ps/*.ppd; do - # gzip -c "$i" > "$i.gz" - #done - - cat > class_cups_drv.inc <>class_cups_drv.inc - done - for i in ppd/classppd/ps/*.ppd.gz; do - echo " $i \\" >>class_cups_drv.inc - done - sed -i -e "s|$i .$|$i|" class_cups_drv.inc - echo "cups_drv = prnt/drv/hpcups.drv" >> class_cups_drv.inc - #exit 0 -else # discrete drivers install -d ppd/hpcups ppdc -d ppd/hpcups prnt/drv/hpcups.drv -for i in ppd/hpcups/*.ppd; do +ls ppd/hpcups/*.ppd | while read i; do gzip -c "$i" > "$i.gz" done install -d ppd/hpijs ppdc -d ppd/hpijs prnt/drv/hpijs.drv + echo "gzip ppd files..." -for i in ppd/hpijs/*.ppd; do +ls ppd/hpijs/*.ppd | while read i; do gzip -c "$i" > "$i.gz" done + echo "building foomatic_drv.inc..." ./hpijs-drv > foomatic_drv.inc $shadow echo "building cups_drv.inc..." -cat > cups_drv.inc <>cups_drv.inc +gecho -n "cups_ppd_printers =" >cups_drv.inc +ls ppd/hpcups/*.ppd.gz | while read i; do + gecho -e -n ' \\\n '$i >>cups_drv.inc done -sed -i -e "s|$i .$|$i|" cups_drv.inc -echo "cups_drv = prnt/drv/hpcups.drv" >>cups_drv.inc -fi - -# Update Makefile after PPD generate based on family or discrete -#libtoolize --force -#aclocal -#automake --foreign --add-missing -#autoconf -UNAME='uname -m' -VER=`$UNAME` - -cd prnt/hpcups -if [ "$VER" = "x86_64" ] -then - ln -sf libImageProcessor-x86_64.so libImageProcessor.so -else - ln -sf libImageProcessor-x86_32.so libImageProcessor.so -fi -cd ../../ - -exit 0 +gecho -e -n '\ncups_drv = prnt/drv/hpcups.drv' >>cups_drv.inc