efi-rpm-macros-vl.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. %{!?_rpmmacrodir:%global _rpmmacrodir %{_sysconfdir}/rpm}
  2. Summary: Common RPM Macros for building EFI-related packages
  3. Name: efi-rpm-macros
  4. Version: 4
  5. Release: 4%{?_dist_release}
  6. License: GPLv3+
  7. URL: https://github.com/rhboot/%{name}/
  8. BuildRequires: git sed
  9. BuildArch: noarch
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. Packager: tomop
  13. Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2
  14. %global debug_package %{nil}
  15. %global _efi_vendor_ %(eval echo $(sed -n -e 's/\"//g' -e 's/^ID=//p' /etc/os-release))
  16. %description
  17. %{name} provides a set of RPM macros for use in EFI-related packages.
  18. %package -n efi-srpm-macros
  19. Summary: Common SRPM Macros for building EFI-related packages
  20. BuildArch: noarch
  21. Requires: rpm
  22. %description -n efi-srpm-macros
  23. efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages.
  24. %package -n efi-filesystem
  25. Summary: The basic directory layout for EFI machines
  26. BuildArch: noarch
  27. Requires: filesystem
  28. %description -n efi-filesystem
  29. The efi-filesystem package contains the basic directory layout for EFI
  30. machine bootloaders and tools.
  31. %prep
  32. %autosetup -S git -n %{name}-%{version}
  33. %global rpmbin %(bash -c "command -v rpm")
  34. sed -i \
  35. -e 's|^RPM =.*$|RPM = "%{rpmbin}"|' \
  36. -e 's|^MACRODIR =.*$|MACRODIR = "%{_rpmmacrodir}"|' \
  37. Makefile
  38. git config --local --add efi.vendor "%{_efi_vendor_}"
  39. git config --local --add efi.esp-root /boot/efi
  40. git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}"
  41. %build
  42. %make_build clean all
  43. %install
  44. %make_install
  45. #%%files
  46. #%%{!?_licensedir:%%global license %%%%doc}
  47. #%%license LICENSE
  48. #%%doc README
  49. #%%{_rpmmacrodir}/macros.efi
  50. %files -n efi-srpm-macros
  51. %{!?_licensedir:%global license %%doc}
  52. %license LICENSE
  53. %doc README
  54. %{_rpmmacrodir}/macros.efi-srpm
  55. %{_rpmconfigdir}/brp-boot-efi-times
  56. %files -n efi-filesystem
  57. %defattr(0700,root,root,-)
  58. %dir /boot/efi
  59. %dir /boot/efi/EFI
  60. %dir /boot/efi/EFI/BOOT
  61. %dir /boot/efi/EFI/%{_efi_vendor_}
  62. %changelog
  63. * Thu Sep 12 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4-4
  64. - initial build for Vine Linux.
  65. * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4-3
  66. - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
  67. * Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4-2
  68. - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
  69. * Wed Sep 26 2018 Peter Jones <pjones@redhat.com> - 4-1
  70. - Provide %%{efi_build_requires} and brp-boot-efi-times
  71. * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3-3
  72. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  73. * Fri May 04 2018 Peter Jones <pjones@redhat.com> - 3-2
  74. - Always provide macros for efi_arch and efi_alt_arch (and their _upper
  75. variants), and make efi_has_arch and efi_has_alt_arch 0 when they will be
  76. wrong. This ensures everything can always expand when we're on a non-efi
  77. architecture.
  78. * Fri May 04 2018 Peter Jones <pjones@redhat.com> - 3-1
  79. - Update to version 3 to try and un-break rawhide composes due to
  80. ExclusiveArch constraints.
  81. * Thu May 03 2018 Peter Jones <pjones@redhat.com> - 2-6
  82. - Rework the macros for better srpm use.
  83. * Wed May 02 2018 Peter Jones <pjones@redhat.com> - 2-5
  84. - Add efi-filesystem subpackage
  85. * Wed May 02 2018 Peter Jones <pjones@redhat.com> - 2-4
  86. - Add %%{efi_has_alt_arch}
  87. * Tue May 01 2018 Peter Jones <pjones@redhat.com> - 2-3
  88. - Make an efi-srpm-macros subpackage to pull in so %%{efi} works in
  89. ExclusiveArch in koji.
  90. * Tue May 01 2018 Peter Jones <pjones@redhat.com> - 2-2
  91. - Fix the non-efi and non-efi-alt-arch cases, hopefully.
  92. - Make efi-*-macros packages not be ExclusiveArch, because they need to work
  93. in non-efi-arch packages.
  94. * Tue May 01 2018 Peter Jones <pjones@redhat.com> - 2-1
  95. - Lots of rpmlint fixups and the like.
  96. * Mon Apr 30 2018 Peter Jones <pjones@redhat.com> - 1-1
  97. - First shot at building it.