Patchwork [2/2] now using generic-package

login
register
mail settings
Submitter Jan Pedersen
Date Jan. 10, 2013, 10:13 a.m.
Message ID <1357812808-3317-2-git-send-email-jp@jp-embedded.com>
Download mbox | patch
Permalink /patch/210969/
State Changes Requested
Headers show

Comments

Jan Pedersen - Jan. 10, 2013, 10:13 a.m.
Signed-off-by: Jan Pedersen <jp@jp-embedded.com>
---
 package/infozip/infozip.mk |   46 ++++++++++++--------------------------------
 1 file changed, 12 insertions(+), 34 deletions(-)

Patch

diff --git a/package/infozip/infozip.mk b/package/infozip/infozip.mk
index 996a709..ce6e88f 100644
--- a/package/infozip/infozip.mk
+++ b/package/infozip/infozip.mk
@@ -3,41 +3,19 @@ 
 # infozip
 #
 #############################################################
-INFOZIP_VERSION:=30
-INFOZIP_SOURCE:=zip$(INFOZIP_VERSION).tgz
-INFOZIP_SITE:=ftp://ftp.info-zip.org/pub/infozip/src/
-INFOZIP_DIR = $(BUILD_DIR)/zip$(INFOZIP_VERSION)
+INFOZIP_VERSION = 30
+INFOZIP_SOURCE = zip$(INFOZIP_VERSION).tgz
+INFOZIP_SITE = ftp://ftp.info-zip.org/pub/infozip/src
+INFOZIP_LICENSE = Info-ZIP
+INFOZIP_LICENSE_FILES = LICENCE
 
-$(DL_DIR)/$(INFOZIP_SOURCE):
-	$(call DOWNLOAD,$(INFOZIP_SITE)/$(INFOZIP_SOURCE))
+define INFOZIP_BUILD_CMDS
+	$(MAKE) -C $(@D) -f unix/Makefile generic CC=$(TARGET_CC)
+endef
 
-$(INFOZIP_DIR)/.source: $(DL_DIR)/$(INFOZIP_SOURCE)
-	$(ZCAT) $(DL_DIR)/$(INFOZIP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	touch $@
+define INFOZIP_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) -f unix/Makefile install prefix=$(TARGET_DIR)/usr CC=$(TARGET_CC)
+endef
 
-$(INFOZIP_DIR)/.build: $(INFOZIP_DIR)/.source
-	make -C $(INFOZIP_DIR) -f unix/Makefile generic CC=$(TARGET_CC)
-	touch $@
+$(eval $(generic-package))
 
-$(INFOZIP_DIR)/.install: $(INFOZIP_DIR)/.build
-	make -C $(INFOZIP_DIR) -f unix/Makefile install prefix=$(TARGET_DIR)/usr CC=$(TARGET_CC)
-	touch $@
-
-infozip: $(INFOZIP_DIR)/.install
-
-infozip-source: $(DL_DIR)/$(INFOZIP_SOURCE)
-
-infozip-clean:
-	rm -rf $(INFOZIP_DIR)
-
-infozip-dirclean:
-	rm -rf $(INFOZIP_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_INFOZIP),y)
-TARGETS += infozip
-endif