1 include $(TOPDIR)/rules.mk
4 PKG_SOURCE_URL:=https://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH)
5 PKG_REV:=$(shell LC_ALL=C svn info ${PKG_SOURCE_URL} | sed -ne's/^Last Changed Rev: //p')
8 PKG_VERSION:=0.7+svn$(PKG_REV)
11 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
12 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
14 PKG_SOURCE_VERSION:=$(PKG_REV)
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
20 PKG_SELECTED_MODULES:=
23 include $(INCLUDE_DIR)/package.mk
25 define Build/Configure
30 define Package/luci/libtemplate
32 CATEGORY:=Administration
33 TITLE:=LuCI - Lua Configuration Interface
34 URL:=http://luci.freifunk-halle.net/
35 MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
36 SUBMENU:=LuCI - Libraries
40 define Package/luci/fftemplate
41 $(call Package/luci/libtemplate)
42 SUBMENU:=LuCI - Freifunk Support
43 DEPENDS:=+luci-mod-freifunk
46 define Package/luci/i18ntemplate
47 $(call Package/luci/libtemplate)
48 SUBMENU:=LuCI - Translations
52 define Package/luci/thtemplate
53 $(call Package/luci/libtemplate)
54 SUBMENU:=LuCI - Themes
58 define Package/luci/webtemplate
59 $(call Package/luci/libtemplate)
60 SUBMENU:=LuCI - Webinterface Components
64 define Package/luci/install/template
65 $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
66 $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
73 define Package/luci-core
74 $(call Package/luci/libtemplate)
75 DEPENDS:=+lua +luaposix
76 TITLE:=LuCI core libraries
79 define Package/luci-core/install
80 $(call Package/luci/install/template,$(1),libs/core)
83 define Package/luci-core/config
86 default PACKAGE_luci-core_compile
88 config PACKAGE_luci-core_compile
91 config PACKAGE_luci-core_source
97 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
103 define Package/luci-cbi
104 $(call Package/luci/libtemplate)
106 TITLE:=Configuration Binding Interface
109 define Package/luci-cbi/install
110 $(call Package/luci/install/template,$(1),libs/cbi)
114 define Package/luci-uci
115 $(call Package/luci/libtemplate)
117 TITLE:=High-Level UCI API
120 define Package/luci-uci/install
121 $(call Package/luci/install/template,$(1),libs/uci)
125 define Package/luci-fastindex
126 $(call Package/luci/libtemplate)
127 TITLE:=Fastindex indexing module
130 define Package/luci-fastindex/install
131 $(call Package/luci/install/template,$(1),libs/fastindex)
135 define Package/luci-web
136 $(call Package/luci/libtemplate)
137 DEPENDS+=+luci-addons +luci-uci
138 TITLE:=MVC Webframework
141 define Package/luci-web/conffiles
145 define Package/luci-web/install
146 $(call Package/luci/install/template,$(1),libs/web)
151 ### Community Packages ###
153 define Package/luci-ff-halle
154 $(call Package/luci/fftemplate)
156 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
157 +luci-app-ffwizard-leipzig \
158 +luci-theme-fledermaus \
160 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
162 TITLE:=Freifunk Halle Community Meta-Package
165 define Package/luci-ff-halle/install
166 $(call Package/luci/install/template,$(1),applications/community-halle)
170 define Package/luci-ff-leipzig
171 $(call Package/luci/fftemplate)
173 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
174 +luci-app-ffwizard-leipzig \
175 +luci-theme-fledermaus \
177 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
179 TITLE:=Freifunk Leipzig Community Meta-Package
182 define Package/luci-ff-leipzig/install
183 $(call Package/luci/install/template,$(1),applications/community-leipzig)
187 define Package/luci-ff-hannover
188 $(call Package/luci/fftemplate)
190 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
191 +luci-theme-fledermaus \
193 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
194 TITLE:=Freifunk Hannover Community Meta-Package
195 URL:=http://www.freifunk-hannover.de/
196 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
199 define Package/luci-ff-hannover/install
200 $(call Package/luci/install/template,$(1),applications/community-hannover)
206 define Package/luci-mod-admin-core
207 $(call Package/luci/webtemplate)
208 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
209 TITLE:=Administration module
212 define Package/luci-mod-admin-core/install
213 $(call Package/luci/install/template,$(1),modules/admin-core)
217 define Package/luci-mod-freifunk
218 $(call Package/luci/fftemplate)
219 DEPENDS:=+luci-mod-admin-core
220 TITLE:=LuCI Freifunk module
223 define Package/luci-mod-freifunk/conffiles
227 define Package/luci-mod-freifunk/install
228 $(call Package/luci/install/template,$(1),modules/freifunk)
235 define Package/luci-app-ffwizard-leipzig
236 $(call Package/luci/fftemplate)
237 DEPENDS+=+luci-app-firewall
238 TITLE:=Freifunk Leipzig configuration wizard
241 define Package/luci-app-ffwizard-leipzig/install
242 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
246 define Package/luci-app-firewall
247 $(call Package/luci/webtemplate)
248 DEPENDS+=+luci-mod-admin-core
249 TITLE:=Firewall and Portforwarding application
252 define Package/luci-app-firewall/conffiles
256 define Package/luci-app-firewall/install
257 $(call Package/luci/install/template,$(1),applications/luci-fw)
261 define Package/luci-app-olsr
262 $(call Package/luci/webtemplate)
263 DEPENDS+=+luci-mod-admin-core +olsrd-mod-txtinfo
264 TITLE:=OLSR configuration and status module
267 define Package/luci-app-olsr/install
268 $(call Package/luci/install/template,$(1),applications/luci-olsr)
272 define Package/luci-app-qos
273 $(call Package/luci/webtemplate)
274 DEPENDS+=+luci-mod-admin-core +qos-scripts
275 TITLE:=Quality of Service configuration module
278 define Package/luci-app-qos/install
279 $(call Package/luci/install/template,$(1),applications/luci-qos)
283 define Package/luci-app-splash
284 $(call Package/luci/fftemplate)
285 DEPENDS+=+iptables-mod-nat +iptables-mod-ipopt
286 TITLE:=Freifunk DHCP-Splash application
289 define Package/luci-app-splash/conffiles
290 /etc/config/luci_splash
293 define Package/luci-app-splash/install
294 $(call Package/luci/install/template,$(1),applications/luci-splash)
298 define Package/luci-app-statistics
299 $(call Package/luci/webtemplate)
300 DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
301 TITLE:=LuCI Statistics Application
304 define Package/luci-app-statistics/conffiles
305 /etc/config/luci_statistics
308 define Package/luci-app-statistics/install
309 $(call Package/luci/install/template,$(1),applications/luci-statistics)
313 ### Server Gateway Interfaces ###
315 define Package/luci-sgi-cgi
316 $(call Package/luci/libtemplate)
321 define Package/luci-sgi-cgi/install
322 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
325 define Package/luci-sgi-haserl
326 $(call Package/luci/libtemplate)
327 DEPENDS+=+luci-web +haserl-lua
328 TITLE:=SGI for Haserl
331 define Package/luci-sgi-haserl/install
332 $(call Package/luci/install/template,$(1),libs/sgi-haserl)
336 define Package/luci-sgi-webuci
337 $(call Package/luci/libtemplate)
339 TITLE:=SGI for Webuci
342 define Package/luci-sgi-webuci/install
343 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
347 define Package/luci-theme-fledermaus
348 $(call Package/luci/fftemplate)
350 TITLE:=Fledermaus Theme
353 define Package/luci-theme-fledermaus/install
354 $(call Package/luci/install/template,$(1),themes/fledermaus)
357 define Package/luci-theme-openwrt
358 $(call Package/luci/thtemplate)
359 TITLE:=OpenWRT.org (default)
362 define Package/luci-theme-openwrt/install
363 $(call Package/luci/install/template,$(1),themes/openwrt.org)
367 define Package/luci-i18n-german
368 $(call Package/luci/i18ntemplate)
372 define Package/luci-i18n-german/install
373 $(call Package/luci/install/template,$(1),i18n/german)
377 define Package/luci-i18n-english
378 $(call Package/luci/i18ntemplate)
379 TITLE:=English (incomplete)
382 define Package/luci-i18n-english/install
383 $(call Package/luci/install/template,$(1),i18n/english)
389 ifneq ($(CONFIG_PACKAGE_luci-core),)
390 PKG_SELECTED_MODULES+=libs/core
392 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
393 PKG_SELECTED_MODULES+=libs/cbi
395 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
396 PKG_SELECTED_MODULES+=libs/fastindex
398 ifneq ($(CONFIG_PACKAGE_luci-uci),)
399 PKG_SELECTED_MODULES+=libs/uci
401 ifneq ($(CONFIG_PACKAGE_luci-web),)
402 PKG_SELECTED_MODULES+=libs/web
405 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
406 PKG_SELECTED_MODULES+=applications/community-halle
408 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
409 PKG_SELECTED_MODULES+=applications/community-leipzig
411 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
412 PKG_SELECTED_MODULES+=applications/community-hannover
415 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
416 PKG_SELECTED_MODULES+=modules/admin-core
418 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
419 PKG_SELECTED_MODULES+=modules/freifunk
422 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
423 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
425 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
426 PKG_SELECTED_MODULES+=applications/luci-fw
428 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
429 PKG_SELECTED_MODULES+=applications/luci-olsr
431 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
432 PKG_SELECTED_MODULES+=applications/luci-qos
434 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
435 PKG_SELECTED_MODULES+=applications/luci-splash
437 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
438 PKG_SELECTED_MODULES+=applications/luci-statistics
441 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
442 PKG_SELECTED_MODULES+=libs/sgi-cgi
444 ifneq ($(CONFIG_PACKAGE_luci-sgi-haserl),)
445 PKG_SELECTED_MODULES+=libs/sgi-haserl
447 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
448 PKG_SELECTED_MODULES+=libs/sgi-webuci
451 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
452 PKG_SELECTED_MODULES+=themes/fledermaus
454 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
455 PKG_SELECTED_MODULES+=themes/openwrt.org
458 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
459 PKG_SELECTED_MODULES+=i18n/german
461 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
462 PKG_SELECTED_MODULES+=i18n/english
466 MAKE_FLAGS += MODULES="$(PKG_SELECTED_MODULES)" LUA_TARGET="$(LUA_TARGET)" CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" LDFLAGS="$(TARGET_LDFLAGS)"
469 $(eval $(call BuildPackage,luci-core))
470 $(eval $(call BuildPackage,luci-cbi))
471 $(eval $(call BuildPackage,luci-fastindex))
472 $(eval $(call BuildPackage,luci-uci))
473 $(eval $(call BuildPackage,luci-web))
475 $(eval $(call BuildPackage,luci-ff-halle))
476 $(eval $(call BuildPackage,luci-ff-leipzig))
477 $(eval $(call BuildPackage,luci-ff-hannover))
479 $(eval $(call BuildPackage,luci-mod-admin-core))
480 $(eval $(call BuildPackage,luci-mod-freifunk))
482 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
483 $(eval $(call BuildPackage,luci-app-firewall))
484 $(eval $(call BuildPackage,luci-app-olsr))
485 $(eval $(call BuildPackage,luci-app-qos))
486 $(eval $(call BuildPackage,luci-app-splash))
487 $(eval $(call BuildPackage,luci-app-statistics))
489 $(eval $(call BuildPackage,luci-sgi-cgi))
490 $(eval $(call BuildPackage,luci-sgi-haserl))
491 $(eval $(call BuildPackage,luci-sgi-webuci))
493 $(eval $(call BuildPackage,luci-theme-fledermaus))
494 $(eval $(call BuildPackage,luci-theme-openwrt))
496 $(eval $(call BuildPackage,luci-i18n-german))
497 $(eval $(call BuildPackage,luci-i18n-english))