2016-10-05 12:00:24 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package ipxe
|
|
|
|
|
#
|
2024-04-01 06:34:54 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2016-10-05 12:00:24 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2019-10-25 16:15:52 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-10-05 12:00:24 +00:00
|
|
|
#
|
2018-08-21 19:01:24 +00:00
|
|
|
|
2022-05-23 19:19:17 +00:00
|
|
|
|
2021-06-17 11:47:24 +00:00
|
|
|
%ifnarch %{ix86} x86_64
|
|
|
|
|
%define buildtargets dsk,usb,lkrn
|
|
|
|
|
%else
|
2023-10-25 12:36:08 +00:00
|
|
|
%define buildtargets sdsk,dsk,iso,usb,lkrn
|
|
|
|
|
%define do_floppy 1
|
2021-06-17 11:47:24 +00:00
|
|
|
%endif
|
2016-10-05 12:00:24 +00:00
|
|
|
|
|
|
|
|
Name: ipxe
|
2024-04-01 06:34:54 +00:00
|
|
|
Version: 1.21.1+git20240329.764e34f
|
2016-10-05 12:00:24 +00:00
|
|
|
Release: 0
|
2018-02-19 11:02:09 +00:00
|
|
|
Summary: A Network Boot Firmware
|
2018-08-28 13:46:38 +00:00
|
|
|
License: GPL-2.0-only
|
2016-10-05 12:00:24 +00:00
|
|
|
Group: System/Boot
|
2020-09-01 09:55:19 +00:00
|
|
|
URL: https://ipxe.org/
|
2022-05-23 19:19:17 +00:00
|
|
|
Source: %{name}-%{version}.tar.xz
|
2023-11-07 10:30:44 +00:00
|
|
|
Patch0: syslinux-mtools.patch
|
2018-08-21 19:01:24 +00:00
|
|
|
BuildRequires: binutils-devel
|
2023-02-07 03:55:41 +00:00
|
|
|
# Do not build i586 for Leap/SLE: no such port available
|
|
|
|
|
%ifarch i586
|
|
|
|
|
%if 0%{?sle_version}
|
|
|
|
|
%define no_aarch64_cc 1
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
2023-01-24 11:30:25 +00:00
|
|
|
%ifnarch %{ix86} x86_64
|
2020-08-20 19:49:09 +00:00
|
|
|
%if 0%{?sle_version} >= 150000 && 0%{?sle_version} < 159999
|
|
|
|
|
BuildRequires: cross-x86_64-gcc7
|
|
|
|
|
%else
|
2022-06-22 17:39:58 +00:00
|
|
|
BuildRequires: cross-x86_64-gcc%{gcc_version}
|
2020-08-20 19:49:09 +00:00
|
|
|
%endif
|
|
|
|
|
%endif
|
2023-02-07 03:55:41 +00:00
|
|
|
%if !0%{?no_aarch64_cc}
|
2023-01-24 11:30:25 +00:00
|
|
|
%ifnarch aarch64
|
2018-12-03 09:19:57 +00:00
|
|
|
%if 0%{?sle_version} >= 150000 && 0%{?sle_version} < 159999
|
|
|
|
|
BuildRequires: cross-aarch64-gcc7
|
|
|
|
|
%else
|
2022-06-22 17:39:58 +00:00
|
|
|
BuildRequires: cross-aarch64-gcc%{gcc_version}
|
2018-12-03 09:19:57 +00:00
|
|
|
%endif
|
2019-09-12 12:27:51 +00:00
|
|
|
%endif
|
2023-02-07 03:55:41 +00:00
|
|
|
%endif
|
2016-10-05 12:00:24 +00:00
|
|
|
BuildRequires: perl
|
2020-08-20 19:49:09 +00:00
|
|
|
%ifarch %{ix86} x86_64
|
2023-10-25 12:36:08 +00:00
|
|
|
BuildRequires: mtools
|
2016-10-05 12:00:24 +00:00
|
|
|
BuildRequires: syslinux
|
2021-06-17 11:35:13 +00:00
|
|
|
BuildRequires: xorriso
|
2023-01-24 11:30:25 +00:00
|
|
|
%endif
|
2016-10-05 12:00:24 +00:00
|
|
|
BuildRequires: xz-devel
|
2023-01-24 11:30:25 +00:00
|
|
|
# Does not build on bigendian
|
|
|
|
|
ExcludeArch: s390 s390x ppc ppc64
|
2016-10-05 12:00:24 +00:00
|
|
|
# ix86 does not have a cross-x86_64 gcc available so it can't build
|
|
|
|
|
# the x86_64 ipxe code. As a result of which, the support for ix86
|
|
|
|
|
# is more limited.
|
|
|
|
|
|
|
|
|
|
%description
|
2018-02-19 11:02:09 +00:00
|
|
|
iPXE is a network bootloader. It provides a direct
|
2016-10-05 12:00:24 +00:00
|
|
|
replacement for proprietary PXE ROMs, with many extra features such as
|
|
|
|
|
DNS, HTTP, iSCSI, etc.
|
|
|
|
|
|
|
|
|
|
%package bootimgs
|
|
|
|
|
Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats
|
|
|
|
|
Group: Development/Tools/Other
|
|
|
|
|
|
|
|
|
|
%description bootimgs
|
2018-02-19 11:02:09 +00:00
|
|
|
iPXE is a network bootloader. It provides a direct
|
2016-10-05 12:00:24 +00:00
|
|
|
replacement for proprietary PXE ROMs, with many extra features such as
|
|
|
|
|
DNS, HTTP, iSCSI, etc.
|
|
|
|
|
|
|
|
|
|
This package contains the iPXE boot images in USB, CD, floppy, and PXE
|
2018-02-19 11:02:09 +00:00
|
|
|
UNDI formats. EFI is supported, too.
|
2016-10-05 12:00:24 +00:00
|
|
|
|
|
|
|
|
%prep
|
2023-10-25 12:36:08 +00:00
|
|
|
%autosetup -p1
|
2016-10-05 12:00:24 +00:00
|
|
|
cd src
|
|
|
|
|
|
2023-01-24 10:45:11 +00:00
|
|
|
# enable compressed images
|
|
|
|
|
sed -i.bak \
|
|
|
|
|
-e 's,//\(#define.*IMAGE_ZLIB.*\),\1,' \
|
|
|
|
|
-e 's,//\(#define.*IMAGE_GZIP.*\),\1,' \
|
|
|
|
|
config/general.h
|
|
|
|
|
|
2023-08-28 14:55:22 +00:00
|
|
|
# enable HTTPS downloads
|
|
|
|
|
sed -i.bak \
|
|
|
|
|
-e 's,#undef\(.*DOWNLOAD_PROTO_HTTPS.*\),#define\1,' \
|
|
|
|
|
config/general.h
|
|
|
|
|
|
2023-10-25 12:36:08 +00:00
|
|
|
%build
|
|
|
|
|
cd src
|
2023-08-28 14:55:22 +00:00
|
|
|
|
2016-10-05 12:00:24 +00:00
|
|
|
make_ipxe() {
|
2022-05-23 19:19:17 +00:00
|
|
|
# https://github.com/ipxe/ipxe/issues/620
|
|
|
|
|
[ `gcc -dumpversion` -ge 12 ] && TAG="NO_WERROR=1" || TAG=""
|
2023-01-24 11:30:25 +00:00
|
|
|
make -O %{?_smp_mflags} V=1 \
|
2022-05-23 19:19:17 +00:00
|
|
|
VERSION=%{version} $TAG "$@"
|
2016-10-05 12:00:24 +00:00
|
|
|
}
|
|
|
|
|
|
2020-08-20 19:49:09 +00:00
|
|
|
%ifarch %{ix86} x86_64
|
2016-10-05 12:00:24 +00:00
|
|
|
make_ipxe bin-i386-efi/ipxe.efi
|
2018-08-27 14:08:25 +00:00
|
|
|
make_ipxe bin-i386-efi/snp.efi
|
2023-01-24 11:30:25 +00:00
|
|
|
%else
|
|
|
|
|
make_ipxe CROSS="x86_64-suse-linux-" bin-i386-efi/ipxe.efi
|
|
|
|
|
make_ipxe CROSS="x86_64-suse-linux-" bin-i386-efi/snp.efi
|
2020-08-20 19:49:09 +00:00
|
|
|
%endif
|
|
|
|
|
|
2016-10-05 12:00:24 +00:00
|
|
|
%ifarch x86_64
|
|
|
|
|
make_ipxe bin-x86_64-efi/ipxe.efi
|
2018-08-27 14:08:25 +00:00
|
|
|
make_ipxe bin-x86_64-efi/snp.efi
|
2023-01-24 11:30:25 +00:00
|
|
|
%else
|
|
|
|
|
# ix86 can't cross-compile
|
|
|
|
|
%ifnarch %{ix86}
|
|
|
|
|
make_ipxe CROSS="x86_64-suse-linux-" bin-x86_64-efi/ipxe.efi
|
|
|
|
|
make_ipxe CROSS="x86_64-suse-linux-" bin-x86_64-efi/snp.efi
|
|
|
|
|
%endif
|
2018-12-03 09:19:57 +00:00
|
|
|
%endif # x86_64
|
2016-10-05 12:00:24 +00:00
|
|
|
|
2020-08-20 19:49:09 +00:00
|
|
|
%ifarch aarch64
|
|
|
|
|
make_ipxe bin-arm64-efi/snp.efi
|
2023-01-24 11:30:25 +00:00
|
|
|
%else
|
2023-02-07 03:55:41 +00:00
|
|
|
%{!?no_aarch64_cc:make_ipxe CROSS="aarch64-suse-linux-" bin-arm64-efi/snp.efi}
|
2020-08-20 19:49:09 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
make_ipxe \
|
|
|
|
|
%ifnarch %{ix86} x86_64
|
|
|
|
|
CROSS="x86_64-suse-linux-" \
|
2021-06-17 11:35:13 +00:00
|
|
|
%endif
|
2021-06-17 11:47:24 +00:00
|
|
|
bin/undionly.kpxe bin/ipxe.{%{buildtargets}}
|
2016-10-05 12:00:24 +00:00
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}/%{_datadir}/%{name}/
|
|
|
|
|
mkdir -p %{buildroot}/%{_datadir}/%{name}.efi/
|
|
|
|
|
|
|
|
|
|
install -D -m0644 src/bin/undionly.kpxe %{buildroot}/%{_datadir}/%{name}/
|
2021-06-17 11:47:24 +00:00
|
|
|
install -D -m0644 src/bin/ipxe.{%{buildtargets}} %{buildroot}/%{_datadir}/%{name}/
|
2016-10-05 12:00:24 +00:00
|
|
|
install -D -m0644 src/bin-i386-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/ipxe-i386.efi
|
2018-08-27 14:08:25 +00:00
|
|
|
install -D -m0644 src/bin-i386-efi/snp.efi %{buildroot}/%{_datadir}/%{name}/snp-i386.efi
|
2020-08-20 19:49:09 +00:00
|
|
|
%ifnarch %{ix86}
|
2016-10-05 12:00:24 +00:00
|
|
|
install -D -m0644 src/bin-x86_64-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/ipxe-x86_64.efi
|
2018-08-27 14:08:25 +00:00
|
|
|
install -D -m0644 src/bin-x86_64-efi/snp.efi %{buildroot}/%{_datadir}/%{name}/snp-x86_64.efi
|
2016-10-05 12:00:24 +00:00
|
|
|
%endif
|
2023-02-07 03:55:41 +00:00
|
|
|
%{!?no_aarch64_cc:install -D -m0644 src/bin-arm64-efi/snp.efi %{buildroot}/%{_datadir}/%{name}/snp-arm64.efi}
|
2023-10-25 12:36:08 +00:00
|
|
|
%if 0%{?do_floppy}
|
|
|
|
|
ln -s ipxe.sdsk %{buildroot}/%{_datadir}/%{name}/floppy.img
|
|
|
|
|
%endif
|
2016-10-05 12:00:24 +00:00
|
|
|
|
|
|
|
|
%files bootimgs
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%dir %{_datadir}/%{name}
|
2021-06-17 11:47:24 +00:00
|
|
|
%{_datadir}/%{name}/ipxe.{%{buildtargets}}
|
2023-10-25 12:36:08 +00:00
|
|
|
%if 0%{?do_floppy}
|
|
|
|
|
%{_datadir}/%{name}/floppy.img
|
|
|
|
|
%endif
|
2016-10-05 12:00:24 +00:00
|
|
|
%{_datadir}/%{name}/ipxe-i386.efi
|
2018-08-27 14:08:25 +00:00
|
|
|
%{_datadir}/%{name}/snp-i386.efi
|
2020-08-20 19:49:09 +00:00
|
|
|
%ifnarch %{ix86}
|
2016-10-05 12:00:24 +00:00
|
|
|
%{_datadir}/%{name}/ipxe-x86_64.efi
|
2018-08-27 14:08:25 +00:00
|
|
|
%{_datadir}/%{name}/snp-x86_64.efi
|
2016-10-05 12:00:24 +00:00
|
|
|
%endif
|
2023-02-07 03:55:41 +00:00
|
|
|
%{!?no_aarch64_cc:%{_datadir}/%{name}/snp-arm64.efi}
|
2016-10-05 12:00:24 +00:00
|
|
|
%{_datadir}/%{name}/undionly.kpxe
|
2019-10-25 16:15:52 +00:00
|
|
|
%license COPYING COPYING.GPLv2 COPYING.UBDL
|
2016-10-05 12:00:24 +00:00
|
|
|
|
|
|
|
|
%changelog
|