kumquat-buildroot/package/mii-diag/mii-diag.mk
Peter Korsgaard a84432044e mii-diag: fix race condition
The mii-diag buildsystem doesn't correctly encode the needed
dependencies, so the install step can race against the mii-diag-udeb
(through all) to either cause mii-diag to be built for the host or
not be available when 'install' is executed.

Work around it by explicitly calling the needed steps and not building
the (unused) udeb version at all.

Fixes http://autobuild.buildroot.net/results/4825d267025c74c522077f84330b47f1110315fa

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-02-26 23:47:19 +01:00

40 lines
1.0 KiB
Makefile

#############################################################
#
# mii-diag
#
#############################################################
MII_DIAG_VERSION = 2.11
MII_DIAG_SOURCE = mii-diag_$(MII_DIAG_VERSION).orig.tar.gz
MII_DIAG_PATCH = mii-diag_$(MII_DIAG_VERSION)-3.diff.gz
MII_DIAG_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
MII_DIAG_LICENSE = GPL # No version specified
MII_DIAG_LICENSE_FILES = mii-diag.c
MII_DIAG_MAKE_OPT = $(TARGET_CONFIGURE_OPTS)
define MII_DIAG_DEBIAN_PATCHES
if [ -d $(@D)/debian/patches ]; then \
support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
fi
endef
MII_DIAG_POST_PATCH_HOOKS = MII_DIAG_DEBIAN_PATCHES
define MII_DIAG_BUILD_CMDS
$(MAKE) $(MII_DIAG_MAKE_OPT) -C $(@D) mii-diag
endef
define MII_DIAG_INSTALL_TARGET_CMDS
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install-mii-diag
endef
define MII_DIAG_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/sbin/mii-diag
endef
define MII_DIAG_CLEAN_CMDS
$(MAKE) -C $(@D) clean
endef
$(eval $(generic-package))