Code
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="mdadm"
PKG_VERSION="45c43276d02a32876c7e1f9f0d04580595141b3d"
PKG_SHA256="b4db5d84c43d92ae5b90ec6e547d461b405b8953b9c8ae5e41e692f62ea1d5d8"
PKG_ARCH="any"
PKG_LICENSE="LGPLv2"
PKG_SITE="https://raid.wiki.kernel.org/index.php/A_guide_to_mdadm"
PKG_URL="https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/snapshot/mdadm-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain systemd"
PKG_LONGDESC="mdadm is a tool for managing Linux Software RAID arrays."
PKG_TOOLCHAIN="manual"
make_target(){
make SYSCONFDIR=/storage/.config CC=$CC CWFLAGS=
}
make_install_target(){
mkdir -p $INSTALL/usr/bin
cp mdadm $INSTALL/usr/bin/mdadm
mkdir -o $INSTALL/usr/lib/udev/rules.d
cp udev-md-raid-creating.rules $INSTALL/usr/lib/udev/rules.d/01-md-raid-creating.rules
cp udev-md-raid-arrays.rules $INSTALL/usr/lib/udev/rules.d/63-md-raid-arrays.rules
cp udev-md-raid-assembly.rules $INSTALL/usr/lib/udev/rules.d/64-md-raid-assembly.rules
cp udev-md-clustered-confirm-device.rules $INSTALL/usr/lib/udev/rules.d/69-md-clustered-confirm-device.rules
}
Display More
^ that seems to build under LE master, so probably builds under LE 9.2.x as well. You'll probably want to extend the package with a default conf that's copied to /storage/.config/mdadm.conf.sample etc. etc. .. lots of prior art for that in the build-system.