From fbeebdac7e99a915fdb340167b9136ba3eb2762d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 4 Nov 2008 21:19:41 +0000 Subject: [PATCH] * luci-0.8: merge mmc_over_gpio app --- applications/luci-mmc_over_gpio/Makefile | 2 + applications/luci-mmc_over_gpio/ipkg/postinst | 4 ++ .../luasrc/controller/mmc_over_gpio.lua | 28 +++++++++++++ .../luasrc/i18n/mmc_over_gpio.de.lua | 3 ++ .../luasrc/i18n/mmc_over_gpio.de.xml | 9 ++++ .../luasrc/i18n/mmc_over_gpio.en.lua | 3 ++ .../luasrc/i18n/mmc_over_gpio.en.xml | 9 ++++ .../luasrc/model/cbi/mmc_over_gpio.lua | 41 +++++++++++++++++++ .../root/etc/uci-defaults/luci-mmc_over_gpio | 7 ++++ 9 files changed, 106 insertions(+) create mode 100644 applications/luci-mmc_over_gpio/Makefile create mode 100644 applications/luci-mmc_over_gpio/ipkg/postinst create mode 100644 applications/luci-mmc_over_gpio/luasrc/controller/mmc_over_gpio.lua create mode 100644 applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.de.lua create mode 100644 applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.de.xml create mode 100644 applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.en.lua create mode 100644 applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.en.xml create mode 100644 applications/luci-mmc_over_gpio/luasrc/model/cbi/mmc_over_gpio.lua create mode 100644 applications/luci-mmc_over_gpio/root/etc/uci-defaults/luci-mmc_over_gpio diff --git a/applications/luci-mmc_over_gpio/Makefile b/applications/luci-mmc_over_gpio/Makefile new file mode 100644 index 0000000000..f7fac7740e --- /dev/null +++ b/applications/luci-mmc_over_gpio/Makefile @@ -0,0 +1,2 @@ +include ../../build/config.mk +include ../../build/module.mk diff --git a/applications/luci-mmc_over_gpio/ipkg/postinst b/applications/luci-mmc_over_gpio/ipkg/postinst new file mode 100644 index 0000000000..cf16b8a4bb --- /dev/null +++ b/applications/luci-mmc_over_gpio/ipkg/postinst @@ -0,0 +1,4 @@ +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/luci-mmc_over_gpio ) && rm -f /etc/uci-defaults/luci-mmc_over_gpio +} diff --git a/applications/luci-mmc_over_gpio/luasrc/controller/mmc_over_gpio.lua b/applications/luci-mmc_over_gpio/luasrc/controller/mmc_over_gpio.lua new file mode 100644 index 0000000000..ce244cb509 --- /dev/null +++ b/applications/luci-mmc_over_gpio/luasrc/controller/mmc_over_gpio.lua @@ -0,0 +1,28 @@ +--[[ + +LuCI mmc_over_gpio +(c) 2008 Yanira + +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 + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +]]-- + +module("luci.controller.mmc_over_gpio", package.seeall) + +function index() + require("luci.i18n") + luci.i18n.loadc("mmc_over_gpio") + if not luci.fs.isfile("/etc/config/mmc_over_gpio") then + return + end + + local page = entry({"admin", "system", "mmc_over_gpio"}, cbi("mmc_over_gpio"), luci.i18n.translate("mmc_over_gpio", "mmc_over_gpio"), 60) + page.i18n = "mmc_over_gpio" + page.dependent = true +end diff --git a/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.de.lua b/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.de.lua new file mode 100644 index 0000000000..543f98d886 --- /dev/null +++ b/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.de.lua @@ -0,0 +1,3 @@ +mmc_over_gpio = 'MMC/SD Treiberkonfiguration' +mmc_over_gpio_desc = 'Konfiguriert die Einstellungen des MMC/SD Karten Treibers' +settings = 'Einstellungen' diff --git a/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.de.xml b/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.de.xml new file mode 100644 index 0000000000..3aa08d2081 --- /dev/null +++ b/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.de.xml @@ -0,0 +1,9 @@ + + + + +MMC/SD Treiberkonfiguration +Konfiguriert die Einstellungen des MMC/SD Karten Treibers +Einstellungen + + diff --git a/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.en.lua b/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.en.lua new file mode 100644 index 0000000000..a1ee564891 --- /dev/null +++ b/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.en.lua @@ -0,0 +1,3 @@ +mmc_over_gpio = 'MMC/SD driver configuration' +mmc_over_gpio_desc = 'MMC/SD driver configuration' +settings = 'Settings' diff --git a/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.en.xml b/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.en.xml new file mode 100644 index 0000000000..ecdf363adc --- /dev/null +++ b/applications/luci-mmc_over_gpio/luasrc/i18n/mmc_over_gpio.en.xml @@ -0,0 +1,9 @@ + + + + +MMC/SD driver configuration +MMC/SD driver configuration +Settings + + diff --git a/applications/luci-mmc_over_gpio/luasrc/model/cbi/mmc_over_gpio.lua b/applications/luci-mmc_over_gpio/luasrc/model/cbi/mmc_over_gpio.lua new file mode 100644 index 0000000000..a18e2c4f66 --- /dev/null +++ b/applications/luci-mmc_over_gpio/luasrc/model/cbi/mmc_over_gpio.lua @@ -0,0 +1,41 @@ +--[[ + +LuCI mmc_over_gpio +(c) 2008 Yanira + +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 + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +]]-- + +m = Map("mmc_over_gpio", translate("mmc_over_gpio"), + translate("mmc_over_gpio_desc")) + +s = m:section(TypedSection, "mmc_over_gpio", translate("settings")) +s.addremove = true +s.anonymous = true + +s:option(Flag, "enabled", translate("enabled", "Enable")) + +s:option(Value, "name", translate("name")) + +pin = s:option(Value, "DI_pin", translate("DI_pin")) +for i = 0,7 do pin:value(i) end + +pin = s:option(Value, "DO_pin", translate("DO_pin")) +for i = 0,7 do pin:value(i) end + +pin = s:option(Value, "CLK_pin", translate("CLK_pin")) +for i = 0,7 do pin:value(i) end + +pin = s:option(Value, "CS_pin", translate("CS_pin")) +for i = 0,7 do pin:value(i) end + +s:option(Value, "mode", translate("mode")) + +return m diff --git a/applications/luci-mmc_over_gpio/root/etc/uci-defaults/luci-mmc_over_gpio b/applications/luci-mmc_over_gpio/root/etc/uci-defaults/luci-mmc_over_gpio new file mode 100644 index 0000000000..3dd22ec62e --- /dev/null +++ b/applications/luci-mmc_over_gpio/root/etc/uci-defaults/luci-mmc_over_gpio @@ -0,0 +1,7 @@ +#!/bin/sh + +uci batch <<-EOF + add ucitrack mmc_over_gpio + set ucitrack.@mmc_over_gpio[-1].init=mmc_over_gpio + commit ucitrack +EOF -- 2.30.2