summaryrefslogtreecommitdiff
path: root/package/dmraid/dmraid.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/dmraid/dmraid.mk')
-rw-r--r--package/dmraid/dmraid.mk75
1 files changed, 20 insertions, 55 deletions
diff --git a/package/dmraid/dmraid.mk b/package/dmraid/dmraid.mk
index 7db7d8448..b5f96b513 100644
--- a/package/dmraid/dmraid.mk
+++ b/package/dmraid/dmraid.mk
@@ -3,65 +3,30 @@
# dmraid
#
#############################################################
-
-DMRAID_VERSION=1.0.0.rc15
+DMRAID_VERSION:=1.0.0.rc15
DMRAID_SOURCE:=dmraid-$(DMRAID_VERSION).tar.bz2
DMRAID_SITE:=http://people.redhat.com/~heinzm/sw/dmraid/src
-DMRAID_DIR:=$(BUILD_DIR)/dmraid/$(DMRAID_VERSION)
-DMRAID_CAT:=$(BZCAT)
-DMRAID_BINARY:=dmraid
-DMRAID_STAGING_BINARY:=$(DMRAID_DIR)/STAGING_DIR)/tools/$(DMRAID_BINARY)
-DMRAID_TARGET_BINARY:=$(TARGET_DIR)/sbin/$(DMRAID_BINARY)
-
-$(DL_DIR)/$(DMRAID_SOURCE):
- $(call DOWNLOAD,$(DMRAID_SITE),$(DMRAID_SOURCE))
-
-dmraid-source: $(DL_DIR)/$(DMRAID_SOURCE)
-
-$(DMRAID_DIR)/.unpacked: $(DL_DIR)/$(DMRAID_SOURCE)
- $(DMRAID_CAT) $(DL_DIR)/$(DMRAID_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- toolchain/patch-kernel.sh $(DMRAID_DIR) package/dmraid \*.patch
- touch $(DMRAID_DIR)/.unpacked
+DMRAID_SUBDIR:=$(DMRAID_VERSION)
+DMRAID_DEPENDENCIES:=dm
+DMRAID_INSTALL_STAGING:=yes
-$(DMRAID_DIR)/.configured: $(DMRAID_DIR)/.unpacked
- (cd $(DMRAID_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- $(DISABLE_NLS) \
- $(DISABLE_LARGEFILE) \
- --with-user=$(shell id -un) --with-group=$(shell id -gn) \
- )
- touch $(DMRAID_DIR)/.configured
+$(eval $(call AUTOTARGETS,package,dmraid))
-$(DMRAID_DIR)/tools/$(DMRAID_BINARY): $(DMRAID_DIR)/.configured
- $(MAKE1) -C $(DMRAID_DIR)
- -$(STRIPCMD) $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
- -$(UPX) --best $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
- touch -c $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
-
-$(DMRAID_TARGET_BINARY): $(DMRAID_DIR)/tools/$(DMRAID_BINARY)
- $(INSTALL) -m 0755 $? $@
+$(DMRAID_TARGET_INSTALL_TARGET): $(DMRAID_TARGET_INSTALL_STAGING)
+ $(call MESSAGE,"Installing to target")
+ $(INSTALL) -m 0755 $(STAGING_DIR)/usr/sbin/dmraid $(TARGET_DIR)/usr/sbin
$(INSTALL) -m 0755 package/dmraid/dmraid.init $(TARGET_DIR)/etc/init.d/dmraid
+ touch $@
-dmraid: uclibc dm zlib $(DMRAID_TARGET_BINARY)
-
-dmraid-clean:
- rm -f $(DMRAID_TARGET_BINARY) $(TARGET_DIR)/etc/init.d/dmraid
- -$(MAKE) -C $(DMRAID_DIR) clean
-
-dmraid-dirclean:
- rm -rf $(DMRAID_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_DMRAID),y)
-TARGETS+=dmraid
+ifeq ($(BR2_ENABLE_DEBUG),)
+$(DMRAID_HOOK_POST_INSTALL): $(DMRAID_TARGET_INSTALL_TARGET)
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/dmraid
+ touch $@
endif
+
+$(DMRAID_TARGET_UNINSTALL):
+ $(call MESSAGE,"Uninstalling")
+# makefile has no uninstall target..
+# $(MAKE) DESTDIR=$(STAGING_DIR) -C $(DMRAID_DIR) uninstall
+ rm -f $(TARGET_DIR)/usr/sbin/dmraid $(TARGET_DIR)/etc/init.d/dmraid
+ rm -f $(DMRAID_TARGET_INSTALL_TARGET) $(DMRAID_HOOK_POST_INSTALL)