aboutsummaryrefslogtreecommitdiffstats
path: root/main/syslinux/APKBUILD
blob: 6d8aab34adc8f450145d175bea85d12b58afb127 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=syslinux
pkgver=6.02
pkgrel=1
_ver=${pkgver/_/-}
pkgdesc="Boot loader for the Linux operating system"
url="http://syslinux.org"
arch="x86 x86_64"
license="GPL"
makedepends="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="http://www.kernel.org/pub/linux/utils/boot/syslinux/${pkgver%%.*}.xx/$pkgname-$_ver.tar.bz2
source="https://www.kernel.org/pub/linux/utils/boot/syslinux/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
		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="6f275813a1b08cf852e55c0a3f8fbc78  syslinux-6.02.tar.xz
38d206b75b1096ba5df6cfabf455ab06  update-extlinux.conf
320f3d2b57293ecf7d578fa53c087dde  update-extlinux"
sha256sums="afa31b7cbf72e1c0c1752a0636ba724ce01c0e374366e46e61db6862b4685478  syslinux-6.02.tar.xz
d0b7b869489d0ac1529dd742d8d88844ea4e0a5d893de5218b250b97f68e55f2  update-extlinux.conf
031563308b02b148a2db2c66922feb1b0e5ec8dd92fcf79de93d0e581df8da0f  update-extlinux"
sha512sums="919d165e9cba2b964cec8b015f0a4281a5f90e908f247441d6edefe289170e697b933554d12fa90e698b6d2e8b5b40fdb3b7a95d746a41c580e3a44f8859818f  syslinux-6.02.tar.xz
f304068ee174e531890fed20b05d962e6c076160c470ed9cf0d822ff56917793ecabec8c0495b045a740f1f63412a55fbb1fa4b4231b18f76c8584b55f51306d  update-extlinux.conf
64c664e61deea6e128e6ffd55d6c92e5a7c73ecc7058ba2f8201b38a79a388d74833653ce4da87e8a977659257f7b17830f490a0800f205d9525ae1a0771b3c4  update-extlinux"