45 lines
1.8 KiB
Bash
45 lines
1.8 KiB
Bash
# Template file for 'syslinux'
|
|
pkgname=syslinux
|
|
version=6.03
|
|
revision=7
|
|
hostmakedepends="perl python nasm"
|
|
makedepends="gnu-efi-libs libuuid-devel"
|
|
short_desc="Boot loader for the Linux operating system"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project"
|
|
distfiles="${KERNEL_SITE}/utils/boot/${pkgname}/${pkgname}-${version}.tar.xz"
|
|
checksum=26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e
|
|
archs="i686* x86_64*"
|
|
nopie=yes
|
|
|
|
pre_build() {
|
|
# Do not try to build the Windows or DOS installers and DIAG files
|
|
vsed 's|diag libinstaller dos win32 win64 dosutil txt|libinstaller txt|g' -i Makefile
|
|
vsed 's|win32/syslinux.exe win64/syslinux64.exe||g' -i Makefile
|
|
vsed 's|dosutil/\*.com dosutil/\*.sys||g' -i Makefile
|
|
vsed 's|dos/syslinux.com||g' -i Makefile
|
|
vsed 's|INSTALLSUBDIRS = com32 utils dosutil|INSTALLSUBDIRS = com32 utils|g' -i Makefile
|
|
vsed 's|install -m 644 -c $(INSTALL_DIAG) $(INSTALLROOT)$(DIAGDIR)|# install -m 644 -c $(INSTALL_DIAG) $(INSTALLROOT)$(DIAGDIR)|g' -i Makefile
|
|
# Fix FHS manpage path
|
|
vsed 's|/usr/man|/usr/share/man|g' -i mk/syslinux.mk
|
|
vsed '/GCCOPT += $(call gcc_ok,-fPIC)/i GCCOPT += $(call gcc_ok,-fcommon)' -i mk/lib.mk
|
|
}
|
|
|
|
do_build() {
|
|
unset CFLAGS LDFLAGS
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) sed -e 's,^firmware =.*,firmware = bios efi32,g' -i Makefile;;
|
|
x86_64*) sed -e 's,^firmware =.*,firmware = bios efi64,g' -i Makefile;;
|
|
esac
|
|
make installer
|
|
}
|
|
|
|
do_install() {
|
|
make INSTALLROOT=${DESTDIR} install SBINDIR=/usr/bin AUXDIR=/usr/lib/syslinux
|
|
# Remove completely development stuff.
|
|
rm -r ${DESTDIR}/usr/lib/syslinux/com32/include
|
|
rm ${DESTDIR}/usr/lib/syslinux/com32/*.a
|
|
# Remove keytab-lilo to prevent conflict with LILO
|
|
rm ${DESTDIR}/usr/bin/keytab-lilo
|
|
}
|