0e50f1f
Transformations. Anyone, please tell upstream it's useful not to have
0e50f1f
them half-baked. This is so that we do not conflict with grub.
0e50f1f
0e50f1f
Lubomir Rintel <lkundrak@v3.sk>
0e50f1f
0e50f1f
diff -urp grub2.orig/Makefile.in grub2/Makefile.in
0e50f1f
--- grub2.orig/Makefile.in	2008-08-07 21:37:29.000000000 +0200
0e50f1f
+++ grub2/Makefile.in	2008-08-08 07:43:10.000000000 +0200
0e50f1f
@@ -215,12 +215,12 @@ install-local: all
0e50f1f
 	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
0e50f1f
 	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
0e50f1f
 	done
0e50f1f
-	$(mkinstalldirs) $(DESTDIR)$(libdir)/grub
0e50f1f
+	$(mkinstalldirs) $(DESTDIR)$(libdir)/`echo grub | sed '$(transform)'`
0e50f1f
 	@list='$(lib_DATA)'; \
0e50f1f
 	for file in $$list; do \
0e50f1f
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
0e50f1f
 	  dest="`echo $$file | sed 's,.*/,,'`"; \
0e50f1f
-	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
0e50f1f
+	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/`echo grub | sed '$(transform)'`/$$dest; \
0e50f1f
 	done
0e50f1f
 
0e50f1f
 install-strip:
0e50f1f
diff -urp grub2.orig/util/grub.d/00_header.in grub2/util/grub.d/00_header.in
0e50f1f
--- grub2.orig/util/grub.d/00_header.in	2008-08-07 21:37:28.000000000 +0200
0e50f1f
+++ grub2/util/grub.d/00_header.in	2008-08-08 07:43:10.000000000 +0200
0e50f1f
@@ -23,7 +23,7 @@ exec_prefix=@exec_prefix@
0e50f1f
 libdir=@libdir@
0e50f1f
 grub_prefix=`echo /boot/grub | sed ${transform}`
0e50f1f
 
0e50f1f
-. ${libdir}/grub/update-grub_lib
0e50f1f
+. ${libdir}/`echo grub | sed ${transform}`/update-grub_lib
0e50f1f
 
0e50f1f
 # Do this as early as possible, since other commands might depend on it.
0e50f1f
 # (e.g. the `font' command might need lvm or raid modules)
0e50f1f
diff -urp grub2.orig/util/grub.d/10_hurd.in grub2/util/grub.d/10_hurd.in
0e50f1f
--- grub2.orig/util/grub.d/10_hurd.in	2008-08-07 21:37:28.000000000 +0200
0e50f1f
+++ grub2/util/grub.d/10_hurd.in	2008-08-08 07:44:29.000000000 +0200
0e50f1f
@@ -16,10 +16,12 @@
0e50f1f
 # You should have received a copy of the GNU General Public License
0e50f1f
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
0e50f1f
 
0e50f1f
+transform="@program_transform_name@"
0e50f1f
+
0e50f1f
 prefix=@prefix@
0e50f1f
 exec_prefix=@exec_prefix@
0e50f1f
 libdir=@libdir@
0e50f1f
-. ${libdir}/grub/update-grub_lib
0e50f1f
+. ${libdir}/`echo grub |sed ${transform}`/update-grub_lib
0e50f1f
 
0e50f1f
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
0e50f1f
   OS=GNU
0e50f1f
diff -urp grub2.orig/util/grub.d/10_linux.in grub2/util/grub.d/10_linux.in
0e50f1f
--- grub2.orig/util/grub.d/10_linux.in	2008-08-07 21:37:28.000000000 +0200
0e50f1f
+++ grub2/util/grub.d/10_linux.in	2008-08-08 07:43:10.000000000 +0200
0e50f1f
@@ -16,10 +16,12 @@
0e50f1f
 # You should have received a copy of the GNU General Public License
0e50f1f
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
0e50f1f
 
0e50f1f
+transform="@program_transform_name@"
0e50f1f
+
0e50f1f
 prefix=@prefix@
0e50f1f
 exec_prefix=@exec_prefix@
0e50f1f
 libdir=@libdir@
0e50f1f
-. ${libdir}/grub/update-grub_lib
0e50f1f
+. ${libdir}/`echo grub | sed ${transform}`/update-grub_lib
0e50f1f
 
0e50f1f
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
0e50f1f
   OS=GNU/Linux
0e50f1f
diff -urp grub2.orig/util/grub.d/10_windows.in grub2/util/grub.d/10_windows.in
0e50f1f
--- grub2.orig/util/grub.d/10_windows.in	2008-08-07 21:37:27.000000000 +0200
0e50f1f
+++ grub2/util/grub.d/10_windows.in	2008-08-08 07:44:13.000000000 +0200
0e50f1f
@@ -16,10 +16,12 @@
0e50f1f
 # You should have received a copy of the GNU General Public License
0e50f1f
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
0e50f1f
 
0e50f1f
+transform="@program_transform_name@"
0e50f1f
+
0e50f1f
 prefix=@prefix@
0e50f1f
 exec_prefix=@exec_prefix@
0e50f1f
 libdir=@libdir@
0e50f1f
-. ${libdir}/grub/update-grub_lib
0e50f1f
+. ${libdir}/`echo grub |sed ${transform}`/update-grub_lib
0e50f1f
 
0e50f1f
 case "`uname 2>/dev/null`" in
