#!/bin/bash
# Copyright (c) 2000-2015 Synology Inc. All rights reserved.

CURRENT_MDADM=mdadm-3.1.4
if checkPlatformFunction SYNO_FEA_RAID_F1 ; then
	CURRENT_MDADM=mdadm-3.4
fi

if IsGLIBCPlatform; then
	make remoteinstall BuildRoot="$TmpInstDir" CURRENT_MDADM=${CURRENT_MDADM}
else
	mkdir ${TmpInstDir}/sbin
	cp -af mdadm.uclibc ${TmpInstDir}/sbin/mdadm
	if [ "x$NOSTRIP" != "xNOSTRIP" ]; then
		${STATIC_STRIP} ${TmpInstDir}/sbin/mdadm
	fi
fi
