diff options
author | Ben Kohler <bkohler@gentoo.org> | 2024-04-29 11:43:48 -0500 |
---|---|---|
committer | Ben Kohler <bkohler@gentoo.org> | 2024-04-29 11:43:48 -0500 |
commit | 33d9a5c70bb3e7db978d8dc1e774742f98487ad6 (patch) | |
tree | d11c120e17af1535e7760588e69fa1c4c4f3ba45 /gkbuilds | |
parent | gkbuilds/lvm: move 2.03 changes to new file (diff) | |
download | genkernel-33d9a5c70bb3e7db978d8dc1e774742f98487ad6.tar.gz genkernel-33d9a5c70bb3e7db978d8dc1e774742f98487ad6.tar.bz2 genkernel-33d9a5c70bb3e7db978d8dc1e774742f98487ad6.zip |
gkbuilds/mdadm: fix for mdadm-4.2
Seems to need new option to build without libudev usage
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'gkbuilds')
-rw-r--r-- | gkbuilds/mdadm-4.2.gkbuild | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gkbuilds/mdadm-4.2.gkbuild b/gkbuilds/mdadm-4.2.gkbuild new file mode 100644 index 00000000..d9963469 --- /dev/null +++ b/gkbuilds/mdadm-4.2.gkbuild @@ -0,0 +1,38 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +src_prepare() { + default + + local defs='-DNO_DLM -DNO_COROSYNC -DNO_LIBUDEV' + sed -i \ + -e "/^CFLAGS = /s:^CFLAGS = \(.*\)$:CFLAGS = ${CFLAGS} ${defs}:" \ + -e "/^CXFLAGS = /s:^CXFLAGS = \(.*\)$:CXFLAGS = ${CFLAGS} ${defs}:" \ + -e "/^CWFLAGS = /s:^CWFLAGS = \(.*\)$:CWFLAGS = -Wall:" \ + -e "s/^# LDFLAGS = -static/LDFLAGS = -static/" \ + -e "s|^UDEVDIR := .*|UDEVDIR = $(get_udevdir)|" \ + Makefile \ + || die "Failed to sed mdadm Makefile" +} + +src_compile() { + CXFLAGS="-DNO_LIBUDEV" gkmake V=1 mdadm mdmon +} + +src_install() { + gkmake V=1 DESTDIR="${D}" install-udev + + mkdir -p "${D}"/sbin || die "Failed to create '${D}/sbin'!" + + cp -a mdadm "${D}"/sbin/ \ + || die "Failed to copy '${S}/mdadm' to '${D}/sbin/'!" + + "${STRIP}" --strip-all "${D}"/sbin/mdadm \ + || die "Failed to strip '${D}/sbin/mdadm'!" + + cp -a mdmon "${D}"/sbin/ \ + || die "Failed to copy '${D}/sbin/mdmon' to '${D}/sbin/'!" + + "${STRIP}" --strip-all "${D}"/sbin/mdmon \ + || die "Failed to strip '${D}/sbin/mdmon'!" +} |