blob: 13cf5f6ded7fddf6f4e3e49a0ffefe68da9044e5 [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"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009PV = "049"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050010
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011# v048 tag
12SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013SRC_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 \
Brad Bishop34ae6002019-04-08 15:21:03 -040015 file://0001-dracut.sh-improve-udevdir.patch \
Brad Bishopc8f47122019-06-24 09:36:18 -040016 file://0001-set-viriable-_drv-not-local.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050018
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019DEPENDS += "kmod"
20DEPENDS_append_libc-musl = " fts"
21
22inherit bash-completion pkgconfig
Patrick Williamsb48b7b42016-08-17 15:04:38 -050023
24S = "${WORKDIR}/git"
25
26EXTRA_OECONF = "--prefix=${prefix} \
27 --libdir=${prefix}/lib \
28 --datadir=${datadir} \
29 --sysconfdir=${sysconfdir} \
30 --sbindir=${sbindir} \
31 --disable-documentation \
32 --bindir=${bindir} \
33 --includedir=${includedir} \
34 --localstatedir=${localstatedir} \
35 "
36
37# RDEPEND on systemd optionally
Brad Bishop6e60e8b2018-02-01 10:27:11 -050038PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050039PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
40
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
42
43LDLIBS_append_libc-musl = " -lfts"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050044
45do_configure() {
46 ./configure ${EXTRA_OECONF}
47}
48
49do_install() {
50 oe_runmake install DESTDIR=${D}
51 # Its Makefile uses cp -arx to install modules.d, so fix the owner
52 # to root:root
53 chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
54}
55
56FILES_${PN} += "${prefix}/lib/kernel \
57 ${prefix}/lib/dracut \
58 ${systemd_unitdir} \
59 "
60FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
61
62CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
63
64RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
65
66# This could be optimized a bit, but let's avoid non-booting systems :)
67RRECOMMENDS_${PN} = " \
68 kernel-modules \
69 busybox \
Patrick Williamsddad1a12017-02-23 20:36:32 -060070 coreutils \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050071 "