kumquat-buildroot/package/mdadm/mdadm.mk

66 lines
2.0 KiB
Makefile
Raw Normal View History

#############################################################
#
# mdadm
#
#############################################################
MDADM_VERSION:=2.6.7.1
2007-05-15 13:25:41 +02:00
MDADM_SOURCE:=mdadm_$(MDADM_VERSION).orig.tar.gz
MDADM_PATCH:=mdadm_$(MDADM_VERSION)-1.diff.gz
2007-05-15 13:25:41 +02:00
MDADM_CAT:=$(ZCAT)
2007-12-27 13:00:12 +01:00
MDADM_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mdadm
MDADM_DIR:=$(BUILD_DIR)/mdadm-$(MDADM_VERSION)
MDADM_BINARY:=mdadm
MDADM_TARGET_BINARY:=sbin/mdadm
2007-05-15 13:25:41 +02:00
ifneq ($(MDADM_PATCH),)
MDADM_PATCH_FILE:=$(DL_DIR)/$(MDADM_PATCH)
$(MDADM_PATCH_FILE):
2009-01-16 12:42:52 +01:00
$(call DOWNLOAD,$(MDADM_SITE),$(MDADM_PATCH))
2007-05-15 13:25:41 +02:00
endif
$(DL_DIR)/$(MDADM_SOURCE): $(MDADM_PATCH_FILE)
2009-01-16 12:42:52 +01:00
$(call DOWNLOAD,$(MDADM_SITE),$(MDADM_SOURCE))
2007-05-15 13:25:41 +02:00
touch -c $@
$(MDADM_DIR)/.unpacked: $(DL_DIR)/$(MDADM_SOURCE)
2006-11-17 16:43:51 +01:00
$(MDADM_CAT) $(DL_DIR)/$(MDADM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
2007-05-15 13:25:41 +02:00
ifneq ($(MDADM_PATCH),)
(cd $(MDADM_DIR) && $(MDADM_CAT) $(MDADM_PATCH_FILE) | patch -p1)
if [ -d $(MDADM_DIR)/debian/patches ]; then \
2007-08-22 11:56:41 +02:00
toolchain/patch-kernel.sh $(MDADM_DIR) $(MDADM_DIR)/debian/patches \*patch; \
2007-05-15 13:25:41 +02:00
fi
endif
2007-06-26 18:35:07 +02:00
#toolchain/patch-kernel.sh $(MDADM_DIR) package/mdadm mdadm-$(MDADM_VERSION)\*.patch
toolchain/patch-kernel.sh $(MDADM_DIR) package/mdadm mdadm-\*.patch
touch $@
$(MDADM_DIR)/$(MDADM_BINARY): $(MDADM_DIR)/.unpacked
$(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC=$(TARGET_CC) -C $(MDADM_DIR)
$(TARGET_DIR)/$(MDADM_TARGET_BINARY): $(MDADM_DIR)/$(MDADM_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(MDADM_DIR) install
rm -Rf $(TARGET_DIR)/usr/share/man
$(STRIPCMD) $(STRIP_STRIP_ALL) $@
2007-10-30 22:32:09 +01:00
mdadm-source: $(DL_DIR)/$(MDADM_SOURCE) $(MDADM_PATCH_FILE)
2008-05-11 08:43:22 +02:00
mdadm-unpacked: $(MDADM_DIR)/.unpacked
mdadm: $(TARGET_DIR)/$(MDADM_TARGET_BINARY)
2008-05-11 08:43:22 +02:00
mdadm-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(MDADM_DIR) uninstall
-$(MAKE) -C $(MDADM_DIR) clean
mdadm-dirclean:
rm -rf $(MDADM_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_MDADM),y)
TARGETS+=mdadm
endif