]> git.pld-linux.org Git - SPECS.git/blob - gpxe.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / gpxe.spec
1 Summary:        A network boot loader
2 Name:           gpxe
3 Version:        1.0.1
4 Release:        4
5 License:        GPL v2 and BSD
6 Group:          Base
7 URL:            http://www.etherboot.org/
8 Source0:        http://etherboot.org/rel/gpxe/%{name}-%{version}.tar.bz2
9 # Source0-md5:  38ae67a440abd2aea139495022ee4912
10 # extracted from echos of src/Makefile
11 Source1:        USAGE
12 Patch1:         virtionet-length.patch
13 BuildRequires:  mkisofs
14 BuildRequires:  mtools
15 BuildRequires:  perl-base
16 BuildRequires:  syslinux
17 BuildArch:      noarch
18 #ExclusiveArch:%{ix86} %{x8664}
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define formats rom
22
23 # ne is only for backwards compat with older versions of qemu
24 %define qemuroms rtl8029 ne 8086100e pcnet32 rtl8139 virtio-net
25
26 %description
27 gPXE is an open source network bootloader. It provides a direct
28 replacement for proprietary PXE ROMs, with many extra features such as
29 DNS, HTTP, iSCSI, etc.
30
31 %package bootimgs
32 Summary:        Network boot loader images in bootable USB, CD, floppy and GRUB formats
33 Group:          Development/Tools
34
35 %package roms
36 Summary:        Network boot loader roms in .rom format
37 Group:          Development/Tools
38 Requires:       %{name}-roms-qemu = %{version}-%{release}
39
40 %description roms
41 gPXE is an open source network bootloader. It provides a direct
42 replacement for proprietary PXE ROMs, with many extra features such as
43 DNS, HTTP, iSCSI, etc.
44
45 This package contains the gPXE roms in .rom format.
46
47 %package roms-qemu
48 Summary:        Network boot loader roms supported by QEMU, .rom format
49 Group:          Development/Tools
50
51 %description bootimgs
52 gPXE is an open source network bootloader. It provides a direct
53 replacement for proprietary PXE ROMs, with many extra features such as
54 DNS, HTTP, iSCSI, etc.
55
56 This package contains the gPXE boot images in USB, CD, floppy, and PXE
57 UNDI formats.
58
59 %description roms-qemu
60 gPXE is an open source network bootloader. It provides a direct
61 replacement for proprietary PXE ROMs, with many extra features such as
62 DNS, HTTP, iSCSI, etc.
63
64 This package contains the gPXE ROMs for devices emulated by QEMU, in
65 .rom format.
66
67 %prep
68 %setup -q
69 %patch1 -p1
70 cp -p %{SOURCE1} .
71
72 %build
73 ISOLINUX_BIN=%{_datadir}/syslinux/isolinux.bin
74 cd src
75 # NO_WERROR is needed because of bogus (for us) error: variable '__table_entries' set but not used [-Werror=unused-but-set-variable]
76 %{__make} ISOLINUX_BIN=$ISOLINUX_BIN NO_WERROR=1
77 %{__make} bin/gpxe.lkrn
78 %{__make} allroms
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
83
84 cd src/bin
85 cp -p undionly.kpxe gpxe.{iso,usb,dsk,lkrn} $RPM_BUILD_ROOT%{_datadir}/%{name}
86 for fmt in %{formats}; do
87         for img in *.${fmt}; do
88                 if [ -e $img ]; then
89                         cp -p $img $RPM_BUILD_ROOT%{_datadir}/%{name}
90                         echo %{_datadir}/%{name}/$img >> ../../${fmt}.list
91                 fi
92         done
93 done
94 cd -
95
96 # the roms supported by qemu will be packaged separatedly
97 # remove from the main rom list and add them to qemu.list
98 for fmt in rom; do
99         for rom in %{qemuroms}; do
100                 sed -i -e "/\/$rom.$fmt/d" $fmt.list
101                 echo %{_datadir}/%{name}/$rom.$fmt >> qemu.$fmt.list
102         done
103 done
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %files bootimgs
109 %defattr(644,root,root,755)
110 %doc COPYING COPYRIGHTS USAGE
111 %dir %{_datadir}/%{name}
112 %{_datadir}/%{name}/gpxe.iso
113 %{_datadir}/%{name}/gpxe.usb
114 %{_datadir}/%{name}/gpxe.dsk
115 %{_datadir}/%{name}/gpxe.lkrn
116 %{_datadir}/%{name}/undionly.kpxe
117
118 %files roms -f rom.list
119 %defattr(644,root,root,755)
120 %dir %{_datadir}/%{name}
121
122 %files roms-qemu -f qemu.rom.list
123 %defattr(644,root,root,755)
124 %dir %{_datadir}/%{name}
This page took 0.383409 seconds and 3 git commands to generate.