File syslinux.spec of Package syslinux

%define realname syslinux
%define realver  6.04
%define extraver -pre3
%define srcext   tar.xz

# turn off the generation of debuginfo rpm  (RH9) ??
%global debug_package %{nil}

# Common info
Name:          %{realname}
Version:       %{realver}%{?extraver:%(sed 's/^-/~/' <<< %{extraver})}
Release:       1%{?dist}
License:       GPL-2.0+
Group:         System/Boot
URL:           http://www.syslinux.org/
Summary:       A suite of bootloaders for Linux

# Install-time parameters
Requires:      perl%{?suse_version:-base}
Requires:      mtools

# Build-time parameters
BuildRequires: xz nasm >= 2.03
BuildRequires: libuuid-devel
BuildRoot:     %{_tmppath}/%{name}-root
Source:        https://www.zytor.com/pub/syslinux/%{?extraver:Testing/%{realver}/}%{realname}-%{realver}%{?extraver}.%{srcext}

%description
The Syslinux Project covers lightweight bootloaders for MS-DOS FAT filesystems
(SYSLINUX), network booting (PXELINUX), bootable "El Torito" CD-ROMs (ISOLINUX),
and Linux ext2/ext3/ext4 or btrfs filesystems (EXTLINUX). The project also
includes MEMDISK, a tool to boot legacy operating systems (such as DOS) from
nontraditional media; it is usually used in conjunction with PXELINUX
and ISOLINUX.

# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}
%{__sed} -ri '/^\($/,/^\)$/ d' efi/build-gnu-efi.sh

%build
%{__make} %{?_smp_mflags} installer \
 OPTFLAGS="%{optflags}"

%install
%{__make} install INSTALLROOT=%{buildroot} \
 MANDIR=%{_mandir}

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING NEWS README doc/*.txt
/sbin/extlinux
%{_bindir}/*
%{_datadir}/%{name}/
%doc %{_mandir}/man1/*
%exclude %{_datadir}/%{name}/com32/*

%changelog