core/syslinux/PKGBUILD

77 lines
2.6 KiB
Bash

#
# Chakra Packages for Chakra, part of chakraos.org
#
# 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)>
pkgname=syslinux
pkgver=6.03
_tag=syslinux-$pkgver
pkgrel=1
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)
optdepends=('perl-passwd-md5: For md5pass'
'perl-digest-sha1: For sha1pass'
'mtools: For mkdiskimage and syslinux support'
'gptfdisk: For GPT support'
'util-linux: For isohybrid'
'efibootmgr: For EFI support'
'dosfstools: For EFI support')
# 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'
'678744f083a8ad5018503d9eb01f58a878503fbb'
'6032b30aadbd738764213e1710652d0735d93f16')
_targets='bios efi64'
prepare() {
cd syslinux
# do not swallow efi compilation output to make debugging easier
sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
# disable debug and development flags to reduce bootloader size
truncate --size 0 mk/devel.mk
}
build() {
cd syslinux
make PYTHON=python2 $_targets
}
check() {
cd syslinux
make unittest
}
package() {
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
}