blob: dd2e8bbb3da0f10168bc7b9302a10f16ab222f2d [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001SUMMARY = "Initramfs generator using udev"
2HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
3DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d."
4
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8PE = "1"
9PV = "049"
10
11# v048 tag
12SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
13SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
14 file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
15 "
16
17DEPENDS += "kmod"
18DEPENDS_append_libc-musl = " fts"
19
20inherit bash-completion pkgconfig
21
22S = "${WORKDIR}/git"
23
24EXTRA_OECONF = "--prefix=${prefix} \
25 --libdir=${prefix}/lib \
26 --datadir=${datadir} \
27 --sysconfdir=${sysconfdir} \
28 --sbindir=${sbindir} \
29 --disable-documentation \
30 --bindir=${bindir} \
31 --includedir=${includedir} \
32 --localstatedir=${localstatedir} \
33 "
34
35# RDEPEND on systemd optionally
36PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
37PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
38
39EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
40
41LDLIBS_append_libc-musl = " -lfts"
42
43do_configure() {
44 ./configure ${EXTRA_OECONF}
45}
46
47do_install() {
48 oe_runmake install DESTDIR=${D}
49 # Its Makefile uses cp -arx to install modules.d, so fix the owner
50 # to root:root
51 chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
52}
53
54FILES_${PN} += "${prefix}/lib/kernel \
55 ${prefix}/lib/dracut \
56 ${systemd_unitdir} \
57 "
58FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
59
60CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
61
62RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
63
64# This could be optimized a bit, but let's avoid non-booting systems :)
65RRECOMMENDS_${PN} = " \
66 kernel-modules \
67 busybox \
68 coreutils \
69 "