# Maintainer: Natanael Copa pkgname=mkinitfs pkgver=2.5.1 _ver=${pkgver%_git*} 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://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_ver.tar.xz eglibc.patch " arch="noarch" license="GPL-2" _builddir="$srcdir"/$pkgname-$_ver prepare() { cd "$_builddir" # If we are using eglibc/glibc we need to include eglibc libs # instead of uclibc libs. for i in $source; do case $i in eglibc.patch) case "$CHOST" in *-gnu) patch -p1 -i "$srcdir"/eglibc.patch || return 1 ;; esac ;; *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1 ;; esac done } build() { cd "$_builddir" make VERSION=$pkgver-r$pkgrel || return 1 } package() { cd "$_builddir" make install DESTDIR="$pkgdir" || return 1 } md5sums="c0c44c16105eb939392b2f042c2f866c mkinitfs-2.5.1.tar.xz 067649665a767ff1a08578e1f4e61524 eglibc.patch" sha256sums="40a320988d4e48162654c96ef5a3e3170456a0711d03d0622323e0fe71f43e61 mkinitfs-2.5.1.tar.xz 2db513d1a058be0f5794dc74d00418807253d8ac850c9713ea0eeb0be5f3f65a eglibc.patch" sha512sums="a544be536be5ffbb9c49ec4dab036adcf98ea086870498f5c78b7ff27adbe02d99f8b852c64acdef7a6c0b464df2016a8b6ad071350751fc96706bdd264657a6 mkinitfs-2.5.1.tar.xz 3498d9930889cd776a34863733d467b50b83679ea7f91d79963c81e4f1dc138f887ef1f2a696da6d836d1f6f862dcfd2c2fb9a55b0e3b2926e9f3fc648bc5a15 eglibc.patch"