Added eeprog package from gustavoz
authorHamish Moffatt <hamish@cloud.net.au>
Thu, 4 Sep 2008 01:35:34 +0000 (01:35 -0000)
committerHamish Moffatt <hamish@cloud.net.au>
Thu, 4 Sep 2008 01:35:34 +0000 (01:35 -0000)
package/Config.in
package/eeprog/Config.in [new file with mode: 0644]
package/eeprog/eeprog.mk [new file with mode: 0644]

index 3f4b45476090187b9cb7f8654b34160bd25986f6..b8d81ba4bdff7237fd382de86ded565d3661d073 100644 (file)
@@ -242,6 +242,7 @@ source "package/devmem2/Config.in"
 source "package/dm/Config.in"
 source "package/dmraid/Config.in"
 source "package/e2fsprogs/Config.in"
+source "package/eeprog/Config.in"
 source "package/fconfig/Config.in"
 source "package/fis/Config.in"
 source "package/fuse/Config.in"
diff --git a/package/eeprog/Config.in b/package/eeprog/Config.in
new file mode 100644 (file)
index 0000000..ff313bd
--- /dev/null
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_EEPROG
+       bool "eeprog"
+       help
+         Simple tool to read/write i2c eeprom chips.
+
+         http://codesink.org/eeprog.html
diff --git a/package/eeprog/eeprog.mk b/package/eeprog/eeprog.mk
new file mode 100644 (file)
index 0000000..41fa53b
--- /dev/null
@@ -0,0 +1,46 @@
+#############################################################
+#
+# eeprog
+#
+#############################################################
+EEPROG_VERSION:=0.7.6
+EEPROG_SOURCE:=eeprog-$(EEPROG_VERSION).tar.gz
+EEPROG_SITE:=http://codesink.org/download
+EEPROG_DIR:=$(BUILD_DIR)/eeprog-$(EEPROG_VERSION)
+EEPROG_BINARY:=eeprog
+EEPROG_TARGET_BINARY:=usr/sbin/eeprog
+
+$(DL_DIR)/$(EEPROG_SOURCE):
+        $(WGET) -P $(DL_DIR) $(EEPROG_SITE)/$(EEPROG_SOURCE)
+
+eeprog-source: $(DL_DIR)/$(EEPROG_SOURCE)
+
+$(EEPROG_DIR)/.unpacked: $(DL_DIR)/$(EEPROG_SOURCE)
+       $(ZCAT) $(DL_DIR)/$(EEPROG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+       toolchain/patch-kernel.sh $(EEPROG_DIR) package/eeprog/ eeprog\*.patch
+       touch $(EEPROG_DIR)/.unpacked
+
+$(EEPROG_DIR)/$(EEPROG_BINARY): $(EEPROG_DIR)/.unpacked
+       $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(EEPROG_DIR)
+       $(STRIPCMD) $(EEPROG_DIR)/$(EEPROG_BINARY)
+
+$(TARGET_DIR)/$(EEPROG_TARGET_BINARY): $(EEPROG_DIR)/$(EEPROG_BINARY)
+       $(INSTALL) -m 0755 -D $(EEPROG_DIR)/$(EEPROG_BINARY) $(TARGET_DIR)/$(EEPROG_TARGET_BINARY)
+
+eeprog: uclibc $(TARGET_DIR)/$(EEPROG_TARGET_BINARY)
+
+eeprog-clean:
+       rm -f $(TARGET_DIR)/$(EEPROG_TARGET_BINARY)
+       -$(MAKE) -C $(EEPROG_DIR) clean
+
+eeprog-dirclean:
+       rm -rf $(EEPROG_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_EEPROG)),y)
+TARGETS+=eeprog
+endif