Version: %{RPMVERSION}
Release: 1
License: GPL
-Group: Applications/System
+Group: System/Boot
Source0: ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{VERSION}.tar.gz
-ExclusiveArch: i386 x86_64
+ExclusiveArch: i386 i486 i586 i686 athlon pentium4 x86_64
Packager: H. Peter Anvin <hpa@zytor.com>
Buildroot: %{_tmppath}/%{name}-%{VERSION}-root
-BuildPrereq: nasm >= 0.98.38, perl
+BuildRequires: nasm >= 2.03, perl
Autoreq: 0
-%ifarch i386
-Requires: mtools, libc.so.6
-%endif
%ifarch x86_64
Requires: mtools, libc.so.6()(64bit)
+%define my_cc gcc
+%else
+Requires: mtools, libc.so.6
+%define my_cc gcc -m32
%endif
# NOTE: extlinux belongs in /sbin, not in /usr/sbin, since it is typically
sophisticated add-on modules. This package contains the libraries
necessary to compile such modules.
+%package extlinux
+Summary: The EXTLINUX bootloader, for booting the local system.
+Group: System/Boot
+Requires: syslinux
+
+%description extlinux
+The EXTLINUX bootloader, for booting the local system, as well as all
+the SYSLINUX/PXELINUX modules in /boot.
+
%package tftpboot
Summary: SYSLINUX modules in /tftpboot, available for network booting
Group: Applications/Internet
%setup -q -n syslinux-%{VERSION}
%build
-make clean
-make installer
-make -C sample tidy
+make CC='%{my_cc}' clean
+make CC='%{my_cc}' installer
+make CC='%{my_cc}' -C sample tidy
%install
rm -rf %{buildroot}
-mkdir -p %{buildroot}%{_bindir}
-mkdir -p %{buildroot}%{_sbindir}
-mkdir -p %{buildroot}%{_sharedir}/syslinux
-mkdir -p %{buildroot}%{_includedir}
-mkdir -p %{buildroot}/boot %{buildroot}/tftpboot/pxelinux.cfg
-make install-all \
+make CC='%{my_cc}' install-all \
INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} \
- LIBDIR=%{_sharedir} INCDIR=%{_includedir}
-make -C sample tidy
-cp mkdiskimage sys2ansi.pl keytab-lilo.pl %{buildroot}%{_sharedir}/syslinux
-cp %{buildroot}%{_sharedir}/syslinux/*.c32 %{buildroot}/boot
-cp %{buildroot}%{_sharedir}/syslinux/memdisk %{buildroot}/boot
-cp %{buildroot}%{_sharedir}/syslinux/*.c32 %{buildroot}/tftpboot
-cp %{buildroot}%{_sharedir}/syslinux/pxelinux.0 %{buildroot}/tftpboot
-cp %{buildroot}%{_sharedir}/syslinux/memdisk %{buildroot}/tftpboot
+ LIBDIR=%{_libdir} DATADIR=%{_datadir} \
+ MANDIR=%{_mandir} INCDIR=%{_includedir} \
+ TFTPBOOT=/tftpboot EXTLINUXDIR=/boot/extlinux
+make CC='%{my_cc}' -C sample tidy
+mkdir -p %{buildroot}/etc
+( cd %{buildroot}/etc && ln -s ../boot/extlinux/extlinux.conf . )
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
-%doc NEWS README* *.doc memdisk/*.doc COPYING
+%doc COPYING NEWS doc/*
%doc sample
-%{_bindir}/syslinux
-%{_sbindir}/extlinux
-%{_bindir}/ppmtolss16
-%{_bindir}/lss16toppm
-%{_bindir}/gethostip
-%{_sharedir}/syslinux/*.com
-%{_sharedir}/syslinux/*.exe
-%{_sharedir}/syslinux/*.c32
-%{_sharedir}/syslinux/*.bin
-%{_sharedir}/syslinux/*.0
-%{_sharedir}/syslinux/memdisk
-%{_sharedir}/syslinux/*.pl
-%{_sharedir}/syslinux/mkdiskimage
-/boot/*.c32
+%{_mandir}/man*/*
+%{_bindir}/*
+%{_datadir}/syslinux/*.com
+%{_datadir}/syslinux/*.exe
+%{_datadir}/syslinux/*.c32
+%{_datadir}/syslinux/*.bin
+%{_datadir}/syslinux/*.0
+%{_datadir}/syslinux/memdisk
+%{_datadir}/syslinux/dosutil/*
+%{_datadir}/syslinux/diag/*
%files devel
-%{_sharedir}/syslinux/com32
+%{_datadir}/syslinux/com32
+
+%files extlinux
+%{_sbindir}/extlinux
+/boot/extlinux
+%config /etc/extlinux.conf
%files tftpboot
/tftpboot
-%post
+%post extlinux
# If we have a /boot/extlinux.conf file, assume extlinux is our bootloader
# and update it.
-if [ -f /boot/extlinux.conf ]; then extlinux --update /boot; fi
+if [ -f /boot/extlinux/extlinux.conf ]; then \
+ extlinux --update /boot/extlinux ; \
+elif [ -f /boot/extlinux.conf ]; then \
+ mkdir -p /boot/extlinux && \
+ mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && \
+ extlinux --update /boot/extlinux ; \
+fi
%postun
%changelog
+* Fri Dec 18 2009 H. Peter Anvin <hpa@zytor.com>
+- Require NASM 2.03
+- Package dosutil
+
+* Thu May 29 2008 H. Peter Anvin <hpa@zytor.com>
+- Use install targets; clean up various paths.
+
+* Thu Jan 10 2008 H. Peter Anvin <hpa@zytor.com>
+- Add man pages.
+
+* Mon Nov 19 2007 Bernard Li <bernard@vanhpc.org>
+- Added netpbm-progs (provides pngtopnm) to BuildPrereq (this should be
+ changed to BuildRequires since it is deprecated...)
+
+* Thu Mar 15 2007 H. Peter Anvin <hpa@zytor.com>
+- Move extlinux /boot stuff into /boot/extlinux.
+
+* Thu Jan 25 2007 H. Peter Anvin <hpa@zytor.com>
+- Hacks to make the 32-bit version build correctly on 64-bit machines.
+
* Mon Sep 19 2006 H. Peter Anvin <hpa@zytor.com>
- Add a syslinux-tftpboot module.
+- Factor extlinux into its own package.
+- Move to %{_datadir} (/usr/share).
* Wed Sep 21 2005 H. Peter Anvin <hpa@zytor.com>
- If /boot/extlinux.conf exist, run extlinux --update.