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:=
define Build/Compile
- for i in '$(PKG_SELECTED_MODULES)'; do $(MAKE) -C$(PKG_BUILD_DIR)/$$i build LUA_TARGET=$(LUA_TARGET); done
+ for i in $(PKG_SELECTED_MODULES); do $(MAKE) -C$(PKG_BUILD_DIR)/$$$$i build LUA_TARGET=$(LUA_TARGET); done
endef
### Templates ###
DEPENDS:=+luci-mod-freifunk
endef
+define Package/luci/thtemplate
+ $(call Package/luci/libtemplate)
+ SUBMENU:=LuCI - Themes
+ DEPENDS:=+luci-web
+endef
+
define Package/luci/webtemplate
$(call Package/luci/libtemplate)
SUBMENU:=LuCI - Webinterface Components
$(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
define Package/luci-web/install
$(call Package/luci/install/template,$(1),libs/web)
- $(call Package/luci/install/template,$(1),themes/fledermaus)
endef
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
+ DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt
TITLE:=Administration module
endef
$(call Package/luci/install/template,$(1),libs/sgi-webuci)
endef
-### Compile Templates ###
+### Templates ###
+define Package/luci-theme-fledermaus
+ $(call Package/luci/thtemplate)
+ TITLE:=Fledermaus (Freifunk 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
+
+
+### Compile ###
ifneq ($(CONFIG_PACKAGE_luci-core),)
PKG_SELECTED_MODULES+=libs/core
endif
ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
endif
+ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
+ PKG_SELECTED_MODULES+=applications/luci-fw
+endif
ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
PKG_SELECTED_MODULES+=applications/luci-splash
endif
PKG_SELECTED_MODULES+=libs/sgi-webuci
endif
+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
+
$(eval $(call BuildPackage,luci-core))
$(eval $(call BuildPackage,luci-cbi))
$(eval $(call BuildPackage,luci-sgi-haserl))
$(eval $(call BuildPackage,luci-sgi-webuci))
+
+$(eval $(call BuildPackage,luci-theme-fledermaus))
+$(eval $(call BuildPackage,luci-theme-openwrt))