# Maintainer: Natanael Copa pkgname=mkinitfs pkgver=2.1.2 pkgrel=3 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-make-readonly-for-world-when-tmpfs.patch 0001-included-virtio-kernel-modules.patch 0001-mkinitfs-ensure-that-initramfs-image-is-not-world-wr.patch eglibc.patch " license="GPL-2" prepare() { cd "$srcdir"/$pkgname-$pkgver for i in $source; do case $i in eglibc.patch) # 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 ;; *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$srcdir"/$pkgname-$pkgver make || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver make install DESTDIR="$pkgdir" || return 1 } md5sums="e35426eb23b379a648500a353031e719 mkinitfs-2.1.2.tar.bz2 e38e2f5c2b22b2789b5bc03aacba4d2d 0001-init-make-readonly-for-world-when-tmpfs.patch 15f6a307d607272d61f5a9c86aa0d2e5 0001-included-virtio-kernel-modules.patch 3885d1eb3f76bc87120159f007db3cea 0001-mkinitfs-ensure-that-initramfs-image-is-not-world-wr.patch e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch"