--- /dev/null
+#!/bin/sh
+
+local variant
+
+if [ "${4%%/*}" = "branches" ]; then
+ variant="LuCI ${4##*[-/]} Branch"
+elif [ "${4%%/*}" = "tags" ]; then
+ variant="LuCI ${4##*[-/]} Release"
+else
+ variant="LuCI Trunk"
+fi
+
+cat <<EOF > $1
+module "luci.version"
+
+distname = "${2:-OpenWrt}"
+distversion = "${3:-Development Snapshot}"
+
+luciname = "$variant"
+luciversion = "${5:-svn}"
+EOF
define Package/luci-core/install
$(call Package/luci/install/template,$(1),libs/core)
+ $(PKG_BUILD_DIR)/build/mkversion.sh $(1)/usr/lib/lua/luci/version.lua \
+ "OpenWrt Firmware" \
+ "$(OPENWRTVERSION)" \
+ "$(PKG_BRANCH)" \
+ "$(PKG_VERSION)"
endef
define Package/luci-core/config
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
limitations under the License.
]]--
+
+local require = require
+
module "luci"
-__version__ = "0.9"
-__appname__ = "LuCI"
+local v = require "luci.version"
+
+__version__ = v.luciversion or "0.9"
+__appname__ = v.luciname or "LuCI"
--- /dev/null
+--[[
+LuCI - Lua Configuration Interface
+Version definition - do not edit this file
+]]--
+
+module "luci.version"
+
+distname = "Host System"
+distversion = "SDK"
+
+luciname = "LuCI"
+luciversion = "SVN"
</p>
<div id="header">
-<h1><%=luci.config.brand.firmware%></h1>
+<h1><%=luci.version.distname%></h1>
<p>
-(<%=luci.config.brand.distro%>) |
+: <%=luci.version.distversion%> |
<%:load%>: <%=load1%> <%=load5%> <%=load15%> |
<%:hostname%>: <%=hostname%>
</p>
</p>
<div id="header">
-<h1><%=luci.config.brand.firmware%></h1>
+<h1><%=luci.version.distname%></h1>
<p>
-<%=luci.config.brand.distro%><br />
+<%=luci.version.distversion%><br />
<%:load%>: <%=load1%> <%=load5%> <%=load15%><br />
<%:hostname%>: <%=hostname%>
</p>
background-position: bottom center;
background-repeat: repeat-x;
color: #ffffff;
+ height: 100%;
}
body {
</p>
<div id="header">
-<h1><%=luci.config.brand.firmware%></h1>
+<h1><%=luci.version.distname%></h1>
<p>
-<%=luci.config.brand.distro%><br />
+<%=luci.version.distversion%><br />
<%:load%>: <%=load1%> <%=load5%> <%=load15%><br />
<%:hostname%>: <%=hostname%>
</p>