diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-14 11:41:39 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-14 13:58:16 +0200 |
commit | 1d0c43bedc00e3365b9e972a91dac11a2c04285c (patch) | |
tree | dae256d86934b541a11aba229d17786bdd6067ca /gkbuilds | |
parent | gen_initramfs.sh: Refactor append_linker() (diff) | |
download | genkernel-1d0c43bedc00e3365b9e972a91dac11a2c04285c.tar.gz genkernel-1d0c43bedc00e3365b9e972a91dac11a2c04285c.tar.bz2 genkernel-1d0c43bedc00e3365b9e972a91dac11a2c04285c.zip |
Rework --mdadm support
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gkbuilds')
-rw-r--r-- | gkbuilds/mdadm.gkbuild | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gkbuilds/mdadm.gkbuild b/gkbuilds/mdadm.gkbuild new file mode 100644 index 0000000..504a905 --- /dev/null +++ b/gkbuilds/mdadm.gkbuild @@ -0,0 +1,35 @@ +# 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' + sed -i \ + -e "/^CFLAGS = /s:^CFLAGS = \(.*\)$:CFLAGS = -Os ${defs}:" \ + -e "/^CXFLAGS = /s:^CXFLAGS = \(.*\)$:CXFLAGS = -Os ${defs}:" \ + -e "/^CWFLAGS = /s:^CWFLAGS = \(.*\)$:CWFLAGS = -Wall:" \ + -e "s/^# LDFLAGS = -static/LDFLAGS = -static/" \ + Makefile \ + || die "Failed to sed mdadm Makefile" +} + +src_compile() { + gkmake V=1 mdadm mdmon +} + +src_install() { + 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'!" +} |