2014-04-04 08:09:51 +00:00
|
|
|
Summary: grub2 resources generated by grub2-mknetdir
|
|
|
|
Name: grub2-xcat
|
|
|
|
Version: 1.0
|
|
|
|
#Release: snap%(date +"%Y%m%d%H%M")
|
2014-11-14 07:57:00 +00:00
|
|
|
Release: 2
|
2014-06-05 09:43:25 +00:00
|
|
|
License: GPLv3+
|
2014-04-04 08:09:51 +00:00
|
|
|
Group: Applications/System
|
|
|
|
Vendor: IBM Corp.
|
|
|
|
Packager: IBM Corp.
|
|
|
|
#Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
|
|
|
Prefix: /tftpboot/boot/grub2
|
|
|
|
BuildRoot: /var/tmp/%{name}-root
|
|
|
|
BuildArch: noarch
|
|
|
|
Source1: grub2-res.tar.gz
|
|
|
|
|
|
|
|
Provides: grub2-xcat
|
|
|
|
Requires:/bin/sh
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
grub2-xcat provides some grub2 resources generated by grub2-mknetdir,including grub2 modules and grub2 image.
|
|
|
|
|
|
|
|
%define _binaries_in_noarch_packages_terminate_build 0
|
|
|
|
|
|
|
|
%prep
|
|
|
|
#cp ./grub2-res.tar.gz /root/rpmbuild/SOURCES/
|
|
|
|
#%ifos linux
|
|
|
|
#tar zxf %{SOURCE1}
|
|
|
|
#%else
|
|
|
|
#rm -rf tftpboot
|
|
|
|
#cp %{SOURCE1} /opt/freeware/src/packages/BUILD
|
|
|
|
#gunzip -f grub2-res.tar.gz
|
|
|
|
#tar -xf grub2-res.tar
|
|
|
|
#%endif
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/
|
|
|
|
cd $RPM_BUILD_ROOT/%{prefix}/
|
|
|
|
|
|
|
|
%ifos linux
|
|
|
|
tar zxf %{SOURCE1}
|
|
|
|
%else
|
|
|
|
cp %{SOURCE1} $RPM_BUILD_ROOT/%{prefix}/
|
|
|
|
gunzip -f grub2-res.tar.gz
|
|
|
|
tar -xf grub2-res.tar
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%post
|
2014-04-11 16:54:20 +00:00
|
|
|
rm -f %{prefix}/grub2.ppc
|
|
|
|
cp %{prefix}/powerpc-ieee1275/core.elf %{prefix}/grub2.ppc
|
2014-04-04 08:09:51 +00:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
#%{prefix}
|
|
|
|
# one for sles, one for rhel. yes, it's ugly...
|
|
|
|
%{prefix}/powerpc-ieee1275/
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
rm %{prefix}/grub2.ppc
|
|
|
|
fi
|
|
|
|
true
|