blob: ce975f5a140571eb4f600f844fc3639a22580ed0 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "Initramfs generator using udev"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05003DESCRIPTION = "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"
Andrew Geissler72956ed2021-01-08 16:11:14 -06009PV = "051"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050010
Andrew Geissler72956ed2021-01-08 16:11:14 -060011SRCREV = "e473057ae1de303340dec297c786c4a701cc61bd"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
13 file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
14 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016DEPENDS += "kmod"
17DEPENDS_append_libc-musl = " fts"
18
19inherit bash-completion pkgconfig
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020
21S = "${WORKDIR}/git"
22
23EXTRA_OECONF = "--prefix=${prefix} \
24 --libdir=${prefix}/lib \
25 --datadir=${datadir} \
26 --sysconfdir=${sysconfdir} \
27 --sbindir=${sbindir} \
28 --disable-documentation \
29 --bindir=${bindir} \
30 --includedir=${includedir} \
31 --localstatedir=${localstatedir} \
32 "
33
34# RDEPEND on systemd optionally
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050036PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
37
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
39
40LDLIBS_append_libc-musl = " -lfts"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050041
42do_configure() {
43 ./configure ${EXTRA_OECONF}
44}
45
46do_install() {
47 oe_runmake install DESTDIR=${D}
48 # Its Makefile uses cp -arx to install modules.d, so fix the owner
49 # to root:root
50 chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
51}
52
53FILES_${PN} += "${prefix}/lib/kernel \
54 ${prefix}/lib/dracut \
55 ${systemd_unitdir} \
56 "
57FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
58
59CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
60
61RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
62
63# This could be optimized a bit, but let's avoid non-booting systems :)
64RRECOMMENDS_${PN} = " \
65 kernel-modules \
66 busybox \
Patrick Williamsddad1a12017-02-23 20:36:32 -060067 coreutils \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050068 "