gen_die "Could not find MDADM source tarball: ${MDADM_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
cd"${TEMP}"
rm -rf "${MDADM_DIR}" > /dev/null
/bin/tar -jxpf "${MDADM_SRCTAR}"||
gen_die 'Could not extract MDADM source tarball!'
[ -d "${MDADM_DIR}"]||
gen_die 'MDADM directory ${MDADM_DIR} is invalid!'
cd"${MDADM_DIR}"
sed -i "/^CFLAGS = /s:^CFLAGS = \(.*\)$:CFLAGS = -Os:" Makefile
sed -i "/^CXFLAGS = /s:^CXFLAGS = \(.*\)$:CXFLAGS = -Os:" Makefile
sed -i "/^CWFLAGS = /s:^CWFLAGS = \(.*\)$:CWFLAGS = -Wall:" Makefile
sed -i "s/^# LDFLAGS = -static/LDFLAGS = -static/" Makefile