FIXUPHACK 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #Ubuntu Jaunty
  2. #i don't understand this. /usr/lib/cups/backend is empty...
  3. if [ -d usr/lib/cups/backend-available ];then
  4. if [ -d usr/lib/cups/backend ];then
  5. cp -a -f usr/lib/cups/backend-available/* usr/lib/cups/backend/
  6. fi
  7. fi
  8. #need cups-config
  9. if [ -f ../cups_DEV/usr/bin/cups-config ];then
  10. cp -f ../cups_DEV/usr/bin/cups-config usr/bin/
  11. fi
  12. #slackware 13.1, wants the html web interace files at usr/share/doc/cups-1.4.3...
  13. DOCCUPS="`find usr/doc -maxdepth 1 -type d -name cups* | head -n 1`"
  14. if [ "$DOCCUPS" ];then
  15. BASEDOCCUPS="`basename $DOCCUPS`"
  16. rm -rf usr/share/doc/cups
  17. ln -s ../../doc/${BASEDOCCUPS} usr/share/doc/cups
  18. ln -s ../../doc/${BASEDOCCUPS} usr/share/doc/${BASEDOCCUPS}
  19. #reduce it a bit...
  20. for ONECUPSDOC in `find ${DOCCUPS} -maxdepth 1 -type d | tr '\n' ' '`
  21. do
  22. BASEONECUPS="`basename $ONECUPSDOC`"
  23. [ "$BASEONECUPS" = "help" ] && continue
  24. [ "$BASEONECUPS" = "images" ] && continue
  25. rm -rf usr/doc/${BASEDOCCUPS}/$BASEONECUPS
  26. done
  27. fi
  28. #slackware 13.1, have doc>exe...
  29. [ -d usr/man ] && rm -rf usr/man
  30. [ -d usr/share/man ] && rm -rf usr/share/man
  31. [ -d usr/share/cups/examples ] && rm -rf usr/share/cups/examples
  32. #drake puppy 0.1, july 2011, rcrsn51 advises that /etc/cups/snmp.conf "needs to be world-readable in order to detect network printers"
  33. [ -f etc/cups/snmp.conf ] && chmod 644 etc/cups/snmp.conf
  34. #111101 'help' directory seems not needed by web interface, move to _DOC...
  35. CUPSHELPDIR="`find usr -type d -name help | sed -e 's%usr%%' | tr '\n' ' '`"
  36. for ONECHD in $CUPSHELPDIR
  37. do
  38. if [ -f usr${ONECHD}/cgi.html ];then
  39. mkdir -p ../cups_DOC/usr${ONECHD}
  40. cp -a -f usr${ONECHD}/* ../cups_DOC/usr${ONECHD}/
  41. rm -f usr${ONECHD}/*
  42. fi
  43. done
  44. #NOTE: the above is a hack. The variable PKGS_SPECS_TABLE in file DISTRO_PKGS_SPECS-*, has an entry like:
  45. #yes|cups|cups|exe,dev,doc>exe,nls
  46. #notice doc>exe, this ensures that 2createpackages won't move 'doc' dir to cups_DOC.
  47. #but, we do want part of docs to go to cups_DOC, hence the hack.
  48. #note, different distros have 'help' in different places:
  49. #T2: /usr/share/doc/cups/help
  50. #Slackware: /usr/doc/cups/help
  51. #Debian: /usr/share/cups/doc-root/help
  52. #111103 in addition to the above, also need to handle yes|cups|cups|exe,dev,doc,nls (no doc>exe)...
  53. CUPSWEBINTERFACE="`find usr -type f -name favicon.ico`" #in same dir as index.html
  54. if [ ! "$CUPSWEBINTERFACE" ];then
  55. if [ -d ../cups_DOC ];then
  56. CUPSWEBCSS="`find ../cups_DOC/usr -type f -name favicon.ico | head -n 1 | sed -e 's%\.\./cups_DOC/%%'`"
  57. if [ "$CUPSWEBCSS" ];then
  58. CUPSWEBDIR="`dirname $CUPSWEBCSS`"
  59. mkdir -p $CUPSWEBDIR
  60. cp -a -f ../cups_DOC/${CUPSWEBDIR}/* ${CUPSWEBDIR}/
  61. rm -rf ${CUPSWEBDIR}/help
  62. fi
  63. fi
  64. fi