blob: c978263a1b08479b4e6135f6861059f284372edf [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "Initramfs generator using udev"
2DESCRIPTION = "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."
3
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
6
7PE = "1"
8PV = "044+git${SRCREV}"
9
10# v044 tag
11SRCREV = "1bc3e733f96033a508841e97fe08da7a12851782"
12SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http"
13
14inherit bash-completion
15
16S = "${WORKDIR}/git"
17
18EXTRA_OECONF = "--prefix=${prefix} \
19 --libdir=${prefix}/lib \
20 --datadir=${datadir} \
21 --sysconfdir=${sysconfdir} \
22 --sbindir=${sbindir} \
23 --disable-documentation \
24 --bindir=${bindir} \
25 --includedir=${includedir} \
26 --localstatedir=${localstatedir} \
27 "
28
29# RDEPEND on systemd optionally
30PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
31PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
32
33EXTRA_OEMAKE += 'libdir=${prefix}/lib'
34
35do_configure() {
36 ./configure ${EXTRA_OECONF}
37}
38
39do_install() {
40 oe_runmake install DESTDIR=${D}
41 # Its Makefile uses cp -arx to install modules.d, so fix the owner
42 # to root:root
43 chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
44}
45
46FILES_${PN} += "${prefix}/lib/kernel \
47 ${prefix}/lib/dracut \
48 ${systemd_unitdir} \
49 "
50FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
51
52CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
53
54RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
55
56# This could be optimized a bit, but let's avoid non-booting systems :)
57RRECOMMENDS_${PN} = " \
58 kernel-modules \
59 busybox \
60 coreutils \
61 "