From 9b855adc8cdd3bad246417d59b2f513fbff2685b Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 15 Dec 2006 13:57:07 +0000 Subject: - Thomas Lundquist added bsdiff --- package/bsdiff/Config.in | 9 ++++++++ package/bsdiff/bsdiff.mk | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 package/bsdiff/Config.in create mode 100644 package/bsdiff/bsdiff.mk (limited to 'package/bsdiff') diff --git a/package/bsdiff/Config.in b/package/bsdiff/Config.in new file mode 100644 index 000000000..e9785172f --- /dev/null +++ b/package/bsdiff/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_BSDIFF + bool "bsdiff" + default n + select BR2_PACKAGE_BZIP2 + help + Binary patch/diff like xdelta but creates smaller diffs. + Needs bzip2 support. + + http://www.daemonology.net/bsdiff/ diff --git a/package/bsdiff/bsdiff.mk b/package/bsdiff/bsdiff.mk new file mode 100644 index 000000000..5fafb10b0 --- /dev/null +++ b/package/bsdiff/bsdiff.mk @@ -0,0 +1,53 @@ +############################################################# +# +# bsdiff +# +############################################################# +BSDIFF_VERSION:=4.3 +BSDIFF_SOURCE:=bsdiff-$(BSDIFF_VERSION).tar.gz +BSDIFF_SITE:=http://www.daemonology.net/bsdiff +BSDIFF_DIR:=$(BUILD_DIR)/bsdiff-$(BSDIFF_VERSION) +BSDIFF_BINARY:=bsdiff +BSDIFF_TARGET_BINARY:=usr/bin/bsdiff +BSDIFF_ZCAT=$(ZCAT) + +$(DL_DIR)/$(BSDIFF_SOURCE): + $(WGET) -P $(DL_DIR) $(BSDIFF_SITE)/$(BSDIFF_SOURCE) + +$(BSDIFF_DIR)/.source: $(DL_DIR)/$(BSDIFF_SOURCE) + $(BSDIFF_ZCAT) $(DL_DIR)/$(BSDIFF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + touch $(BSDIFF_DIR)/.source + +$(BSDIFF_DIR)/$(BSDIFF_BINARY): $(BSDIFF_DIR)/.source + (cd $(BSDIFF_DIR) ; \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CC) -L $(STAGING_DIR)/lib -lbz2 \ + $(TARGET_CFLAGS) bsdiff.c -o bsdiff ; \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CC) -L $(STAGING_DIR)/lib -lbz2 \ + $(TARGET_CFLAGS) bspatch.c -o bspatch ; \ + ) + +$(TARGET_DIR)/$(BSDIFF_TARGET_BINARY): $(BSDIFF_DIR)/$(BSDIFF_BINARY) + cp -dpf $(BSDIFF_DIR)/bsdiff $(TARGET_DIR)/usr/bin/. + cp -dpf $(BSDIFF_DIR)/bspatch $(TARGET_DIR)/usr/bin/. + +bsdiff: uclibc bzip2 $(TARGET_DIR)/$(BSDIFF_TARGET_BINARY) + +bsdiff-source: $(DL_DIR)/$(BSDIFF_SOURCE) + +bsdiff-clean: + -rm $(TARGET_DIR)/usr/bin/{bsdiff,bspatch} + -rm $(BSDIFF_DIR)/{bsdiff,bspatch} + +bsdiff-dirclean: + rm -rf $(BSDIFF_DIR) + +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(strip $(BR2_PACKAGE_BSDIFF)),y) +TARGETS+=bsdiff +endif -- cgit v1.2.3