PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-# LUA_TARGET:=compile LUAC=$(BUILD_DIR_HOST)/lua/luac
LUA_TARGET:=source
PKG_SELECTED_MODULES:=
DEPENDS:=+luci-mod-freifunk
endef
+define Package/luci/i18ntemplate
+ $(call Package/luci/libtemplate)
+ SUBMENU:=LuCI - Translations
+ DEPENDS:=+luci-web
+endef
+
define Package/luci/thtemplate
$(call Package/luci/libtemplate)
SUBMENU:=LuCI - Themes
$(call Package/luci/install/template,$(1),libs/core)
endef
+define Package/luci-core/config
+ choice
+ prompt "Build Target"
+ default PACKAGE_luci-core_compile
+
+ config PACKAGE_luci-core_compile
+ bool "Production"
+
+ config PACKAGE_luci-core_source
+ bool "Debug"
+
+ endchoice
+endef
+
+ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
+ LUA_TARGET:=compile
+endif
+
### Libraries ###
define Package/luci-cbi
DEPENDS+= \
+luci-sgi-haserl +luci-app-splash \
+luci-app-ffwizard-leipzig \
+ +luci-theme-fledermaus \
+olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
+kmod-tun +ip
TITLE:=Freifunk Halle Community Meta-Package
DEPENDS+= \
+luci-sgi-haserl +luci-app-splash \
+luci-app-ffwizard-leipzig \
+ +luci-theme-fledermaus \
+olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
+kmod-tun +ip
TITLE:=Freifunk Leipzig Community Meta-Package
$(call Package/luci/fftemplate)
DEPENDS+= \
+luci-sgi-haserl +luci-app-splash \
+ +luci-theme-fledermaus \
+olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
TITLE:=Freifunk Hannover Community Meta-Package
URL:=http://www.freifunk-hannover.de/
define Package/luci-mod-admin-core
$(call Package/luci/webtemplate)
- DEPENDS+=+luci-web +luci-cbi +luci-theme-fledermaus
+ DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
TITLE:=Administration module
endef
$(call Package/luci/install/template,$(1),libs/sgi-webuci)
endef
-### Templates ###
+### Themes ###
define Package/luci-theme-fledermaus
- $(call Package/luci/thtemplate)
- TITLE:=Fledermaus (default)
+ $(call Package/luci/fftemplate)
+ DEPENDS:=+luci-web
+ TITLE:=Fledermaus Theme
endef
define Package/luci-theme-fledermaus/install
$(call Package/luci/install/template,$(1),themes/fledermaus)
endef
+define Package/luci-theme-openwrt
+ $(call Package/luci/thtemplate)
+ TITLE:=OpenWRT.org (default)
+endef
+
+define Package/luci-theme-openwrt/install
+ $(call Package/luci/install/template,$(1),themes/openwrt.org)
+endef
+
+### Translations ###
+define Package/luci-i18n-german
+ $(call Package/luci/i18ntemplate)
+ TITLE:=German
+endef
+
+define Package/luci-i18n-german/install
+ $(call Package/luci/install/template,$(1),i18n/german)
+endef
+
+
+define Package/luci-i18n-english
+ $(call Package/luci/i18ntemplate)
+ TITLE:=English (incomplete)
+endef
+
+define Package/luci-i18n-english/install
+ $(call Package/luci/install/template,$(1),i18n/english)
+endef
+
+
### Compile ###
ifneq ($(CONFIG_PACKAGE_luci-core),)
ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
PKG_SELECTED_MODULES+=themes/fledermaus
endif
+ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
+ PKG_SELECTED_MODULES+=themes/openwrt.org
+endif
+
+ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
+ PKG_SELECTED_MODULES+=i18n/german
+endif
+ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
+ PKG_SELECTED_MODULES+=i18n/english
+endif
$(eval $(call BuildPackage,luci-core))
$(eval $(call BuildPackage,luci-sgi-webuci))
$(eval $(call BuildPackage,luci-theme-fledermaus))
+$(eval $(call BuildPackage,luci-theme-openwrt))
+
+$(eval $(call BuildPackage,luci-i18n-german))
+$(eval $(call BuildPackage,luci-i18n-english))