aboutsummaryrefslogtreecommitdiffstats
path: root/main/syslinux/APKBUILD
blob: 094e3eba8c75666d6f22c7f033ff5f2ca88db46e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=syslinux
pkgver=6.04_pre1
pkgrel=0
_ver=${pkgver/_/-}
pkgdesc="Boot loader for the Linux operating system"
url="http://syslinux.org"
arch="x86 x86_64"
license="GPL"
makedepends="linux-headers nasm perl util-linux-dev gnu-efi-dev"
depends="mtools blkid mkinitfs"
triggers="syslinux.trigger=/boot"
install="syslinux.post-upgrade"
options="textrels"
ldpath="/usr/share/syslinux"

source="https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/${pkgver%_pre*}/syslinux-$_ver.tar.xz
	update-extlinux.conf
	update-extlinux
	"
subpackages="$pkgname-doc $pkgname-dev"

_loaderarch=
case "$CARCH" in
x86)	_loaderarch=efi32;;
x86_64)	_loaderarch=efi64;;
esac

builddir="$srcdir"/$pkgname-$_ver
prepare() {
	cd "$builddir"
	for i in $source; do
		i=${i%%::*}
		case "$i" in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$builddir"
	unset LDFLAGS
	make $_loaderarch installer || return 1
}

package() {
	cd "$builddir"
	make -j1 INSTALLROOT="$pkgdir" MANDIR=/usr/share/man \
		bios $_loaderarch install || return 1

	mkdir -p "$pkgdir"/etc/update-extlinux.d
	cp "$srcdir"/update-extlinux.conf "$pkgdir"/etc/
	sed "/^version=/s/=.*/=$pkgver-r$pkgrel/" "$srcdir"/update-extlinux \
		> "$pkgdir"/sbin/update-extlinux
	chmod 755 "$pkgdir"/sbin/update-extlinux
}

md5sums="f9c956fde0de29be297402ecbc8ff4d0  syslinux-6.04-pre1.tar.xz
38d206b75b1096ba5df6cfabf455ab06  update-extlinux.conf
99cb67d6e92c1fc59c6e346c4203abc9  update-extlinux"
sha256sums="3f6d50a57f3ed47d8234fd0ab4492634eb7c9aaf7dd902f33d3ac33564fd631d  syslinux-6.04-pre1.tar.xz
d0b7b869489d0ac1529dd742d8d88844ea4e0a5d893de5218b250b97f68e55f2  update-extlinux.conf
8cc377cc9f244a902087992cd85a88826babf9a0a5096e31bd709bd78a561817  update-extlinux"
sha512sums="7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98  syslinux-6.04-pre1.tar.xz
f304068ee174e531890fed20b05d962e6c076160c470ed9cf0d822ff56917793ecabec8c0495b045a740f1f63412a55fbb1fa4b4231b18f76c8584b55f51306d  update-extlinux.conf
6b90164c5669744d1c3ba379d3d919bd16dfccb87e04ed5dcb6c324617fa0186840b359f5bb2d8515da3b26077b585050812755eb4e0b36e0e646dc7bcf024d2  update-extlinux"