[pkg-fso-commits] [SCM] Debian packaging for uboot-envtools branch, master, updated. debian/20081215-2-4-ga9e7c6b

Per Andersson avtobiff at gmail.com
Thu Jul 30 18:26:21 UTC 2009


The following commit has been merged in the master branch:
commit a9e7c6b98d71f173b099a9866b1691904502c95b
Author: Per Andersson <avtobiff at gmail.com>
Date:   Thu Jul 30 16:45:44 2009 +0200

    added automatic configuration of uboot-envtools.

diff --git a/Makefile b/Makefile
index 9629ee5..1b9d7c3 100644
--- a/Makefile
+++ b/Makefile
@@ -21,12 +21,10 @@
 # MA 02111-1307 USA
 #
 
-include $(TOPDIR)/config.mk
-
 SRCS	:= $(obj)crc32.c  fw_env.c  fw_env_main.c
 HEADERS	:= fw_env.h
 
-CPPFLAGS := -Wall -DUSE_HOSTCC -I$(SRCTREE)/include
+CPPFLAGS := -Wall -DUSE_HOSTCC -I/usr/include
 
 ifeq ($(MTD_VERSION),old)
 CPPFLAGS += -DMTD_OLD
@@ -39,14 +37,3 @@ $(obj)fw_printenv:	$(SRCS) $(HEADERS)
 
 clean:
 	rm -f $(obj)fw_printenv $(obj)crc32.c
-
-$(obj)crc32.c:
-	ln -s $(src)../../lib_generic/crc32.c $(obj)crc32.c
-
-#########################################################################
-
-include $(TOPDIR)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/crc32.c b/crc32.c
index 83d1d1d..4913e6a 100644
--- a/crc32.c
+++ b/crc32.c
@@ -154,7 +154,7 @@ const uint32_t * ZEXPORT get_crc_table()
 #define DO8(buf)  DO4(buf); DO4(buf);
 
 /* ========================================================================= */
-uint32_t ZEXPORT crc32 (uint32_t crc, const Bytef *buf, uInt len)
+uLong ZEXPORT crc32 (uLong crc, const Bytef *buf, uInt len)
 {
 #ifdef DYNAMIC_CRC_TABLE
     if (crc_table_empty)
diff --git a/debian/rules b/debian/rules
index 931d0e2..6156979 100755
--- a/debian/rules
+++ b/debian/rules
@@ -45,6 +45,7 @@ binary-arch: build install
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs
+	dh_installdebconf
 	dh_installdocs README
 	dh_installexamples
 	dh_install
diff --git a/debian/uboot-envtools.config b/debian/uboot-envtools.config
new file mode 100644
index 0000000..c52646f
--- /dev/null
+++ b/debian/uboot-envtools.config
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+[ ! -f /etc/fw_env.config ] || exit 0 # bail if already configured
+
+# select machine/file
+db_input high uboot-envtools/machine || true
+db_go || true
+
+exit 0
diff --git a/debian/uboot-envtools.postinst b/debian/uboot-envtools.postinst
new file mode 100644
index 0000000..a619603
--- /dev/null
+++ b/debian/uboot-envtools.postinst
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+[ ! -f /etc/fw_env.config ] || exit 0 # bail if already configured
+
+db_get uboot-envtools/machine
+machine="$RET"
+
+case "$machine" in
+    "Kurobox Pro")
+        file="kurobox_pro.config"
+        ;;
+    "Linkstation Pro Live")
+        file="linkstation_pro_live.config"
+        ;;
+    "Linkstation Mipsel")
+        file="lsmipsel.config"
+        ;;
+    "Linkstation HG")
+        file="lsppchg.config"
+        ;;
+    "OpenMoko Neo 1973 (GTA01)")
+        file="openmoko_gta01.config"
+        ;;
+    "OpenMoko FreeRunner (GTA02)")
+        file="openmoko_gta02.config"
+        ;;
+    "QNAP TS-101")
+        file="qnap_ts101.config"
+        ;;
+    "QNAP TS109/209")
+        file="qnap_ts109-209.config"
+        ;;
+    "QNAP TS-119/219")
+        file="qnap_ts119-219.config"
+        ;;
+    "Do not configure")
+        exit 0
+        ;;
+esac
+
+cp "/usr/share/doc/uboot-envtools/examples/$file" /etc/fw_env.config
+
+#DEBHELPER#
diff --git a/debian/uboot-envtools.postrm b/debian/uboot-envtools.postrm
new file mode 100644
index 0000000..e8fbe51
--- /dev/null
+++ b/debian/uboot-envtools.postrm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+rm -f /etc/fw_env.config
+
+#DEBHELPER#

-- 
Debian packaging for uboot-envtools



More information about the pkg-fso-commits mailing list