* [Buildroot] [Package] bsdiff
@ 2006-12-15 11:42 Thomas Lundquist
2006-12-15 14:02 ` Bernhard Fischer
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Lundquist @ 2006-12-15 11:42 UTC (permalink / raw)
To: buildroot
Very simple but probably nice to have.
Thomas.
-------------- next part --------------
Index: package/Config.in
===================================================================
--- package/Config.in (revision 16938)
+++ package/Config.in (working copy)
@@ -35,6 +35,7 @@
source "package/bison/Config.in"
source "package/boa/Config.in"
source "package/bridge/Config.in"
+source "package/bsdiff/Config.in"
source "package/customize/Config.in"
source "package/dhcp/Config.in"
source "package/dialog/Config.in"
Index: package/bsdiff/bsdiff.mk
===================================================================
--- package/bsdiff/bsdiff.mk (revision 0)
+++ package/bsdiff/bsdiff.mk (revision 0)
@@ -0,0 +1,52 @@
+#############################################################
+#
+# 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)
+ (cd $(BSDIFF_DIR) ; \
+ $(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)
+ # Copying is the trick here.
+ cp -a $(BSDIFF_DIR)/bsdiff $(TARGET_DIR)/usr/bin/.
+ cp -a $(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
+ -rm $(TARGET_DIR)/usr/bin/bspatch
+
+bsdiff-dirclean:
+ rm -rf $(BSDIFF_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_BSDIFF)),y)
+TARGETS+=bsdiff
+endif
Index: package/bsdiff/Config.in
===================================================================
--- package/bsdiff/Config.in (revision 0)
+++ package/bsdiff/Config.in (revision 0)
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_BSDIFF
+ bool "bsdiff"
+ default n
+ select BR2_PACKAGE_BZIP2
+ help
+ Binary patch/diff. Selects bzip2
+
+ http://www.daemonology.net/bsdiff/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] [Package] bsdiff
2006-12-15 11:42 [Buildroot] [Package] bsdiff Thomas Lundquist
@ 2006-12-15 14:02 ` Bernhard Fischer
0 siblings, 0 replies; 2+ messages in thread
From: Bernhard Fischer @ 2006-12-15 14:02 UTC (permalink / raw)
To: buildroot
On Fri, Dec 15, 2006 at 12:42:49PM +0100, Thomas Lundquist wrote:
>
>Very simple but probably nice to have.
>
>
>Thomas.
Merged, thanks!
A few cosmetic comments below..
>Index: package/Config.in
>===================================================================
>--- package/Config.in (revision 16938)
>+++ package/Config.in (working copy)
>@@ -35,6 +35,7 @@
> source "package/bison/Config.in"
> source "package/boa/Config.in"
> source "package/bridge/Config.in"
>+source "package/bsdiff/Config.in"
> source "package/customize/Config.in"
> source "package/dhcp/Config.in"
> source "package/dialog/Config.in"
>Index: package/bsdiff/bsdiff.mk
>===================================================================
>--- package/bsdiff/bsdiff.mk (revision 0)
>+++ package/bsdiff/bsdiff.mk (revision 0)
>@@ -0,0 +1,52 @@
>+#############################################################
>+#
>+# 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)
>+ (cd $(BSDIFF_DIR) ; \
>+ $(TARGET_CONFIGURE_OPTS) \
>+ $(TARGET_CC) -L $(STAGING_DIR)/lib -lbz2 $(TARGET_CFLAGS) bspatch.c -o bspatch)
Here you spawned two shells where one would have been enough. Fixed.
>+
>+$(TARGET_DIR)/$(BSDIFF_TARGET_BINARY): $(BSDIFF_DIR)/$(BSDIFF_BINARY)
>+ # Copying is the trick here.
>+ cp -a $(BSDIFF_DIR)/bsdiff $(TARGET_DIR)/usr/bin/.
>+ cp -a $(BSDIFF_DIR)/bspatch $(TARGET_DIR)/usr/bin/.
The folks that were here before me usually said 'cp -dpf'. I changed
these two -a accordingly.
>+
>+bsdiff: uclibc bzip2 $(TARGET_DIR)/$(BSDIFF_TARGET_BINARY)
>+
>+bsdiff-source: $(DL_DIR)/$(BSDIFF_SOURCE)
>+
>+bsdiff-clean:
>+ -rm $(TARGET_DIR)/usr/bin/bsdiff
>+ -rm $(TARGET_DIR)/usr/bin/bspatch
You didn't rm the binaries in the builddir but should have done this,
too. Fixed.
[snip]
>Index: package/bsdiff/Config.in
>===================================================================
>--- package/bsdiff/Config.in (revision 0)
>+++ package/bsdiff/Config.in (revision 0)
>@@ -0,0 +1,8 @@
>+config BR2_PACKAGE_BSDIFF
>+ bool "bsdiff"
>+ default n
>+ select BR2_PACKAGE_BZIP2
>+ help
>+ Binary patch/diff. Selects bzip2
I changed the wording to be a little bit more verbose, fwiw.
>+
>+ http://www.daemonology.net/bsdiff/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-15 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-15 11:42 [Buildroot] [Package] bsdiff Thomas Lundquist
2006-12-15 14:02 ` Bernhard Fischer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox