# mdadm - Software RAID administration
# Generated from manifest.tsv by gen-ports.py. Edit the manifest, not this file,
# unless the package needs something the template cannot express - in which case
# drop a `recipe.local` beside it and it will be preserved.
name=mdadm
version=4.4
release=1
desc="Software RAID administration"
url="https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git"
license="GPL-2.0-or-later"
depend="glibc util-linux-libs"
makedepend=""
source="https://kernel.org/pub/linux/utils/raid/mdadm/mdadm-4.4.tar.xz"
sha256="SKIP"

build() {
	cd "mdadm-4.4"
	# The Intel IMSM/VMD platform code initializes a 4-byte signature field
	# with a 4-character string literal, which newer GCC now treats as an
	# error (no room for the NUL terminator) rather than a warning, and this
	# Makefile builds with -Werror. Not a real bug worth patching upstream
	# source for here - just stop treating it as fatal.
	export CWFLAGS="-Wall -Wno-error -fstack-protector-strong -fPIE -O2"
	make -j"$JOBS" PREFIX=/usr
}

package() {
	cd "mdadm-4.4"
	make PREFIX=/usr DESTDIR="$pkgdir" install
}
