SHA256
1
0
forked from pool/grub2

Accepting request 148930 from home:michael-chang:branches:Base:System

Sync from SLE 11 SP3

- put 32-bit grub2 modules to /usr/lib/grub2
- put 64-bit grub2 modules to /usr/lib64/grub2 (x86_64-efi)
- put grub.efi to /usr/lib64/efi(x86_64) or /usr/lib/efi(i586)

OBS-URL: https://build.opensuse.org/request/show/148930
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=9
This commit is contained in:
Jiri Slaby 2013-01-18 10:44:48 +00:00 committed by Git OBS Bridge
parent 34c65f9278
commit 5c92e57976
2 changed files with 37 additions and 16 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Jan 18 08:57:48 UTC 2013 - mchang@suse.com
- put 32-bit grub2 modules to /usr/lib/grub2
- put 64-bit grub2 modules to /usr/lib64/grub2 (x86_64-efi)
- put grub.efi to /usr/lib64/efi(x86_64) or /usr/lib/efi(i586)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jan 18 07:39:18 UTC 2013 - mchang@suse.com Fri Jan 18 07:39:18 UTC 2013 - mchang@suse.com

View File

@ -51,6 +51,13 @@ BuildRequires: guile
# Modules always contain just 32-bit code # Modules always contain just 32-bit code
%define _libdir %{_exec_prefix}/lib %define _libdir %{_exec_prefix}/lib
%ifarch x86_64
# x86_64-efi is 64-bit code, though ..
%define efi_libdir %{_exec_prefix}/lib64
%else
%define efi_libdir %{_libdir}
%endif
%ifarch ppc ppc64 %ifarch ppc ppc64
%define grubcpu powerpc %define grubcpu powerpc
%define platform ieee1275 %define platform ieee1275
@ -274,6 +281,7 @@ export CFLAGS CXXFLAGS FFLAGS
%configure \ %configure \
TARGET_LDFLAGS=-static \ TARGET_LDFLAGS=-static \
--target=%{_target_platform} \ --target=%{_target_platform} \
--libdir=%{efi_libdir} \
--with-platform=efi \ --with-platform=efi \
--program-transform-name=s,grub,%{name}, --program-transform-name=s,grub,%{name},
make %{?_smp_mflags} make %{?_smp_mflags}
@ -338,8 +346,8 @@ make %{?_smp_mflags}
cd grub-efi-%{version} cd grub-efi-%{version}
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
install -m 755 -d $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/ install -m 755 -d $RPM_BUILD_ROOT%{efi_libdir}/efi
install -m 755 grub.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.efi install -m 755 grub.efi $RPM_BUILD_ROOT%{efi_libdir}/efi/grub.efi
cd .. cd ..
%endif %endif
@ -362,7 +370,14 @@ install -d $RPM_BUILD_ROOT/boot/%{name}
touch $RPM_BUILD_ROOT/boot/%{name}/grub.cfg touch $RPM_BUILD_ROOT/boot/%{name}/grub.cfg
# Remove devel files # Remove devel files
%ifarch x86_64
%if ! 0%{?only_efi:1}
rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*/*.h rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*/*.h
%endif
rm $RPM_BUILD_ROOT/%{efi_libdir}/%{name}/*/*.h
%else
rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*/*.h
%endif
%if 0%{?suse_version} >= 1140 %if 0%{?suse_version} >= 1140
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.h rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.h
%endif %endif
@ -569,7 +584,6 @@ fi
%{_bindir}/%{name}-mkstandalone %{_bindir}/%{name}-mkstandalone
%{_bindir}/%{name}-mount %{_bindir}/%{name}-mount
%{_bindir}/%{name}-script-check %{_bindir}/%{name}-script-check
%dir %{_libdir}/%{name}
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
%if 0%{?suse_version} >= 1140 %if 0%{?suse_version} >= 1140
%{_datadir}/%{name}/*.pf2 %{_datadir}/%{name}/*.pf2
@ -581,6 +595,7 @@ fi
%if ! 0%{?only_efi:1} %if ! 0%{?only_efi:1}
%files %{grubarch} %files %{grubarch}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{grubarch} %dir %{_libdir}/%{name}/%{grubarch}
%ifnarch ppc ppc64 %ifnarch ppc ppc64
%{_libdir}/%{name}/%{grubarch}/*.image %{_libdir}/%{name}/%{grubarch}/*.image
@ -610,19 +625,18 @@ fi
%files %{grubefiarch} %files %{grubefiarch}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir /boot/efi %dir %{efi_libdir}/efi
%dir /boot/efi/EFI %dir %{efi_libdir}/%{name}
%dir /boot/efi/EFI/%{efidir} %dir %{efi_libdir}/%{name}/%{grubefiarch}
%attr(0755,root,root)/boot/efi/EFI/%{efidir}/grub.efi %{efi_libdir}/efi/grub.efi
%dir %{_libdir}/%{name}/%{grubefiarch} %{efi_libdir}/%{name}/%{grubefiarch}/*.img
%{_libdir}/%{name}/%{grubefiarch}/*.img %{efi_libdir}/%{name}/%{grubefiarch}/*.lst
%{_libdir}/%{name}/%{grubefiarch}/*.lst %{efi_libdir}/%{name}/%{grubefiarch}/*.mod
%{_libdir}/%{name}/%{grubefiarch}/*.mod %{efi_libdir}/%{name}/%{grubefiarch}/*.module
%{_libdir}/%{name}/%{grubefiarch}/*.module %{efi_libdir}/%{name}/%{grubefiarch}/gdb_grub2
%{_libdir}/%{name}/%{grubefiarch}/gdb_grub2 %{efi_libdir}/%{name}/%{grubefiarch}/gmodule.pl
%{_libdir}/%{name}/%{grubefiarch}/gmodule.pl %{efi_libdir}/%{name}/%{grubefiarch}/kernel.exec
%{_libdir}/%{name}/%{grubefiarch}/kernel.exec %{efi_libdir}/%{name}/%{grubefiarch}/modinfo.sh
%{_libdir}/%{name}/%{grubefiarch}/modinfo.sh
%endif %endif
%changelog %changelog