woof_base_hack 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. #!/bin/sh
  2. #woof patches
  3. #run this in the root dir of the woof tree #old, now runs from 3builddistro
  4. #(C)01micko gpl3 (see /usr/share/doc/legal)
  5. #20110819
  6. #110822 BK modified, called from 3builddistro. runs with current-dir in 'sandbox3'.
  7. #110825 01micko: some fixes.
  8. #111015 01micko, remove icon and boot screen fixes, integrated in woof
  9. #121108 01micko, fix gconv-modules.cache
  10. #130801 removed fixes for dpi (gtkrc), remove old repos to help ppm
  11. #option to remove Thunar.desktop if not part of build
  12. echo
  13. echo "do you want to install Thunar as a base package"
  14. echo "hit \"t\" [enter] for yes, Enter only for no."
  15. read THUNAR
  16. if [ "$THUNAR" != "t" ];then
  17. if [ -f rootfs-complete/usr/share/applications/Thunar.desktop ];then
  18. rm -f rootfs-complete/usr/share/applications/Thunar.desktop
  19. echo "removing Thunar.desktop"
  20. else
  21. echo "Thunar.desktop not present"
  22. fi
  23. else
  24. echo "leaving Thunar.desktop"
  25. fi
  26. #option to remove video-upgrade-wizard
  27. echo
  28. #echo "do you want to remove video-upgrade-wizard? hit \"y\" for yes"
  29. #read NOVIDWIZ
  30. #if [ "$NOVIDWIZ" = "y" ];then
  31. #[ -f rootfs-complete/usr/share/applications/video-upgrade-wizard.desktop ] && \
  32. #rm -f rootfs-complete/usr/share/applications/video-upgrade-wizard.desktop
  33. #echo "removing video-upgrade-wizard.desktop"
  34. #cat > vidwiz.patch <<_PATCH
  35. #--- rootfs-complete/usr/sbin/wizardwizard 2010-10-19 14:42:44.000000000 +0800
  36. #+++ rootfs-complete/usr/sbin/wizardwizard-new 2011-08-19 09:09:05.000000000 +0800
  37. #@@ -70,16 +70,6 @@ export WizardWizard="
  38. #<hbox>
  39. #<text>
  40. #- <label>Upgrade X drivers...</label>
  41. #- </text>
  42. #- <button>
  43. #- <input file>/usr/local/lib/X11/mini-icons/x16.xpm</input>
  44. #- <action>/usr/sbin/video_upgrade_wizard & </action>
  45. #- </button>
  46. #- </hbox>
  47. #-
  48. #- <hbox>
  49. #- <text>
  50. #<label>Connect to Internet or Intranet...</label>
  51. #</text>
  52. #<button>
  53. #_PATCH
  54. #patch -p0 < vidwiz.patch
  55. #if [ $? -ne 0 ];then echo "FAILED patching /usr/sbin/wizardwizard"
  56. #rm -f rootfs-complete/usr/sbin/*.rej
  57. #rm -f vidwiz.patch
  58. ##exit 1
  59. #else
  60. #echo "patching /usr/sbin/wizardwizard succeeded"
  61. #rm -f vidwiz.patch
  62. #fi
  63. #else echo "Ok, video wizard is staying"
  64. #fi
  65. #set PPM gui preference
  66. echo
  67. echo "Do you want the Classic gui or the Ziggy gui for PPM?"
  68. echo "hit \"z\" [enter] for Ziggy, Enter only for Classic."
  69. read ZIGGY
  70. if [ "$ZIGGY" = "z" ];then
  71. ZIGSET="UI=\"Ziggy\""
  72. CLASET="UI=\"Classic\""
  73. sed -i "s%$CLASET%$ZIGSET%" rootfs-complete/usr/local/petget/configure.sh
  74. sed -i "s%$CLASET%$ZIGSET%" rootfs-complete/usr/local/petget/pkg_chooser.sh
  75. echo "PPM gui set to \"Ziggy\""
  76. else echo "Leaving PPM gui set to \"Classic\""
  77. fi
  78. #custom Slacko images, optional #commented 111015
  79. #echo
  80. #echo "Do you want to have the custom Slacko images?"
  81. #echo "These are the boot image and a blue Puppy logo instead of grey"
  82. #echo "\"y\" > enter for yes, enter to skip"
  83. #read SLACK
  84. #if [ "$SLACK" = "y" ];then
  85. #cp -f ../support/slacko/s_puppylogo48.png rootfs-complete/usr/share/doc/puppylogo48.png
  86. #cp -f ../support/slacko/s_puppylogo96.png rootfs-complete/usr/share/doc/puppylogo96.png
  87. #[ ! -f ../boot/boot-dialog/puppy.gifORIG ] && mv ../boot/boot-dialog/puppy.gif ../boot/boot-dialog/puppy.gifORIG
  88. #cp -f ../support/slacko/S_puppy.gif ../boot/boot-dialog/puppy.gif
  89. #echo "Custom Slacko logos applied"
  90. #else
  91. #echo "leaving standard Puppy logos"
  92. #cp -f ../boot/boot-dialog/puppy.gifORIG ../boot/boot-dialog/puppy.gif
  93. #fi
  94. echo "Fixing jwm"
  95. head -n6 rootfs-complete/root/.jwm/jwm_colors > /tmp/jwm_colors
  96. cp -af /tmp/jwm_colors rootfs-complete/root/.jwm/
  97. rm -f /tmp/jwm_colors
  98. #echo "Fixing gtkrc theme"
  99. #head -n2 rootfs-complete/root/.gtkrc-2.0 > /tmp/.gtkrc-2.0
  100. #echo '
  101. #style "user-font" {
  102. #font_name = "Sans 12"
  103. #}
  104. #widget_class "*" style "user-font"
  105. #gtk-font-name="Sans 12"
  106. #include "/root/.gtkrc.mine"
  107. ## -- THEME AUTO-WRITTEN DO NOT EDIT' >> /tmp/.gtkrc-2.0
  108. #cp -af /tmp/.gtkrc-2.0 rootfs-complete/root/
  109. #rm -f /tmp/.gtkrc-2.0
  110. #echo "fixing PKGS_MANAGEMENT for Slacko repo only"
  111. #grep -v 'PKG_REPOS_ENABLED=' rootfs-complete/root/.packages/PKGS_MANAGEMENT > /tmp/PKGS_MANAGEMENT
  112. #echo "PKG_REPOS_ENABLED=' Packages-puppy-slacko-official '" >> /tmp/PKGS_MANAGEMENT
  113. #cp -af /tmp/PKGS_MANAGEMENT rootfs-complete/root/.packages/
  114. #rm -f /tmp/PKGS_MANAGEMENT
  115. # get rid of alsaconf, copied back in in 3builddistro
  116. cat > rootfs-complete/usr/sbin/alsaconf <<_EOF
  117. #!/bin/sh
  118. Xdialog --title "alsaconf" --msgbox "Alsaconf is removed pending a fix \
  119. \n\nPlease try the Multiple Sound Card Wizard then \
  120. \n configure retrovol (the volume icon, right click)" 0 0
  121. _EOF
  122. #make sure still execuatble
  123. chmod 755 rootfs-complete/usr/sbin/alsaconf
  124. echo "Disabling alsaconf"
  125. #121108 fix up gconv-modules.cache
  126. # ***NOTICE*** cross-build, this will have to be executed at first boot... #01micko 121108
  127. if [ "$WOOF_HOSTARCH" = "$WOOF_TARGETARCH" ];then
  128. [ ! -f rootfs-complete/usr/lib/gconv/gconv-modules.cache ] && chroot rootfs-complete /usr/sbin/iconvconfig
  129. fi
  130. echo "Generating /usr/lib/gconv/gconv-modules.cache"
  131. echo "Removing old slacko and wary5 repos"
  132. DFILE=rootfs-complete/root/.packages/Packages-puppy-slacko-official
  133. rm $DFILE
  134. AFILE=rootfs-complete/root/.packages/Packages-puppy-wary5-official
  135. rm $AFILE
  136. echo "Removing udev from Packages-slackware-14.0-official"
  137. sed -i '/^udev/d' rootfs-complete/root/.packages/Packages-slackware-14.0-official
  138. echo
  139. echo "Slacko customisation complete"
  140. #exit 0