summaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/APKBUILD
blob: c7f6a927c9de4133b83ce5a49553ff650101e25c (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mkinitfs
pkgver=2.1
pkgrel=0
pkgdesc="Tool to generate initramfs images for Alpine"
url=http://git.alpinelinux.org/cgit/mkinitfs
depends="busybox apk-tools>=2.0"
triggers="$pkgname.trigger:/usr/share/kernel/*"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
	eglibc.patch
	"
license="GPL-2"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	# If we are using eglibc we need to include eglibc libs
	# instead of uclibc libs.
	if [ "$ALPINE_LIBC" = "eglibc" ]; then
	        patch -p1 -i "$srcdir"/eglibc.patch || return 1
	fi
}

build() {
	cd "$srcdir"/$pkgname-$pkgver
	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make install DESTDIR="$pkgdir" || return 1
}
md5sums="c09af8dcaf276b0c16dd732e504b4af6  mkinitfs-2.1.tar.bz2
e59c2f7de496fe430b07e32fd812ebe0  eglibc.patch"