Factor out extlinux as a separate package, avoid /boot/memdisk error
[profile/ivi/syslinux.git] / syslinux.spec.in
1 # -*- rpm -*-
2 %define RPMVERSION @@RPMVERSION@@
3 %define VERSION    @@VERSION@@
4 Summary: Kernel loader which uses a FAT, ext2/3 or iso9660 filesystem or a PXE network
5 Name: syslinux
6 Version: %{RPMVERSION}
7 Release: 1
8 License: GPL
9 Group: System/Boot
10 Source0: ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{VERSION}.tar.gz
11 ExclusiveArch: i386 x86_64
12 Packager: H. Peter Anvin <hpa@zytor.com>
13 Buildroot: %{_tmppath}/%{name}-%{VERSION}-root
14 BuildPrereq: nasm >= 0.98.38, perl
15 Autoreq: 0
16 %ifarch i386
17 Requires: mtools, libc.so.6
18 %endif
19 %ifarch x86_64
20 Requires: mtools, libc.so.6()(64bit)
21 %endif
22
23 # NOTE: extlinux belongs in /sbin, not in /usr/sbin, since it is typically
24 # a system bootloader, and may be necessary for system recovery.
25 %define _sbindir /sbin
26
27 %package devel
28 Summary: Development environment for SYSLINUX add-on modules
29 Group: Development/Libraries
30 Requires: syslinux
31
32 %description
33 SYSLINUX is a suite of bootloaders, currently supporting DOS FAT
34 filesystems, Linux ext2/ext3 filesystems (EXTLINUX), PXE network boots
35 (PXELINUX), or ISO 9660 CD-ROMs (ISOLINUX).  It also includes a tool,
36 MEMDISK, which loads legacy operating systems from these media.
37
38 %description devel
39 The SYSLINUX boot loader contains an API, called COM32, for writing
40 sophisticated add-on modules.  This package contains the libraries
41 necessary to compile such modules.
42
43 %package extlinux
44 Summary: The EXTLINUX bootloader, for booting the local system.
45 Group: System/Boot
46 Requires: syslinux
47
48 %description extlinux
49 The EXTLINUX bootloader, for booting the local system, as well as all
50 the SYSLINUX/PXELINUX modules in /boot.
51
52 %package tftpboot
53 Summary: SYSLINUX modules in /tftpboot, available for network booting
54 Group: Applications/Internet
55 Requires: syslinux
56
57 %description tftpboot
58 All the SYSLINUX/PXELINUX modules directly available for network
59 booting in the /tftpboot directory.
60
61 %prep
62 %setup -q -n syslinux-%{VERSION}
63
64 %build
65 make clean
66 make installer
67 make -C sample tidy
68
69 %install
70 rm -rf %{buildroot}
71 mkdir -p %{buildroot}%{_bindir}
72 mkdir -p %{buildroot}%{_sbindir}
73 mkdir -p %{buildroot}%{_datadir}/syslinux
74 mkdir -p %{buildroot}%{_includedir}
75 mkdir -p %{buildroot}/boot %{buildroot}/tftpboot/pxelinux.cfg
76 make install-all \
77         INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} \
78         LIBDIR=%{_datadir} INCDIR=%{_includedir}
79 make -C sample tidy
80 cp mkdiskimage sys2ansi.pl keytab-lilo.pl %{buildroot}%{_datadir}/syslinux
81 cp %{buildroot}%{_datadir}/syslinux/*.c32       %{buildroot}/boot
82 cp %{buildroot}%{_datadir}/syslinux/memdisk     %{buildroot}/boot
83 cp %{buildroot}%{_datadir}/syslinux/*.c32       %{buildroot}/tftpboot
84 cp %{buildroot}%{_datadir}/syslinux/pxelinux.0 %{buildroot}/tftpboot
85 cp %{buildroot}%{_datadir}/syslinux/memdisk     %{buildroot}/tftpboot
86
87 %clean
88 rm -rf %{buildroot}
89
90 %files
91 %defattr(-,root,root)
92 %doc NEWS README* *.doc memdisk/*.doc COPYING
93 %doc sample
94 %{_bindir}/syslinux
95 %{_bindir}/ppmtolss16
96 %{_bindir}/lss16toppm
97 %{_bindir}/gethostip
98 %{_datadir}/syslinux/*.com
99 %{_datadir}/syslinux/*.exe
100 %{_datadir}/syslinux/*.c32
101 %{_datadir}/syslinux/*.bin
102 %{_datadir}/syslinux/*.0
103 %{_datadir}/syslinux/memdisk
104 %{_datadir}/syslinux/*.pl
105 %{_datadir}/syslinux/mkdiskimage
106
107 %files devel
108 %{_datadir}/syslinux/com32
109
110 %files extlinux
111 %{_sbindir}/extlinux
112 /boot
113
114 %files tftpboot
115 /tftpboot
116
117 %post extlinux
118 # If we have a /boot/extlinux.conf file, assume extlinux is our bootloader
119 # and update it.
120 if [ -f /boot/extlinux.conf ]; then extlinux --update /boot; fi
121
122 %postun
123
124 %changelog
125 * Mon Sep 19 2006 H. Peter Anvin <hpa@zytor.com>
126 - Add a syslinux-tftpboot module.
127 - Factor extlinux into its own package.
128 - Move to %{_datadir} (/usr/share).
129
130 * Wed Sep 21 2005 H. Peter Anvin <hpa@zytor.com>
131 - If /boot/extlinux.conf exist, run extlinux --update.
132
133 * Fri Sep  9 2005 H. Peter Anvin <hpa@zytor.com>
134 - Copy, don't link, *.c32 into /boot; rpm doesn't like breaking links.
135
136 * Tue Aug 23 2005 H. Peter Anvin <hpa@zytor.com>
137 - Put *.c32 into /boot.
138
139 * Thu Dec 30 2004 H. Peter Anvin <hpa@zytor.com>
140 - libsyslinux dropped in syslinux 3.00.
141 - Additional documentation.
142 - Add extlinux.
143
144 * Tue Dec 14 2004 H. Peter Anvin <hpa@zytor.com>
145 - Add a devel package for the com32 library added in 2.12.
146
147 * Wed Apr 16 2003 H. Peter Anvin <hpa@zytor.com> 2.04-1
148 - 2.04 release
149 - Add support for libsyslinux.so*
150 - Templatize for inclusion in CVS tree
151
152 * Thu Apr 10 2003 H. Peter Anvin <hpa@zytor.com>
153 - 2.03 release
154 - Add support for libsyslinux.a
155 - Add keytab-lilo.pl to the /usr/lib/syslinux directory
156 - Modernize syntax
157 - Support building on x86-64
158
159 * Thu Feb 13 2003 H. Peter Anvin <hpa@zytor.com>
160 - 2.02 release; no longer setuid
161
162 * Thu Jan 30 2003 H. Peter Anvin <hpa@zytor.com>
163 - Prepare for 2.01 release; make /usr/bin/syslinux setuid root
164
165 * Fri Oct 25 2002 H. Peter Anvin <hpa@zytor.com>
166 - Upgrade to 2.00.
167
168 * Tue Aug 27 2002 H. Peter Anvin <hpa@zytor.com>
169 - Upgrade to 1.76.
170
171 * Fri Jun 14 2002 H. Peter Anvin <hpa@zytor.com>
172 - Upgrade to 1.75.
173
174 * Sat Jun  1 2002 H. Peter Anvin <hpa@zytor.com>
175 - Upgrade to 1.74.
176
177 * Sun May 26 2002 H. Peter Anvin <hpa@zytor.com>
178 - Upgrade to 1.73.
179
180 * Tue Apr 23 2002 H. Peter Anvin <hpa@zytor.com>
181 - Upgrade to 1.72.
182
183 * Wed Apr 17 2002 H. Peter Anvin <hpa@zytor.com>
184 - Upgrade to 1.71.
185 - Update the title.
186
187 * Wed Apr 17 2002 H. Peter Anvin <hpa@zytor.com>
188 - Upgrade to 1.70.
189
190 * Sat Feb  3 2002 H. Peter Anvin <hpa@zytor.com>
191 - Upgrade to 1.67.
192
193 * Tue Jan  1 2002 H. Peter Anvin <hpa@zytor.com>
194 - Upgrade to 1.66.
195
196 * Sat Dec 15 2001 H. Peter Anvin <hpa@zytor.com>
197 - Upgrade to 1.65; make appropriate changes.
198
199 * Sat Aug 24 2001 H. Peter Anvin <hpa@zytor.com>
200 - Upgrade to 1.64.
201
202 * Mon Aug  6 2001 H. Peter Anvin <hpa@zytor.com>
203 - Upgrade to 1.63.
204 - Use make install since the stock SYSLINUX distribution now supports
205   INSTALLROOT.
206
207 * Sat Apr 24 2001 H. Peter Anvin <hpa@zytor.com>
208 - Upgrade to 1.62.
209
210 * Sat Apr 14 2001 H. Peter Anvin <hpa@zytor.com>
211 - Fix missing %files; correct modes.
212
213 * Fri Apr 13 2001 H. Peter Anvin <hpa@zytor.com>
214 - Upgrade to 1.61
215 - Install auxilliary programs in /usr/lib/syslinux
216
217 * Sat Feb 10 2001 Matt Wilson <msw@redhat.com>
218 - 1.52
219
220 * Wed Jan 24 2001 Matt Wilson <msw@redhat.com>
221 - 1.51pre7
222
223 * Mon Jan 22 2001 Matt Wilson <msw@redhat.com>
224 - 1.51pre5
225
226 * Fri Jan 19 2001 Matt Wilson <msw@redhat.com>
227 - 1.51pre3, with e820 detection
228
229 * Tue Dec 12 2000 Than Ngo <than@redhat.com>
230 - rebuilt with fixed fileutils
231
232 * Thu Nov 9 2000 Than Ngo <than@redhat.com>
233 - update to 1.49
234 - update ftp site
235 - clean up specfile
236 - add some useful documents
237
238 * Tue Jul 18 2000 Nalin Dahyabhai <nalin@redhat.com>
239 - add %%defattr (release 4)
240
241 * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
242 - automatic rebuild
243
244 * Thu Jul 06 2000 Trond Eivind Glomsrød <teg@redhat.com>
245 - use %%{_tmppath}
246 - change application group (Applications/Internet doesn't seem
247   right to me)
248 - added BuildRequires
249
250 * Tue Apr 04 2000 Erik Troan <ewt@redhat.com>
251 - initial packaging