0e50f1f
   CYGWIN*)  ;;
0e50f1f
diff -urp grub2.orig/util/i386/pc/grub-install.in grub2/util/i386/pc/grub-install.in
0e50f1f
--- grub2.orig/util/i386/pc/grub-install.in	2008-08-07 21:37:28.000000000 +0200
0e50f1f
+++ grub2/util/i386/pc/grub-install.in	2008-08-08 07:43:10.000000000 +0200
0e50f1f
@@ -36,7 +36,7 @@ grub_mkimage=${bindir}/`echo grub-mkimag
0e50f1f
 grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}`
0e50f1f
 grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
0e50f1f
 rootdir=
0e50f1f
-grub_prefix=`echo /boot/grub | sed ${transform}`
0e50f1f
+grub_prefix=/boot/`echo grub | sed ${transform}`
0e50f1f
 modules=
0e50f1f
 
0e50f1f
 install_device=
0e50f1f
@@ -118,7 +118,7 @@ for option in "$@"; do
0e50f1f
 done
0e50f1f
 
0e50f1f
 # for make_system_path_relative_to_its_root()
0e50f1f
-. ${libdir}/grub/update-grub_lib
0e50f1f
+. ${libdir}/`echo grub | sed ${transform}`/update-grub_lib
0e50f1f
 
0e50f1f
 if test "x$install_device" = x; then
0e50f1f
     echo "install_device not specified." 1>&2
0e50f1f
diff -urp grub2.orig/util/powerpc/ieee1275/grub-mkrescue.in grub2/util/powerpc/ieee1275/grub-mkrescue.in
0e50f1f
--- grub2.orig/util/powerpc/ieee1275/grub-mkrescue.in	2008-08-07 21:37:27.000000000 +0200
0e50f1f
+++ grub2/util/powerpc/ieee1275/grub-mkrescue.in	2008-08-08 07:43:10.000000000 +0200
0e50f1f
@@ -100,7 +100,7 @@ grub.img        Raw     'UNIX'    'tbxi'
0e50f1f
 EOF
0e50f1f
 
0e50f1f
 iso_dir=`mktemp -d`
0e50f1f
-boot_dir=${iso_dir}/boot/grub
0e50f1f
+boot_dir=${iso_dir}/boot/`echo grub | sed ${transform}`
0e50f1f
 mkdir ${iso_dir}/boot
0e50f1f
 mkdir ${boot_dir}
0e50f1f
 core_img=${boot_dir}/grub.img
0e50f1f
diff -urp grub2.orig/util/update-grub.in grub2/util/update-grub.in
0e50f1f
--- grub2.orig/util/update-grub.in	2008-08-07 21:37:28.000000000 +0200
0e50f1f
+++ grub2/util/update-grub.in	2008-08-08 07:43:10.000000000 +0200
0e50f1f
@@ -23,7 +23,7 @@ exec_prefix=@exec_prefix@
0e50f1f
 sbindir=@sbindir@
0e50f1f
 libdir=@libdir@
0e50f1f
 sysconfdir=@sysconfdir@
0e50f1f
-grub_prefix=`echo /boot/grub | sed ${transform}`
0e50f1f
+grub_prefix=/boot/`echo /grub | sed ${transform}`
0e50f1f
 grub_cfg=${grub_prefix}/grub.cfg
0e50f1f
 update_grub_dir=${sysconfdir}/grub.d
0e50f1f
 
0e50f1f
@@ -65,7 +65,7 @@ for option in "$@"; do
0e50f1f
     esac
0e50f1f
 done
0e50f1f
 
0e50f1f
-. ${libdir}/grub/update-grub_lib
0e50f1f
+. ${libdir}/`echo grub | sed ${transform}`/update-grub_lib
0e50f1f
 
0e50f1f
 if [ "x$EUID" = "x" ] ; then
0e50f1f
   EUID=`id -u`
0e50f1f
@@ -107,7 +107,7 @@ fi
0e50f1f
 mkdir -p ${grub_prefix}
0e50f1f
 
0e50f1f
 if test -e ${grub_prefix}/device.map ; then : ; else
0e50f1f
-  grub-mkdevicemap
0e50f1f
+  ${grub_mkdevicemap}
0e50f1f
 fi
0e50f1f
 
0e50f1f
 # Device containing our userland.  Typically used for root= parameter.
0e50f1f
diff -urp grub2.orig/util/update-grub_lib.in grub2/util/update-grub_lib.in
0e50f1f
--- grub2.orig/util/update-grub_lib.in	2008-08-07 21:37:28.000000000 +0200
0e50f1f
+++ grub2/util/update-grub_lib.in	2008-08-08 07:43:10.000000000 +0200
0e50f1f
@@ -145,7 +145,8 @@ prepare_grub_to_access_device ()
0e50f1f
 
0e50f1f
 font_path ()
0e50f1f
 {
0e50f1f
-  for dir in ${pkgdatadir} /boot/grub /usr/share/grub ; do
0e50f1f
+  for dir in ${pkgdatadir} ${pkgdatadir}/`echo grub | sed ${transform}` \
0e50f1f
+             /boot/`echo grub | sed ${transform}`; do
0e50f1f
     # FIXME: We prefer ascii because loading complete fonts is too slow (and
0e50f1f
     # we don't yet provide the gettext magic that would make unicode useful).
0e50f1f
     for basename in ascii unicode unifont ; do