summaryrefslogtreecommitdiffstats
path: root/abs/extra/syslinux/PKGBUILD
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-12-19 21:53:50 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-12-19 21:53:50 (GMT)
commit6e4bbdf7f4ad836833b294b6842db8f465356089 (patch)
tree81ef5c49a098f6dd87131939b17943d437d8b8c6 /abs/extra/syslinux/PKGBUILD
parent8792c353b518f758fbbf7d56fdec95b842b32490 (diff)
downloadlinhes_pkgbuild-6e4bbdf7f4ad836833b294b6842db8f465356089.zip
linhes_pkgbuild-6e4bbdf7f4ad836833b294b6842db8f465356089.tar.gz
linhes_pkgbuild-6e4bbdf7f4ad836833b294b6842db8f465356089.tar.bz2
syslinux: update to 6.03
Diffstat (limited to 'abs/extra/syslinux/PKGBUILD')
-rw-r--r--abs/extra/syslinux/PKGBUILD231
1 files changed, 59 insertions, 172 deletions
diff --git a/abs/extra/syslinux/PKGBUILD b/abs/extra/syslinux/PKGBUILD
index e68cc11..4b81011 100644
--- a/abs/extra/syslinux/PKGBUILD
+++ b/abs/extra/syslinux/PKGBUILD
@@ -1,18 +1,26 @@
-# Maintainer : Tobias Powalowski <tpowa@archlinux.org>
-# Maintainer : Thomas Bächler <thomas@archlinux.org>
-# Contributor: Keshav Padram Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
+# Contributor: Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
-pkgname="syslinux"
-pkgver="6.02"
-pkgrel="8"
-arch=('x86_64' 'i686')
-pkgdesc="Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE"
-url="http://syslinux.zytor.com/"
-license=('GPL2')
-options=('!makeflags' '!emptydirs')
-backup=('boot/syslinux/syslinux.cfg')
-makedepends=('python2' 'nasm' 'gnu-efi-libs')
-depends=('perl' 'glibc')
+pkgname=syslinux
+pkgver=6.03
+_tag=syslinux-$pkgver
+pkgrel=2
+pkgdesc='Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE'
+url='http://www.syslinux.org/'
+arch=(i686 x86_64)
+backup=(boot/syslinux/syslinux.cfg)
+install=syslinux.install
+license=(GPL2)
+# syslinux build system is a mess of submakes that does not work with -jN
+# efi32/com32 do not like Arch cflags/ldflags, though it would be nice to have the flags for userspace tools
+options=(!makeflags !buildflags)
+makedepends=(git python2 nasm upx asciidoc)
+if [[ "$CARCH" == x86_64 ]]; then
+ # efi32 needs it
+ makedepends+=(lib32-glibc)
+fi
optdepends=('perl-passwd-md5: For md5pass'
'perl-digest-sha1: For sha1pass'
'mtools: For mkdiskimage and syslinux support'
@@ -20,174 +28,53 @@ optdepends=('perl-passwd-md5: For md5pass'
'util-linux: For isohybrid'
'efibootmgr: For EFI support'
'dosfstools: For EFI support')
-install="${pkgname}.install"
-source=("https://www.kernel.org/pub/linux/utils/boot/syslinux/${pkgname}-${pkgver}.tar.xz"
- 'syslinux.cfg'
- 'syslinux-install_update'
- 'syslinux-6.02-fix-chainloading.patch'
- 'syslinux-6.02-fix-bios-isolinux.patch'
- 'syslinux-6.02-fix-efi-ovmf.patch')
-prepare() {
-
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
- ## 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
-
- ## Fix FHS manpage path
- sed 's|/usr/man|/usr/share/man|g' -i "${srcdir}/${pkgname}-${pkgver}/mk/syslinux.mk" || true
-
- # fix chainloading
- # http://bugzilla.syslinux.org/show_bug.cgi?id=31
- # http://www.syslinux.org/archives/2013-October/020971.html
- patch -Np1 -i "${srcdir}/syslinux-6.02-fix-chainloading.patch"
-
- # fix bios booting from isohybrid
- # http://www.syslinux.org/archives/2013-November/021189.html
- patch -Np1 -i "${srcdir}/syslinux-6.02-fix-bios-isolinux.patch"
- # fix efi booting in qemu/ovmf
- # http://bugzilla.syslinux.org/show_bug.cgi?id=23
- patch -Np1 -i "${srcdir}/syslinux-6.02-fix-efi-ovmf.patch"
-
-}
+# 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)
+sha1sums=('SKIP'
+ '1145f454bd297d373ad123425f93620c3e92f585'
+ 'd22e7e3fc544cf8a49f27ae9a25f17e65f575ea1')
-_build_syslinux_bios() {
-
- rm -rf "${srcdir}/${pkgname}-${pkgver}-bios/" || true
- cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-bios"
- cd "${srcdir}/${pkgname}-${pkgver}-bios/"
-
- ## Do not try to build syslinux with our default LDFLAGS, it will fail
- unset LDFLAGS
- make PYTHON="python2" bios
- make PYTHON="python2" bios installer
-
-}
+_targets='bios efi32'
+case "$CARCH" in
+ x86_64) _targets+=' efi64' ;;
+esac
-_build_syslinux_efi64() {
-
- rm -rf "${srcdir}/${pkgname}-${pkgver}-efi64/" || true
- cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-efi64"
- cd "${srcdir}/${pkgname}-${pkgver}-efi64/"
-
- ## Unset all compiler FLAGS for efi64 build
- unset CFLAGS
- unset CPPFLAGS
- unset CXXFLAGS
- unset LDFLAGS
- unset MAKEFLAGS
-
- make PYTHON="python2" efi64
- make PYTHON="python2" efi64 installer
-
-}
+prepare() {
+ cd syslinux
-_build_syslinux_efi32() {
-
- rm -rf "${srcdir}/${pkgname}-${pkgver}-efi32/" || true
- cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-efi32"
- cd "${srcdir}/${pkgname}-${pkgver}-efi32/"
-
- ## Unset all compiler FLAGS for efi32 build
- unset CFLAGS
- unset CPPFLAGS
- unset CXXFLAGS
- unset LDFLAGS
- unset MAKEFLAGS
-
- make PYTHON="python2" efi32
- make PYTHON="python2" efi32 installer
-
-}
+ # do not swallow efi compilation output to make debugging easier
+ sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
-build() {
-
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
- ## Build syslinux-efi
- if [[ "${CARCH}" == "x86_64" ]]; then
- _build_syslinux_efi64
- fi
-
- if [[ "${CARCH}" == "i686" ]]; then
- _build_syslinux_efi32
- fi
-
- ## Build syslinux-bios
- _build_syslinux_bios
-
+ # disable debug and development flags to reduce bootloader size
+ truncate --size 0 mk/devel.mk
}
-_package_syslinux_bios() {
-
- cd "${srcdir}/${pkgname}-${pkgver}-bios/"
-
- ## Install Syslinux bios
- make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/bios/" bios install
-
- ## 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
-
- ## Remove com32 and diag dirs
- rm -rf "${pkgdir}/usr/lib/syslinux/bios/diag/" || true
- rm -rf "${pkgdir}/usr/lib/syslinux/bios/com32/" || true
-
- ## Move extlinux binary to /usr/bin
- install -d "${pkgdir}/usr/bin"
- mv "${pkgdir}/sbin/extlinux" "${pkgdir}/usr/bin/extlinux"
- rm -rf "${pkgdir}/sbin/"
-
- ## Install docs
- install -d "${pkgdir}/usr/share/doc"
- cp -ar "${srcdir}/${pkgname}-${pkgver}/doc" "${pkgdir}/usr/share/doc/syslinux"
-
- ## Install the default configuration
- install -D -m0644 "${srcdir}/syslinux.cfg" "${pkgdir}/boot/syslinux/syslinux.cfg"
-
- ## Install the installation and update script
- ## This script is maintained at git://gist.github.com/772138.git
- ## Script not yet updated for syslinux-efi
- install -D -m0755 "${srcdir}/syslinux-install_update" "${pkgdir}/usr/bin/syslinux-install_update"
-
+build() {
+ cd syslinux
+ make PYTHON=python2 $_targets
}
-_package_syslinux_efi() {
-
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
- if [[ "${CARCH}" == "x86_64" ]]; then
- cd "${srcdir}/${pkgname}-${pkgver}-efi64/"
- make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" efi64 install
- fi
-
- if [[ "${CARCH}" == "i686" ]]; then
- cd "${srcdir}/${pkgname}-${pkgver}-efi32/"
- make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" efi32 install
- fi
-
+check() {
+ cd syslinux
+ make unittest
}
package() {
-
- cd "${srcdir}/${pkgname}-${pkgver}/"
-
- _package_syslinux_efi
-
- _package_syslinux_bios
-
-}
+ cd syslinux
+ make $_targets install INSTALLROOT="$pkgdir" SBINDIR=/usr/bin MANDIR=/usr/share/man AUXDIR=/usr/lib/syslinux
-md5sums=('6f275813a1b08cf852e55c0a3f8fbc78'
- '46ca150f53322ff8f1597d9a342f7e40'
- '9376f18fa3e42fc36cffa4cff0a84c09'
- '9dbede6b71a4de9e46aac4aad65334d7'
- 'adf71eceb4fccecd9a7efe1ab3d54918'
- '62d22b101ef2ef53e25b4f86d9f41cb5')
+ 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
+}