# Maintainer: Natanael Copa pkgname=mkinitfs pkgver=2.4.1 pkgrel=1 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 0001-init-try-detect-alpine_dev-filesystem-if-not-specifi.patch 0002-init-new-boot-option-debug_init.patch eglibc.patch " arch="noarch" license="GPL-2" prepare() { cd "$srcdir"/$pkgname-$pkgver # 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 "$srcdir"/$pkgname-$pkgver make VERSION=$pkgver-r$pkgrel || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver make install DESTDIR="$pkgdir" || return 1 } md5sums="f38010635e83fe277e1e261a4a9ea66e mkinitfs-2.4.1.tar.bz2 1ae074d8f56f355c4fdb3a3813c7cd4a 0001-init-try-detect-alpine_dev-filesystem-if-not-specifi.patch 5182b1172fb8f975d208f5cff8497ae0 0002-init-new-boot-option-debug_init.patch e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch"