# Maintainer: Natanael Copa pkgname=mkinitfs pkgver=2.0 pkgrel=2 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 fix-dev-null.patch 0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch " license="GPL-2" prepare() { cd "$srcdir"/$pkgname-$pkgver patch -p1 -i "$srcdir"/0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch || return 1 # seems dev null is not properly created after switch root patch -p1 -i "$srcdir"/fix-dev-null.patch || return 1 # 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="b43a5eae02a1f97362ca66e7b5108593 mkinitfs-2.0.tar.bz2 e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch 0f8c809b2f3530519025a52aaccbd296 fix-dev-null.patch 9576c3d8f1d4be82ffa478c3d603837f 0001-init-add-support-for-pkgs-.-boot-opt-and-UUID-in-alp.patch"