core/syslinux/PKGBUILD

127 lines
4.9 KiB
Bash
Raw Normal View History

2012-01-28 20:31:25 +08:00
#
2014-09-22 03:28:58 +08:00
# Chakra Packages for Chakra, part of chakraos.org
2012-01-28 20:31:25 +08:00
#
2013-09-06 23:48:30 +08:00
# Maintainer: Fabian Kosmale <inkane@chakra-project.org>
# original version from Archlinux, all credits go to
# Arch Maintainer : Tobias Powalowski <tpowa@archlinux.org>
# Arch Maintainer : Thomas Bächler <thomas@archlinux.org>
# Arch Contributor: Keshav Padram (the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
2012-01-28 20:31:25 +08:00
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=(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 Chakra cflags/ldflags, though it would be nice to have the flags for userspace tools
options=(!makeflags !buildflags)
makedepends=(git python2 nasm upx asciidoc lib32-glibc)
2012-01-28 20:31:25 +08:00
optdepends=('perl-passwd-md5: For md5pass'
'perl-digest-sha1: For sha1pass'
2014-09-22 03:28:58 +08:00
'mtools: For mkdiskimage and syslinux support'
2014-05-17 06:50:30 +08:00
'gptfdisk: For GPT support'
'util-linux: For isohybrid'
'efibootmgr: For EFI support'
'dosfstools: For EFI support')
2010-05-22 06:07:29 +08:00
# 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
btrfs-fix.patch::http://repo.or.cz/syslinux.git/patch/548386049cd41e887079cdb904d3954365eb28f3?hp=721a0af2f0ba111c31685c5f6c5481eb25346971
gcc-fix-alignment.patch::http://repo.or.cz/syslinux.git/patch/e5f2b577ded109291c9632dacb6eaa621d8a59fe?hp=8dc6d758b564a1ccc44c3ae11f265d43628219ce
dont-guess-alignment.patch::http://repo.or.cz/syslinux.git/patch/0cc9a99e560a2f52bcf052fd85b1efae35ee812f?hp=e5f2b577ded109291c9632dacb6eaa621d8a59fe
kdb-230.patch::http://repo.or.cz/syslinux.git/patch/138e850fab106b5235178848b3e0d33e25f4d3a2
correct_base_type.patch::http://repo.or.cz/syslinux.git/patch/83aad4f
set_mode_base.patch::http://repo.or.cz/syslinux.git/patch/0a2dbb3
fix_return_pointer.patch::http://repo.or.cz/syslinux.git/patch/8dc6d758b564a1ccc44c3ae11f265d43628219ce
support-ext4-64bit.patch::http://repo.or.cz/syslinux.git/patch/af7e95c32cea40c1e443ae301e64b27f068b4915
efi_no_kbd.patch::http://repo.or.cz/syslinux.git/patch/73bb3701a19a9eeb30b6f77ff7612ca2a9cd3f38
fix_infinite_loop_tests.patch
)
sha1sums=('SKIP'
'de4593ce037a82c69b93268243a1cb17e056ccf6'
'df5160a138ca8c6502d67fe1a64fec78b50e82c2'
'6ebf77bf028c928a6ef33dadeee7402b3113b6d3'
'eaa9f5cd82b501f076ece4812d2d37f49d02caae'
'c6a6e96e233b2f8105503725cd614abc1bac2845'
'f50e0a92c65536ef73a84614d489e52d9d1db329'
'e24bf5b1617bab4a3f46925c5a8ee6079f4686bf'
'500c174fce91133d40024b28f6f5cedb144b84c2'
'b3d2196aaec154749c5b796c6d9bfd605a918cf8'
'fe3ab41235aa57259bb6af8cc30c5877c1d8fb57'
'26d9596fd2b2fd92c30b8a441c18176c6b4e0f4d'
'7ecb02550666dfafeb0b22a67dcc34caa4b79767')
2013-09-06 23:48:30 +08:00
_targets='bios efi64'
2013-09-06 23:48:30 +08:00
2014-05-17 06:50:30 +08:00
prepare() {
cd syslinux
2014-05-17 06:50:30 +08:00
# FS#48253
patch -p1 < ../gcc-fix-alignment.patch
patch -p1 < ../dont-guess-alignment.patch
# FS#48214
patch -p1 < ../btrfs-fix.patch
# FS#49046
patch -p1 < ../kdb-230.patch
# FS#53083
patch -p1 < ../correct_base_type.patch
patch -p1 < ../set_mode_base.patch
# FS#49250
patch -p1 < ../fix_return_pointer.patch
# fix infinite loop in load_linux
patch -p1 < ../fix_infinite_loop_tests.patch
# FS#58137
patch -p1 < ../support-ext4-64bit.patch
# FS#59450
patch -p1 < ../efi_no_kbd.patch
# do not swallow efi compilation output to make debugging easier
sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
2013-09-06 23:48:30 +08:00
# disable debug and development flags to reduce bootloader size
truncate --size 0 mk/devel.mk
2013-09-06 23:48:30 +08:00
}
2010-05-22 06:07:29 +08:00
build() {
cd syslinux
export LDFLAGS+=--no-dynamic-linker # workaround for binutils 2.28 http://www.syslinux.org/wiki/index.php?title=Building
export EXTRA_CFLAGS=-fno-PIE # to fix gpxe build
make PYTHON=python2 $_targets
2013-09-06 23:48:30 +08:00
}
check() {
cd syslinux
make unittest
2012-01-28 20:31:25 +08:00
}
package() {
cd syslinux
make $_targets install INSTALLROOT="$pkgdir" SBINDIR=/usr/bin MANDIR=/usr/share/man AUXDIR=/usr/lib/syslinux
2014-09-22 03:28:58 +08:00
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
2014-09-22 03:28:58 +08:00
install -d "$pkgdir"/usr/lib/syslinux/bios
mv "$pkgdir"/usr/lib/syslinux/{*.bin,*.c32,*.0,memdisk} "$pkgdir"/usr/lib/syslinux/bios
2014-09-22 03:28:58 +08:00
install -D -m0644 ../syslinux.cfg "$pkgdir"/boot/syslinux/syslinux.cfg
install -D -m0755 ../syslinux-install_update "$pkgdir"/usr/bin/syslinux-install_update
}