SHA256
1
0
forked from pool/grub2

Accepting request 155828 from home:duwe:branches:Base:System

Fix up bogus items from the previous merge:
 - efi_libdir = _libdir = /usr/lib
 - package /usr/lib/grub2 dir only once
 - move grub.efi to /usr/lib/grub2/%{grubefiarch}/
 - create a symlink so that scripts can find it there.

OBS-URL: https://build.opensuse.org/request/show/155828
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=17
This commit is contained in:
Andrei Borzenkov 2013-02-19 16:44:15 +00:00 committed by Git OBS Bridge
parent b71db834cc
commit b0a5de8f8d
2 changed files with 37 additions and 32 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Feb 19 15:38:04 UTC 2013 - duwe@suse.com
Fix up bogus items from the previous merge:
- efi_libdir = _libdir = /usr/lib
- package /usr/lib/grub2 dir only once
- move grub.efi to /usr/lib/grub2/%{grubefiarch}/
- create a symlink so that scripts can find it there.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 14 11:42:40 UTC 2013 - duwe@suse.com Thu Feb 14 11:42:40 UTC 2013 - duwe@suse.com

View File

@ -51,16 +51,9 @@ BuildRequires: pesign-obs-integration
%endif %endif
%endif %endif
# Modules always contain just 32-bit code # Modules code is dynamically loaded and collected from a _fixed_ path.
%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
@ -305,7 +298,7 @@ cd build-efi
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \ --sysconfdir=%{_sysconfdir} \
--target=%{_target_platform} \ --target=%{_target_platform} \
--libdir=%{efi_libdir} \ --libdir=%{_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}
@ -363,14 +356,24 @@ make %{?_smp_mflags}
%ifarch %{efi} %ifarch %{efi}
%ifarch x86_64 %ifarch x86_64
%if 0%{?suse_version} >= 1230 || 0%{?sles_version} >= 11 %if 0%{?suse_version} >= 1230 || 0%{?sles_version} >= 11
export BRP_PESIGN_FILES="%{efi_libdir}/efi/grub.efi" export BRP_PESIGN_FILES="%{_libdir}/%{name}/%{grubefiarch}/grub.efi"
%endif %endif
%endif %endif
cd build-efi cd build-efi
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
install -m 755 -d $RPM_BUILD_ROOT%{efi_libdir}/efi install -m 644 grub.efi $RPM_BUILD_ROOT%{_libdir}/%{name}/%{grubefiarch}/.
install -m 644 grub.efi $RPM_BUILD_ROOT%{efi_libdir}/efi/grub.efi
# Create grub.efi link to system efi directory
# This is for tools like kiwi not fiddling with the path
%if "%{grubefiarch}" == "x86_64-efi"
%define sysefidir %{_exec_prefix}/lib64/efi
%else
%define sysefidir %{_libdir}/efi
%endif
install -d $RPM_BUILD_ROOT%{sysefidir}
ln -sf ../../../%{_libdir}/%{name}/%{grubefiarch}/grub.efi $RPM_BUILD_ROOT%{sysefidir}/grub.efi
cd .. cd ..
%endif %endif
@ -392,14 +395,7 @@ 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
@ -610,6 +606,7 @@ 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
@ -622,7 +619,6 @@ fi
%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
@ -655,18 +651,18 @@ fi
%files %{grubefiarch} %files %{grubefiarch}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{efi_libdir}/efi %dir %{_libdir}/%{name}/%{grubefiarch}
%dir %{efi_libdir}/%{name} %{_libdir}/%{name}/%{grubefiarch}/grub.efi
%dir %{efi_libdir}/%{name}/%{grubefiarch} %{_libdir}/%{name}/%{grubefiarch}/*.img
%{efi_libdir}/efi/grub.efi %{_libdir}/%{name}/%{grubefiarch}/*.lst
%{efi_libdir}/%{name}/%{grubefiarch}/*.img %{_libdir}/%{name}/%{grubefiarch}/*.mod
%{efi_libdir}/%{name}/%{grubefiarch}/*.lst %{_libdir}/%{name}/%{grubefiarch}/*.module
%{efi_libdir}/%{name}/%{grubefiarch}/*.mod %{_libdir}/%{name}/%{grubefiarch}/gdb_grub2
%{efi_libdir}/%{name}/%{grubefiarch}/*.module %{_libdir}/%{name}/%{grubefiarch}/gmodule.pl
%{efi_libdir}/%{name}/%{grubefiarch}/gdb_grub2 %{_libdir}/%{name}/%{grubefiarch}/kernel.exec
%{efi_libdir}/%{name}/%{grubefiarch}/gmodule.pl %{_libdir}/%{name}/%{grubefiarch}/modinfo.sh
%{efi_libdir}/%{name}/%{grubefiarch}/kernel.exec %dir %{sysefidir}
%{efi_libdir}/%{name}/%{grubefiarch}/modinfo.sh %{sysefidir}/grub.efi
%endif %endif
%changelog %changelog