summaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/APKBUILD
blob: a34187ce0aa59c8fbd410f7148ba74852448155f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mkinitfs
pkgver=2.4.4
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-fix-cryptdm-regression.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="5b897ab38204bf62ed8abf63d6b7cafd  mkinitfs-2.4.4.tar.bz2
88c6b7928cd7fd3bce1b7297083a3184  0001-init-fix-cryptdm-regression.patch
067649665a767ff1a08578e1f4e61524  eglibc.patch"
sha256sums="454e43149322e9cdfd7ea397480621b42169b5d78dd8eab1be46b96762fc5dc5  mkinitfs-2.4.4.tar.bz2
aa458c98f5099154bc0011355acb0ba3b718677d8775b7fd2d1dc71a92e3178b  0001-init-fix-cryptdm-regression.patch
2db513d1a058be0f5794dc74d00418807253d8ac850c9713ea0eeb0be5f3f65a  eglibc.patch"
sha512sums="9f0e49b20a592b4315155453e4398abf710c8bae62496d4b8d281e21d13366804084be26f0303d35ef3f0bf295eba76885ca43ff452d4aea1e59f0bdce0de18e  mkinitfs-2.4.4.tar.bz2
fe9122c5e00ba74476ade44f5e4e6b74690c10bd45cc239a5fab88468a3ee689b4880843aabe7a8efa9be2b6f0126dddbc94130d0b53866ee36138f3b3a96070  0001-init-fix-cryptdm-regression.patch
3498d9930889cd776a34863733d467b50b83679ea7f91d79963c81e4f1dc138f887ef1f2a696da6d836d1f6f862dcfd2c2fb9a55b0e3b2926e9f3fc648bc5a15  eglibc.patch"