summaryrefslogtreecommitdiff
path: root/libre/syslinux
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-10-17 13:27:22 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-10-17 13:27:22 -0200
commitabd1418249a862d6f35c3c57f045264e36a419e0 (patch)
tree420f3adc814f99590030a0efb67f86d3fca64a8b /libre/syslinux
parenta098c771b2caa364ae95b65818c93726751e8f16 (diff)
syslinux-6.03-2.parabola1: redo/simplify PKGBUILD
Diffstat (limited to 'libre/syslinux')
-rw-r--r--libre/syslinux/PKGBUILD307
-rw-r--r--libre/syslinux/syslinux-install_update4
-rw-r--r--libre/syslinux/syslinux.cfg2
-rw-r--r--libre/syslinux/syslinux.install43
4 files changed, 76 insertions, 280 deletions
diff --git a/libre/syslinux/PKGBUILD b/libre/syslinux/PKGBUILD
index 244013bd5..1ded94131 100644
--- a/libre/syslinux/PKGBUILD
+++ b/libre/syslinux/PKGBUILD
@@ -1,31 +1,30 @@
# Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Maintainer (Arch): Thomas Bächler <thomas@archlinux.org>
+# Maintainer (Arch): Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor (Arch): Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
# Maintainer: André Silva <emulatorman@parabola.nu>
-## "1" to enable IA32-EFI build in Arch x86_64, "0" to disable
-_IA32_EFI_IN_ARCH_X64="1"
-
-_VER="6.03"
-_GIT_TAG="syslinux-${_VER}"
-
-pkgname="syslinux"
-pkgver="${_VER/-/}"
-pkgrel="1.parabola1"
-arch=('x86_64' 'i686')
-pkgdesc="Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE (Parabola rebranded)"
-url="http://syslinux.zytor.com/"
-license=('GPL2')
-options=('!makeflags' '!emptydirs')
+pkgname=syslinux
+pkgver=6.03
+_tag=syslinux-$pkgver
+pkgrel=2.parabola1
+pkgdesc='Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE (Parabola rebranded)'
+url='http://www.syslinux.org/'
+arch=(i686 x86_64)
+backup=(boot/syslinux/syslinux.cfg
+ boot/syslinux/splash.png)
+install=syslinux.install
+license=(GPL2)
+# syslinux build system is a mess of submakes that does not work with -jN
+# efi32/com32 do not like Parabola cflags/ldflags, though it would be nice to have the flags for userspace tools
+options=(!makeflags !buildflags)
replaces=(${pkgname}-parabola)
conflicts=(${pkgname}-parabola)
-backup=('boot/syslinux/syslinux.cfg'
- 'boot/syslinux/splash.png')
-makedepends=('git' 'python2' 'nasm' 'ncurses')
-if [[ "$CARCH" == "x86_64" ]]; then
- makedepends+=('lib32-glibc')
+makedepends=(git python2 nasm upx asciidoc)
+if [[ "$CARCH" == x86_64 ]]; then
+ # efi32 needs it
+ makedepends+=(lib32-glibc)
fi
-depends=('glibc')
optdepends=('perl-passwd-md5: For md5pass'
'perl-digest-sha1: For sha1pass'
'mtools: For mkdiskimage and syslinux support'
@@ -33,246 +32,56 @@ optdepends=('perl-passwd-md5: For md5pass'
'util-linux: For isohybrid'
'efibootmgr: For EFI support'
'dosfstools: For EFI support')
-install="${pkgname}.install"
-source=("${pkgname}::git+http://git.zytor.com/syslinux/syslinux.git#tag=${_GIT_TAG}"
- "gnu-efi::git+http://git.code.sf.net/p/gnu-efi/code#commit=3c62e78556aea01e9798380cd46794c6ca09d4bd"
- 'syslinux.cfg'
- 'syslinux-install_update'
- 'splash.png')
-md5sums=('SKIP'
- 'SKIP'
- 'f048880b57e2c5a7017ff8804bfda327'
- '9376f18fa3e42fc36cffa4cff0a84c09'
- 'cb46ca47c6b6323127d908440057d98f')
-_pkgver() {
- cd "${srcdir}/${pkgname}/"
- echo "$(git describe --tags)" | sed -e 's|syslinux-||g' -e 's|-pre|pre|g' -e 's|-|.|g'
-}
+# The syslinux-install_update script is maintained at https://gist.github.com/pyther/772138
+# Script not yet updated for syslinux-efi
+source=(git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git#tag=$_tag
+ syslinux.cfg
+ syslinux-install_update
+ splash.png)
+sha1sums=('SKIP'
+ '681e2acf8e636a4edf4eb1056a646e0cc89bbdf7'
+ 'd22e7e3fc544cf8a49f27ae9a25f17e65f575ea1'
+ 'b24bb6ceec46d137ff7ddacf2a4d7cb4bb486cac')
+
+_targets='bios efi32'
+case "$CARCH" in
+ x86_64) _targets+=' efi64' ;;
+esac
prepare() {
-
- mv "${srcdir}/${pkgname}" "${srcdir}/${pkgname}-${pkgver}/"
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
- msg "Run git clean"
- git clean -x -d -f
-
- msg "Do not try to build the Windows or DOS installers and DIAG files"
- sed 's|diag libinstaller dos win32 win64 dosutil txt|libinstaller txt|g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true
- sed 's|win32/syslinux.exe win64/syslinux64.exe||g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true
- sed 's|dosutil/*.com dosutil/*.sys||g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true
- sed 's|dos/syslinux.com||g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true
- sed 's|INSTALLSUBDIRS = com32 utils dosutil|INSTALLSUBDIRS = com32 utils|g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true
- sed 's|install -m 644 -c $(INSTALL_DIAG) $(INSTALLROOT)$(DIAGDIR)|# install -m 644 -c $(INSTALL_DIAG) $(INSTALLROOT)$(DIAGDIR)|g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true
- sed 's|-include $(MAKEDIR)/devel.mk||g' -i "${srcdir}/${pkgname}-${pkgver}/mk/syslinux.mk" || true
-
- msg "Fix FHS manpage path"
- sed 's|/usr/man|/usr/share/man|g' -i "${srcdir}/${pkgname}-${pkgver}/mk/syslinux.mk" || true
-
- cd "${srcdir}/gnu-efi/"
-
- msg "Run git clean for gnu-efi"
- git clean -x -d -f
-
- msg "Revert gnu-efi Makefile 'make install' problamatic commit"
- git revert --no-commit 06744d69273de4945cf0ffcaa4a6abf7cec707b6
-
- msg "Prepare gnu-efi source"
- cp -r "${srcdir}/gnu-efi/gnu-efi-3.0" "${srcdir}/${pkgname}-${pkgver}/gnu-efi/gnu-efi-3.0"
-
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
-}
+ cd syslinux
-_build_syslinux_bios() {
-
- rm -rf "${srcdir}/${pkgname}-${pkgver}-bios/" || true
- cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-bios"
-
- mkdir -p "${srcdir}/${pkgname}-${pkgver}-bios/OBJDIR"
- cd "${srcdir}/${pkgname}-${pkgver}-bios/"
-
- msg "Do not try to compile bios build with our default LDFLAGS, it will fail"
- unset LDFLAGS
-
- msg "Run make bios"
- make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-bios/OBJDIR" bios
-
- msg "Run make bios installer"
- make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-bios/OBJDIR" bios installer
-
-}
+ # do not swallow efi compilation output to make debugging easier
+ sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
-_build_syslinux_efi64() {
-
- rm -rf "${srcdir}/${pkgname}-${pkgver}-efi64/" || true
- cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-efi64"
-
- mkdir -p "${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR/efi64/"
- cd "${srcdir}/${pkgname}-${pkgver}-efi64/gnu-efi/gnu-efi-3.0/"
-
- msg "Unset all compiler FLAGS for gnu-efi efi64 build"
- unset CFLAGS
- unset CPPFLAGS
- unset CXXFLAGS
- unset LDFLAGS
- unset MAKEFLAGS
-
- msg "Run make gnu-efi for syslinux efi64"
- make ARCH="x86_64" -j1
-
- msg "Run make install gnu-efi for syslinux efi64"
- make ARCH="x86_64" PREFIX="${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR/efi64/" -j1 install
-
- cd "${srcdir}/${pkgname}-${pkgver}-efi64/"
-
- msg "Unset all compiler FLAGS for efi64 build"
- unset CFLAGS
- unset CPPFLAGS
- unset CXXFLAGS
- unset LDFLAGS
- unset MAKEFLAGS
-
- msg "Run make efi64"
- make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR" efi64
-
- msg "Run make efi64 installer"
- make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR" efi64 installer
-
-}
-
-_build_syslinux_efi32() {
-
- rm -rf "${srcdir}/${pkgname}-${pkgver}-efi32/" || true
- cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-efi32"
-
- mkdir -p "${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR/efi32/"
- cd "${srcdir}/${pkgname}-${pkgver}-efi32/gnu-efi/gnu-efi-3.0/"
-
- msg "Unset all compiler FLAGS for gnu-efi efi32 build"
- unset CFLAGS
- unset CPPFLAGS
- unset CXXFLAGS
- unset LDFLAGS
- unset MAKEFLAGS
-
- msg "Run make gnu-efi for syslinux efi32"
- make ARCH="ia32" -j1
-
- msg "Run make install gnu-efi for syslinux efi32"
- make ARCH="ia32" PREFIX="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR/efi32/" install
-
- cd "${srcdir}/${pkgname}-${pkgver}-efi32/"
-
- msg "Unset all compiler FLAGS for efi32 build"
- unset CFLAGS
- unset CPPFLAGS
- unset CXXFLAGS
- unset LDFLAGS
- unset MAKEFLAGS
-
- msg "Run make efi32"
- make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR" efi32
-
- msg "Run make efi32 installer"
- make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR" efi32 installer
-
+ # disable debug and development flags to reduce bootloader size
+ truncate --size 0 mk/devel.mk
}
build() {
-
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
- if [[ "${CARCH}" == "x86_64" ]]; then
- msg "Build syslinux efi64"
- _build_syslinux_efi64
-
- if [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then
- msg "Build syslinux efi32"
- _build_syslinux_efi32
- fi
- fi
-
- if [[ "${CARCH}" == "i686" ]]; then
- msg "Build syslinux efi32"
- _build_syslinux_efi32
- fi
-
- msg "Build syslinux bios"
- _build_syslinux_bios
-
-}
-
-_package_syslinux_bios() {
-
- cd "${srcdir}/${pkgname}-${pkgver}-bios/"
-
- msg "Install Syslinux bios"
- make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/bios/" OBJDIR="${srcdir}/${pkgname}-${pkgver}-bios/OBJDIR" bios install
-
- msg "Remove syslinux.exe,syslinux64.exe,syslinux.com and dosutil dir"
- rm "${pkgdir}/usr/lib/syslinux/bios"/syslinux.{com,exe} || true
- rm "${pkgdir}/usr/lib/syslinux/bios/syslinux64.exe" || true
- rm -rf "${pkgdir}/usr/lib/syslinux/bios/dosutil/" || true
-
- msg "Remove com32 and diag dirs"
- rm -rf "${pkgdir}/usr/lib/syslinux/bios/diag/" || true
- rm -rf "${pkgdir}/usr/lib/syslinux/bios/com32/" || true
-
- msg "Move extlinux binary to /usr/bin"
- install -d "${pkgdir}/usr/bin"
- mv "${pkgdir}/sbin/extlinux" "${pkgdir}/usr/bin/extlinux"
- rm -rf "${pkgdir}/sbin/"
-
- msg "Install syslinux docs"
- install -d "${pkgdir}/usr/share/doc"
- cp -ar "${srcdir}/${pkgname}-${pkgver}/doc" "${pkgdir}/usr/share/doc/syslinux"
-
- msg "Install syslinux.cfg"
- install -D -m0644 "${srcdir}/syslinux.cfg" "${pkgdir}/boot/syslinux/syslinux.cfg"
-
- msg "Install the syslinux-install_update script"
- ## This script is maintained at https://gist.github.com/pyther/772138
- ## Script not yet updated for syslinux-efi
- install -D -m0755 "${srcdir}/syslinux-install_update" "${pkgdir}/usr/bin/syslinux-install_update"
-
- msg "Install Parabola splash"
- install -D -m644 "${srcdir}/splash.png" "${pkgdir}/boot/syslinux/splash.png"
+ cd syslinux
+ make PYTHON=python2 $_targets
}
-_package_syslinux_efi() {
-
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
- if [[ "${CARCH}" == "x86_64" ]]; then
- cd "${srcdir}/${pkgname}-${pkgver}-efi64/"
- msg "Install Syslinux efi64"
- make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR" efi64 install
-
- if [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then
- cd "${srcdir}/${pkgname}-${pkgver}-efi32/"
- msg "Install Syslinux efi32"
- make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR" efi32 install
- fi
- fi
-
- if [[ "${CARCH}" == "i686" ]]; then
- cd "${srcdir}/${pkgname}-${pkgver}-efi32/"
- msg "Install Syslinux efi32"
- make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR" efi32 install
- fi
-
+check() {
+ cd syslinux
+ make unittest
}
package() {
-
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
- msg "Package Syslinux efi"
- _package_syslinux_efi
-
- msg "Package Syslinux bios"
- _package_syslinux_bios
-
+ cd syslinux
+ make $_targets install INSTALLROOT="$pkgdir" SBINDIR=/usr/bin MANDIR=/usr/share/man AUXDIR=/usr/lib/syslinux
+
+ rm -r "$pkgdir"/usr/lib/syslinux/{com32,dosutil,syslinux.com}
+ install -D -m644 COPYING "$pkgdir"/usr/share/licenses/syslinux/COPYING
+ install -d "$pkgdir"/usr/share/doc
+ cp -ar doc "$pkgdir"/usr/share/doc/syslinux
+
+ install -d "$pkgdir"/usr/lib/syslinux/bios
+ mv "$pkgdir"/usr/lib/syslinux/{*.bin,*.c32,*.0,memdisk} "$pkgdir"/usr/lib/syslinux/bios
+
+ install -D -m0644 ../syslinux.cfg "$pkgdir"/boot/syslinux/syslinux.cfg
+ install -D -m0755 ../syslinux-install_update "$pkgdir"/usr/bin/syslinux-install_update
+ install -D -m0644 ../splash.png "$pkgdir"/boot/syslinux/splash.png
}
diff --git a/libre/syslinux/syslinux-install_update b/libre/syslinux/syslinux-install_update
index 3843b5fed..513d06b7a 100644
--- a/libre/syslinux/syslinux-install_update
+++ b/libre/syslinux/syslinux-install_update
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/bash
#
# Syslinux Installer / Updater Script (for BIOS only)
# Copyright (C) 2011-2013 Matthew Gyurgyik <pyther@pyther.net>
@@ -449,5 +449,3 @@ if [[ $SET_ACTIVE ]] || [[ $MBR ]]; then
fi
exit 0
-
-# vim: set et sw=4:
diff --git a/libre/syslinux/syslinux.cfg b/libre/syslinux/syslinux.cfg
index 0c0c6339a..c5d8e011e 100644
--- a/libre/syslinux/syslinux.cfg
+++ b/libre/syslinux/syslinux.cfg
@@ -15,7 +15,7 @@
# If you do not use a menu, a 'boot:' prompt will be shown and the system
# will boot automatically after 5 seconds.
#
-# Please review the wiki: https://wiki.archlinux.org/index.php/Syslinux
+# Please review the wiki: https://wiki.parabola.nu/index.php/Syslinux
# The wiki provides further configuration examples
DEFAULT parabola
diff --git a/libre/syslinux/syslinux.install b/libre/syslinux/syslinux.install
index ed8387773..9125b6ef7 100644
--- a/libre/syslinux/syslinux.install
+++ b/libre/syslinux/syslinux.install
@@ -1,43 +1,32 @@
-post_install() {
-
+show_efi_msg() {
cat << EOF
-==> For setting up Syslinux BIOS using the syslinux-install_update script follow
- https://wiki.parabolagnulinux.org/index.php/Syslinux#Automatic_Install
-EOF
-
- ## Message specific to Syslinux 4.xx (or 5.xx) to 6.xx upgrade
- if [ "$(vercmp $2 6.00)" -lt 0 ]; then
-
- cat << EOF
+==> For setting up Syslinux EFI follow
+ https://wiki.parabola.nu/index.php/Syslinux#UEFI_Systems
-==> If you are upgrading from Syslinux 4.xx or 5.xx, please re-install
- (not update) Syslinux BIOS manually (not using the install script) once
- by following https://wiki.parabolagnulinux.org/index.php/Syslinux#Manual_install
+==> The syslinux-install_update script does not currently support EFI install
-==> The install script may not properly upgrade Syslinux to 6.xx version
EOF
-
- fi
-
+}
+
+show_bios_autoupdate_msg() {
cat << EOF
-==> For setting up Syslinux EFI follow
- https://wiki.parabolagnulinux.org/index.php/Syslinux#UEFI_Systems
+==> For setting up Syslinux BIOS using the syslinux-install_update script follow
+ https://wiki.parabola.nu/index.php/Syslinux#Automatic_Install
+EOF
+}
-==> The syslinux-install_update script does not currently support EFI install
+post_install() {
+ [ -f /boot/syslinux/SYSLINUX_AUTOUPDATE ] || show_bios_autoupdate_msg
+ [ -d /sys/firmware/efi ] && show_efi_msg
-EOF
-
+ true
}
post_upgrade() {
-
## auto-update syslinux if /boot/syslinux/SYSLINUX_AUTOUPDATE exists
/usr/bin/syslinux-install_update -s
-
+
post_install
-
}
-
-# vim:set ts=2 sw=2 et: