appweb: refactor get_appweb_host function out into common .inc
authorMichael Lauer <mickey@vanille-media.de>
Thu, 12 Oct 2006 09:18:56 +0000 (09:18 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Thu, 12 Oct 2006 09:18:56 +0000 (09:18 +0000)
packages/appweb/appweb.inc [new file with mode: 0644]
packages/appweb/appweb_1.2.0.bb
packages/appweb/appweb_2.0.4.bb

diff --git a/packages/appweb/appweb.inc b/packages/appweb/appweb.inc
new file mode 100644 (file)
index 0000000..0f602f7
--- /dev/null
@@ -0,0 +1,4 @@
+def get_appweb_host(d, bb):
+    host = bb.data.getVar('HOST_SYS', d, 1)
+    return host.replace('-linux-uclibc', '-linux')
+
index 8cf506a..8bd6d77 100644 (file)
@@ -1,6 +1,6 @@
 DESCRIPTION = "AppWeb is an embedded HTTP Web server that has been designed with security in mind."
 SECTION = "console/network"
-LICENSE="GPL"
+LICENSE = "GPL"
 SRC_URI = "http://www.mbedthis.com/software/appWeb-src-1.2.0-1.tar.gz \
           file://makerules.patch;patch=1 \
           file://nonrootinstall.patch;patch=1"
@@ -9,10 +9,7 @@ S = "${WORKDIR}/appWeb-1.2.0"
 APPWEB_HOST = "${@get_appweb_host(d, bb)}"
 APPWEB_BUILD = "${BUILD_SYS}"
 
-def get_appweb_host(d, bb):
-    host = bb.data.getVar('HOST_SYS', d, 1)
-    return host.replace('-linux-uclibc', '-linux')
-    
+require appweb.inc
 
 #  --buildNumber=NUMBER     Set the build number part of the version (1.0.0.X).
 #  --name=NAME              Set the full product name (BLD_NAME define).
index f740876..7f79410 100644 (file)
@@ -10,10 +10,7 @@ S = "${WORKDIR}/appWeb-${PV}"
 APPWEB_HOST = "${@get_appweb_host(d, bb)}"
 APPWEB_BUILD = "${BUILD_SYS}"
 
-def get_appweb_host(d, bb):
-    host = bb.data.getVar('HOST_SYS', d, 1)
-    return host.replace('-linux-uclibc', '-linux')
-    
+require appweb.inc
 
 #  --buildNumber=NUMBER     Set the build number part of the version (1.0.0.X).
 #  --name=NAME              Set the full product name (BLD_NAME define).