# Maintainer: Natanael Copa pkgname=mkinitfs pkgver=2.4.4_git20130502 _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://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$_ver.tar.bz2 git.patch 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="5b897ab38204bf62ed8abf63d6b7cafd mkinitfs-2.4.4.tar.bz2 6727bb8b3a5cc0ac415a8fb7ae871e87 git.patch 067649665a767ff1a08578e1f4e61524 eglibc.patch" sha256sums="454e43149322e9cdfd7ea397480621b42169b5d78dd8eab1be46b96762fc5dc5 mkinitfs-2.4.4.tar.bz2 d95bc897f7f850ba2057af5ccaf5814f5ff8d42a2932a3943d390fcfe088bd87 git.patch 2db513d1a058be0f5794dc74d00418807253d8ac850c9713ea0eeb0be5f3f65a eglibc.patch" sha512sums="9f0e49b20a592b4315155453e4398abf710c8bae62496d4b8d281e21d13366804084be26f0303d35ef3f0bf295eba76885ca43ff452d4aea1e59f0bdce0de18e mkinitfs-2.4.4.tar.bz2 4e07de46376df4e1a82e04e2276a389c8dfdb9ad43c58b6c3daf2b199f549996562d41cb5f39e85c2c974200acb851bfedb405e1911fbf55d89ca3ae556286c7 git.patch 3498d9930889cd776a34863733d467b50b83679ea7f91d79963c81e4f1dc138f887ef1f2a696da6d836d1f6f862dcfd2c2fb9a55b0e3b2926e9f3fc648bc5a15 eglibc.patch"