[mactel-boot/f17] Add the spec

Matthew Garrett mjg59 at fedoraproject.org
Wed Apr 25 17:51:44 UTC 2012


commit 1af326d6304767ed4dd820038f0d38f64d5803e5
Author: Matthew Garrett <mjg at redhat.com>
Date:   Wed Apr 25 13:51:30 2012 -0400

    Add the spec

 mactel-boot.spec |   46 +++++++++-------------------------------------
 1 files changed, 9 insertions(+), 37 deletions(-)
---
diff --git a/mactel-boot.spec b/mactel-boot.spec
index 78bc843..9642cf5 100644
--- a/mactel-boot.spec
+++ b/mactel-boot.spec
@@ -1,12 +1,13 @@
 Name:		mactel-boot
 Version:	0.9
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Intel Mac boot files
 
 Group:		System Environment/Base
 License:	GPLv2+
 URL:		http://www.codon.org.uk/~mjg59/mactel-boot/
 Source:		http://www.codon.org.uk/~mjg59/mactel-boot/%{name}-%{version}.tar.bz2
+Source1:	mactel-boot-setup
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 ExclusiveArch:	x86_64
@@ -34,6 +35,7 @@ touch $RPM_BUILD_ROOT/boot/efi/EFI/redhat/grub2-efi/.disk_label
 touch $RPM_BUILD_ROOT/boot/efi/EFI/redhat/.disk_label
 touch $RPM_BUILD_ROOT/boot/efi/.disk_label
 touch $RPM_BUILD_ROOT/boot/efi/System/Library/CoreServices/.disk_label
+install -D %{SOURCE1} $RPM_BUILD_ROOT/usr/libexec/mactel-boot-setup
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -46,6 +48,7 @@ rm -rf $RPM_BUILD_ROOT
 /boot/efi/mach_kernel
 /boot/efi/System/Library/CoreServices/SystemVersion.plist
 /usr/sbin/hfs-bless
+/usr/libexec/mactel-boot-setup
 %attr(0755, root, root) %ghost /boot/efi/System/Library/CoreServices/boot.efi
 %attr(0644, root, root) %ghost /boot/efi/.VolumeIcon.icns
 %attr(0644, root, root) %ghost /boot/efi/.disk_label
@@ -53,44 +56,13 @@ rm -rf $RPM_BUILD_ROOT
 %attr(0644, root, root) %ghost /boot/efi/EFI/redhat/grub2-efi/.disk_label
 %attr(0644, root, root) %ghost /boot/efi/System/Library/CoreServices/.disk_label
 
-%define volabel() if [ -f /usr/share/pixmaps/bootloader/fedora.vol ]; then \
-		  cp /usr/share/pixmaps/bootloader/fedora.vol %1/.disk_label; \
-		  fi;
-
-%define diskicon() if [ -f /usr/share/pixmaps/bootloader/fedora.icns ]; then \
-            cp /usr/share/pixmaps/bootloader/fedora.icns %1/.VolumeIcon.icns; \
-		    fi;
-
-%define iconsetup() (if [ x`df -T /boot/efi | tail -n +2 | awk '{print $2}'` = x"hfsplus" ]; then \
-   %diskicon /boot/efi ;\
-   if [ -f /boot/efi/EFI/redhat/grub2-efi/grub.efi ]; then \
-      %volabel /boot/efi/EFI/redhat/grub2-efi/ ;\
-   elif [ -f /boot/efi/EFI/redhat/grub.efi ]; then \
-      %volabel /boot/efi/EFI/redhat/ ;\
-   fi \
-fi)
-
-%triggerin -- grub-efi
-if [ x`df -T /boot/efi | tail -n +2 | awk '{print $2}'` = x"hfsplus" ]; then
-   ln -f /boot/efi/EFI/redhat/grub.efi /boot/efi/System/Library/CoreServices/boot.efi;
-   ln -sf ../../../EFI/redhat/grub.conf /boot/efi/System/Library/CoreServices/boot.conf;
-   hfs-bless /boot/efi/EFI/redhat/grub.efi
-fi
-
-%triggerin -- grub2-efi
-if [ x`df -T /boot/efi | tail -n +2 | awk '{print $2}'` = x"hfsplus" ]; then
-   ln -f /boot/efi/EFI/redhat/grub2-efi/grub.efi /boot/efi/System/Library/CoreServices/boot.efi;
-   ln -sf ../../../EFI/redhat/grub2-efi/grub.cfg /boot/efi/System/Library/CoreServices/boot.cfg;
-   hfs-bless /boot/efi/EFI/redhat/grub2-efi/grub.efi
-fi
-
-%triggerin -- fedora-logos
-%iconsetup
-
-%triggerin -- generic-logos
-%iconsetup
+%triggerin -- grub-efi grub2-efi fedora-logos generic-logos
+/usr/libexec/mactel-boot-setup
 
 %changelog
+* Wed Apr 25 2012 Matthew Garrett <mjg at redhat.com> - 0.9-5
+- Move trigger functionality into an external script
+
 * Thu Apr 19 2012 Matthew Garrett <mjg at redhat.com> - 0.9-4
 - Blessing must take place after linking
 


More information about the scm-commits mailing list