2019-11-27 16:31:37 +08:00
|
|
|
%define debug_package %{nil}
|
|
|
|
|
Name: gnu-efi
|
2023-06-20 16:15:29 +08:00
|
|
|
Version: 3.0.17
|
2023-08-28 12:49:08 +08:00
|
|
|
Release: 5
|
2019-11-27 16:31:37 +08:00
|
|
|
Summary: Development Libraries and headers for EFI
|
|
|
|
|
Epoch: 1
|
|
|
|
|
License: BSD
|
2023-06-20 16:15:29 +08:00
|
|
|
URL: https://sourceforge.net/projects/gnu-efi
|
2023-07-20 15:01:39 +08:00
|
|
|
ExclusiveArch: x86_64 aarch64 loongarch64 riscv64
|
2023-06-20 16:15:29 +08:00
|
|
|
Source0: https://sourceforge.net/projects/gnu-efi/files/%{name}-%{version}.tar.bz2
|
2019-12-16 14:24:21 +08:00
|
|
|
#stubs-32.h comes from http://www.gnu.org/software/glibc/
|
|
|
|
|
Source1: stubs-32.h
|
2023-07-06 14:30:34 +08:00
|
|
|
Patch1: 0001-gnu-efi-add-CHAR16-for-loongarch64.patch
|
2019-11-27 16:31:37 +08:00
|
|
|
|
|
|
|
|
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed 's/^ID=//'))
|
|
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
%global efiarch x86_64
|
|
|
|
|
%endif
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
%global efiarch aarch64
|
|
|
|
|
%endif
|
2023-07-06 14:30:34 +08:00
|
|
|
%ifarch loongarch64
|
|
|
|
|
%global efiarch loongarch64
|
|
|
|
|
%endif
|
2023-07-19 18:12:01 +08:00
|
|
|
%ifarch riscv64
|
|
|
|
|
%global efiarch riscv64
|
|
|
|
|
%endif
|
2019-11-27 16:31:37 +08:00
|
|
|
|
|
|
|
|
Provides: %{name}-utils = %{epoch}:%{version}-%{release}
|
|
|
|
|
Obsoletes: %{name}-utils < %{epoch}:%{version}-%{release}
|
2023-06-20 16:15:29 +08:00
|
|
|
BuildRequires: gcc make binutils
|
2019-11-27 16:31:37 +08:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This package contains development headers and libraries for developing
|
|
|
|
|
applications that run under EFI (Extensible Firmware Interface).
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development Libraries and headers for EFI
|
|
|
|
|
Obsoletes: gnu-efi < 1:3.0.2-1
|
2023-06-20 16:15:29 +08:00
|
|
|
Requires: gnu-efi = %{epoch}:%{version}-%{release}
|
2019-11-27 16:31:37 +08:00
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains development headers and libraries for developing
|
|
|
|
|
applications that run under EFI (Extensible Firmware Interface).
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-06-20 16:15:29 +08:00
|
|
|
%autosetup -n %{name}-%{version} -p1
|
2020-03-13 17:57:22 +08:00
|
|
|
install -d gnuefi/gnu
|
|
|
|
|
install -Dp %{SOURCE1} gnuefi/gnu/
|
2019-11-27 16:31:37 +08:00
|
|
|
|
2023-06-20 16:15:29 +08:00
|
|
|
|
2019-11-27 16:31:37 +08:00
|
|
|
%build
|
2023-08-28 12:49:08 +08:00
|
|
|
unset LDFLAGS
|
|
|
|
|
|
2019-11-27 16:31:37 +08:00
|
|
|
make
|
|
|
|
|
make apps
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
setarch linux32 -B make ARCH=ia32 PREFIX=%{_prefix} LIBDIR=%{_prefix}/lib
|
|
|
|
|
setarch linux32 -B make ARCH=ia32 PREFIX=%{_prefix} LIBDIR=%{_prefix}/lib apps
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
install -d %{buildroot}/%{_libdir}/gnuefi
|
|
|
|
|
install -d %{buildroot}/boot/efi/EFI/%{efidir}/%{efiarch}
|
|
|
|
|
make PREFIX=%{_prefix} LIBDIR=%{_libdir} INSTALLROOT=%{buildroot} install
|
|
|
|
|
mv %{buildroot}/%{_libdir}/*.lds %{buildroot}/%{_libdir}/*.o %{buildroot}/%{_libdir}/gnuefi
|
|
|
|
|
mv %{efiarch}/apps/{route80h.efi,modelist.efi} %{buildroot}/boot/efi/EFI/%{efidir}/%{efiarch}/
|
|
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
install -d %{buildroot}/%{_prefix}/lib/gnuefi
|
|
|
|
|
install -d %{buildroot}/boot/efi/EFI/%{efidir}/ia32
|
|
|
|
|
|
|
|
|
|
setarch linux32 -B make PREFIX=%{_prefix} LIBDIR=%{_prefix}/lib INSTALLROOT=%{buildroot} ARCH=ia32 install
|
|
|
|
|
mv %{buildroot}/%{_prefix}/lib/*.{lds,o} %{buildroot}/%{_prefix}/lib/gnuefi/
|
|
|
|
|
mv ia32/apps/{route80h.efi,modelist.efi} %{buildroot}/boot/efi/EFI/%{efidir}/ia32/
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{_prefix}/lib*/*
|
|
|
|
|
%dir %attr(0700,root,root) /boot/efi/EFI/%{efidir}/*/
|
|
|
|
|
%attr(0700,root,root) /boot/efi/EFI/%{efidir}/*/*.efi
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-,root,root,-)
|
2023-06-20 16:15:29 +08:00
|
|
|
%doc README.*
|
2019-11-27 16:31:37 +08:00
|
|
|
%{_includedir}/efi
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-08-28 12:49:08 +08:00
|
|
|
* Mon Aug 28 2023 chenchen <chen_aka_jan@163.com> - 1:3.0.17-5
|
|
|
|
|
- unset ldflags for fix build error
|
|
|
|
|
|
2023-07-20 15:01:39 +08:00
|
|
|
* Thu Jul 20 2023 zhangxiang <zhangxiang@iscas.ac.cn> - 1:3.0.17-4
|
|
|
|
|
- Fix ExclusiveArch for riscv64
|
|
|
|
|
|
2023-07-19 18:12:01 +08:00
|
|
|
* Wed Jul 19 2023 misaka00251 <liuxin@iscas.ac.cn> - 1:3.0.17-3
|
|
|
|
|
- Enable build on riscv64
|
|
|
|
|
|
2023-07-06 14:30:34 +08:00
|
|
|
* Thu Jul 6 2023 doupengda <doupengda@loongson.cn> - 1:3.0.17-2
|
|
|
|
|
- gnu-efi add CHAR16 for loongarch64
|
|
|
|
|
|
2023-06-20 16:15:29 +08:00
|
|
|
* Tue Jun 20 2023 chenchen <chen_aka_jan@163.com> - 1:3.0.17-1
|
|
|
|
|
- Upgrade to version 3.0.17
|
|
|
|
|
|
2021-06-08 14:43:56 +08:00
|
|
|
* Mon Jun 7 2021 baizhonggui <baizhonggui@huawei.com> - 3.0.8-10
|
|
|
|
|
- Fix building error: make[1]: gcc: No such file or directory
|
|
|
|
|
- Add gcc in BuildRequires
|
|
|
|
|
|
2020-09-11 10:12:05 +08:00
|
|
|
* Thu Sep 10 2020 liuweibo <liuweibo10@huawei.com> - 3.0.8-9
|
|
|
|
|
- Fix Source0
|
|
|
|
|
|
2020-03-18 23:28:00 +08:00
|
|
|
* Wed Mar 18 2020 likexin <likexin4@huawei.com> - 3.0.8-8
|
|
|
|
|
- Delete modify-cflags.patch
|
|
|
|
|
|
2020-03-18 15:39:45 +08:00
|
|
|
* Wed Mar 18 2020 likexin <likexin4@huawei.com> - 3.0.8-7
|
|
|
|
|
- Fix up modify-cflags.patch
|
|
|
|
|
|
2020-03-18 10:01:55 +08:00
|
|
|
* Wed Mar 18 2020 likexin <likexin4@huawei.com> - 3.0.8-6
|
|
|
|
|
- Add cflags -fstack-protector-strong
|
|
|
|
|
|
2020-03-13 17:57:22 +08:00
|
|
|
* Fri Mar 13 2020 zhujunhao<zhujunhao5@huawei.com> - 3.0.8-5
|
|
|
|
|
- Modify x86 build failed
|
|
|
|
|
|
2020-01-15 19:33:48 +08:00
|
|
|
* Wed Jan 15 2020 yuxiangyang4<yuxiangyang4@huawei.com> - 3.0.8-4
|
|
|
|
|
- Upgrade source code to 3.0.8
|
|
|
|
|
|
2019-11-27 16:31:37 +08:00
|
|
|
* Wed Nov 20 2019 yangjian<yangjian79@huawei.com> - 3.0.8-3
|
|
|
|
|
- Package init
|