1 include $(TOPDIR)/rules.mk
6 USELOCAL:=$(shell grep luci ../../../.project 2>/dev/null >/dev/null && echo 1)
15 PKG_SOURCE_URL:=https://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH)
17 PKG_REV:=$(shell LC_ALL=C svn info ${PKG_SOURCE_URL} | sed -ne's/^Last Changed Rev: //p')
18 PKG_VERSION:=0.7+svn$(PKG_REV)
20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
23 PKG_SOURCE_VERSION:=$(PKG_REV)
26 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
27 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
29 PKG_BUILD_DEPENDS:=libnotimpl
31 PKG_SELECTED_MODULES:=
34 include $(INCLUDE_DIR)/package.mk
38 mkdir -p $(PKG_BUILD_DIR)
39 $(TAR) c -C ../../../ . \
40 --exclude=.pc --exclude=.svn --exclude=.git \
41 --exclude='boa-0*' --exclude='*.o' --exclude='*.so' \
43 tar x -C $(PKG_BUILD_DIR)/
47 define Build/Configure
52 define Package/luci/libtemplate
54 CATEGORY:=Administration
55 TITLE:=LuCI - Lua Configuration Interface
56 URL:=http://luci.freifunk-halle.net/
57 MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
58 SUBMENU:=LuCI - Libraries
62 define Package/luci/fftemplate
63 $(call Package/luci/libtemplate)
64 SUBMENU:=LuCI - Freifunk Support (GERMAN ONLY)
65 DEPENDS:=+luci-mod-freifunk
68 define Package/luci/httpdtemplate
69 $(call Package/luci/libtemplate)
70 SUBMENU:=LuCI - Non-Forking HTTP-Daemon (EXPERIMENTAL)
74 define Package/luci/i18ntemplate
75 $(call Package/luci/libtemplate)
76 SUBMENU:=LuCI - Translations
80 define Package/luci/thtemplate
81 $(call Package/luci/libtemplate)
82 SUBMENU:=LuCI - Themes
86 define Package/luci/webtemplate
87 $(call Package/luci/libtemplate)
88 SUBMENU:=LuCI - Webinterface Components
92 define Package/luci/install/template
93 $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
94 $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
101 define Package/luci-core
102 $(call Package/luci/libtemplate)
103 DEPENDS:=+lua +luaposix
104 TITLE:=LuCI core libraries
107 define Package/luci-core/install
108 $(call Package/luci/install/template,$(1),libs/core)
111 define Package/luci-core/config
113 prompt "Build Target"
114 default PACKAGE_luci-core_compile
116 config PACKAGE_luci-core_compile
119 config PACKAGE_luci-core_source
125 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
131 define Package/luci-cbi
132 $(call Package/luci/libtemplate)
134 TITLE:=Configuration Binding Interface
137 define Package/luci-cbi/install
138 $(call Package/luci/install/template,$(1),libs/cbi)
142 define Package/luci-uci
143 $(call Package/luci/libtemplate)
145 TITLE:=High-Level UCI API
148 define Package/luci-uci/install
149 $(call Package/luci/install/template,$(1),libs/uci)
153 define Package/luci-fastindex
154 $(call Package/luci/libtemplate)
155 TITLE:=Fastindex indexing module
158 define Package/luci-fastindex/install
159 $(call Package/luci/install/template,$(1),libs/fastindex)
163 define Package/luci-http
164 $(call Package/luci/libtemplate)
165 TITLE:=HTTP Protocol implementation
168 define Package/luci-http/install
169 $(call Package/luci/install/template,$(1),libs/http)
173 define Package/luci-web
174 $(call Package/luci/libtemplate)
175 DEPENDS+=+luci-http +luci-addons +luci-uci +luci-sgi-cgi
176 TITLE:=MVC Webframework
179 define Package/luci-web/conffiles
183 define Package/luci-web/install
184 $(call Package/luci/install/template,$(1),libs/web)
191 define Package/luci-httpd
192 $(call Package/luci/httpdtemplate)
193 DEPENDS:=+luci-http +luasocket
197 define Package/luci-httpd/install
198 $(call Package/luci/install/template,$(1),libs/httpd)
203 ### Community Packages ###
205 define Package/luci-ff-halle
206 $(call Package/luci/fftemplate)
208 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
209 +luci-app-ffwizard-leipzig \
210 +luci-theme-fledermaus \
212 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
214 TITLE:=Freifunk Halle Community Meta-Package
217 define Package/luci-ff-halle/install
218 $(call Package/luci/install/template,$(1),applications/community-halle)
222 define Package/luci-ff-leipzig
223 $(call Package/luci/fftemplate)
225 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
226 +luci-app-ffwizard-leipzig \
227 +luci-theme-fledermaus \
229 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
231 TITLE:=Freifunk Leipzig Community Meta-Package
234 define Package/luci-ff-leipzig/install
235 $(call Package/luci/install/template,$(1),applications/community-leipzig)
239 define Package/luci-ff-hannover
240 $(call Package/luci/fftemplate)
242 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
243 +luci-theme-fledermaus \
245 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
246 TITLE:=Freifunk Hannover Community Meta-Package
247 URL:=http://www.freifunk-hannover.de/
248 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
251 define Package/luci-ff-hannover/install
252 $(call Package/luci/install/template,$(1),applications/community-hannover)
256 define Package/luci-ff-berlin
257 $(call Package/luci/fftemplate)
259 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
260 +luci-theme-fledermaus \
262 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
263 TITLE:=Freifunk Berlin Community Meta-Package
266 define Package/luci-ff-berlin/install
267 $(call Package/luci/install/template,$(1),applications/community-berlin)
270 define Package/luci-ff-augsburg
271 $(call Package/luci/fftemplate)
273 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
274 +luci-theme-fledermaus \
276 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
277 TITLE:=Freifunk Augsburg Community Meta-Package
280 define Package/luci-ff-augsburg/install
281 $(call Package/luci/install/template,$(1),applications/community-augsburg)
286 define Package/luci-mod-admin-core
287 $(call Package/luci/webtemplate)
288 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
289 TITLE:=Administration core module
292 define Package/luci-mod-admin-core/install
293 $(call Package/luci/install/template,$(1),modules/admin-core)
297 define Package/luci-mod-admin-mini
298 $(call Package/luci/webtemplate)
299 DEPENDS+=+luci-mod-admin-core
300 TITLE:=Simplified Administration module (INCOMPLETE)
303 define Package/luci-mod-admin-mini/install
304 $(call Package/luci/install/template,$(1),modules/admin-mini)
308 define Package/luci-mod-admin-full
309 $(call Package/luci/webtemplate)
310 DEPENDS+=+luci-mod-admin-core
311 TITLE:=Full featured Administration module
314 define Package/luci-mod-admin-full/install
315 $(call Package/luci/install/template,$(1),modules/admin-full)
319 define Package/luci-mod-freifunk
320 $(call Package/luci/fftemplate)
321 DEPENDS:=+luci-mod-admin-full
322 TITLE:=LuCI Freifunk module
325 define Package/luci-mod-freifunk/conffiles
329 define Package/luci-mod-freifunk/install
330 $(call Package/luci/install/template,$(1),modules/freifunk)
337 define Package/luci-app-ffwizard-leipzig
338 $(call Package/luci/fftemplate)
339 DEPENDS+=+luci-app-firewall
340 TITLE:=Freifunk Leipzig configuration wizard
343 define Package/luci-app-ffwizard-leipzig/install
344 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
348 define Package/luci-app-firewall
349 $(call Package/luci/webtemplate)
350 DEPENDS+=+luci-mod-admin-full
351 TITLE:=Firewall and Portforwarding application
354 define Package/luci-app-firewall/conffiles
358 define Package/luci-app-firewall/install
359 $(call Package/luci/install/template,$(1),applications/luci-fw)
363 define Package/luci-app-olsr
364 $(call Package/luci/webtemplate)
365 DEPENDS+=+luci-mod-admin-full +olsrd-mod-txtinfo
366 TITLE:=OLSR configuration and status module
369 define Package/luci-app-olsr/install
370 $(call Package/luci/install/template,$(1),applications/luci-olsr)
374 define Package/luci-app-qos
375 $(call Package/luci/webtemplate)
376 DEPENDS+=+luci-mod-admin-full +qos-scripts
377 TITLE:=Quality of Service configuration module
380 define Package/luci-app-qos/install
381 $(call Package/luci/install/template,$(1),applications/luci-qos)
385 define Package/luci-app-splash
386 $(call Package/luci/fftemplate)
387 DEPENDS+=+luasocket +iptables-mod-nat +iptables-mod-ipopt
388 TITLE:=Freifunk DHCP-Splash application
391 define Package/luci-app-splash/conffiles
392 /etc/config/luci_splash
395 define Package/luci-app-splash/install
396 $(call Package/luci/install/template,$(1),applications/luci-splash)
400 define Package/luci-app-statistics
401 $(call Package/luci/webtemplate)
402 DEPENDS+=+luci-mod-admin-full +collectd +collectd-mod-rrdtool1 +rrdtool1
403 TITLE:=LuCI Statistics Application
406 define Package/luci-app-statistics/conffiles
407 /etc/config/luci_statistics
410 define Package/luci-app-statistics/install
411 $(call Package/luci/install/template,$(1),applications/luci-statistics)
415 ### Server Gateway Interfaces ###
417 define Package/luci-sgi-cgi
418 $(call Package/luci/libtemplate)
422 define Package/luci-sgi-cgi/install
423 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
426 define Package/luci-sgi-luci
427 $(call Package/luci/libtemplate)
429 TITLE:=SGI for LuCI HTTPD
432 define Package/luci-sgi-luci/install
433 $(call Package/luci/install/template,$(1),libs/sgi-luci)
436 define Package/luci-sgi-webuci
437 $(call Package/luci/libtemplate)
438 TITLE:=SGI for Webuci
441 define Package/luci-sgi-webuci/install
442 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
446 define Package/luci-theme-fledermaus
447 $(call Package/luci/fftemplate)
449 TITLE:=Fledermaus Theme
452 define Package/luci-theme-fledermaus/install
453 $(call Package/luci/install/template,$(1),themes/fledermaus)
456 define Package/luci-theme-openwrt
457 $(call Package/luci/thtemplate)
458 TITLE:=OpenWRT.org (default)
461 define Package/luci-theme-openwrt/install
462 $(call Package/luci/install/template,$(1),themes/openwrt.org)
466 define Package/luci-i18n-german
467 $(call Package/luci/i18ntemplate)
471 define Package/luci-i18n-german/install
472 $(call Package/luci/install/template,$(1),i18n/german)
476 define Package/luci-i18n-english
477 $(call Package/luci/i18ntemplate)
481 define Package/luci-i18n-english/install
482 $(call Package/luci/install/template,$(1),i18n/english)
486 define Package/luci-i18n-french
487 $(call Package/luci/i18ntemplate)
491 define Package/luci-i18n-french/install
492 $(call Package/luci/install/template,$(1),i18n/french)
499 ifneq ($(CONFIG_PACKAGE_luci-core),)
500 PKG_SELECTED_MODULES+=libs/core
502 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
503 PKG_SELECTED_MODULES+=libs/cbi
505 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
506 PKG_SELECTED_MODULES+=libs/fastindex
508 ifneq ($(CONFIG_PACKAGE_luci-http),)
509 PKG_SELECTED_MODULES+=libs/http
511 ifneq ($(CONFIG_PACKAGE_luci-uci),)
512 PKG_SELECTED_MODULES+=libs/uci
514 ifneq ($(CONFIG_PACKAGE_luci-web),)
515 PKG_SELECTED_MODULES+=libs/web
518 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
519 PKG_SELECTED_MODULES+=libs/httpd
522 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
523 PKG_SELECTED_MODULES+=applications/community-halle
525 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
526 PKG_SELECTED_MODULES+=applications/community-leipzig
528 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
529 PKG_SELECTED_MODULES+=applications/community-hannover
531 ifneq ($(CONFIG_PACKAGE_luci-ff-berlin),)
532 PKG_SELECTED_MODULES+=applications/community-berlin
534 ifneq ($(CONFIG_PACKAGE_luci-ff-augsburg),)
535 PKG_SELECTED_MODULES+=applications/community-augsburg
538 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
539 PKG_SELECTED_MODULES+=modules/admin-core
541 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-mini),)
542 PKG_SELECTED_MODULES+=modules/admin-mini
544 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-full),)
545 PKG_SELECTED_MODULES+=modules/admin-full
547 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
548 PKG_SELECTED_MODULES+=modules/freifunk
551 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
552 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
554 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
555 PKG_SELECTED_MODULES+=applications/luci-fw
557 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
558 PKG_SELECTED_MODULES+=applications/luci-olsr
560 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
561 PKG_SELECTED_MODULES+=applications/luci-qos
563 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
564 PKG_SELECTED_MODULES+=applications/luci-splash
566 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
567 PKG_SELECTED_MODULES+=applications/luci-statistics
570 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
571 PKG_SELECTED_MODULES+=libs/sgi-cgi
573 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
574 PKG_SELECTED_MODULES+=libs/sgi-luci
576 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
577 PKG_SELECTED_MODULES+=libs/sgi-webuci
580 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
581 PKG_SELECTED_MODULES+=themes/fledermaus
583 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
584 PKG_SELECTED_MODULES+=themes/openwrt.org
587 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
588 PKG_SELECTED_MODULES+=i18n/german
590 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
591 PKG_SELECTED_MODULES+=i18n/english
593 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
594 PKG_SELECTED_MODULES+=i18n/french
599 MODULES="$(PKG_SELECTED_MODULES)" \
600 LUA_TARGET="$(LUA_TARGET)" \
601 LUA_SHLIBS="-llua -lm" \
602 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
603 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
607 $(eval $(call BuildPackage,luci-core))
608 $(eval $(call BuildPackage,luci-cbi))
609 $(eval $(call BuildPackage,luci-fastindex))
610 $(eval $(call BuildPackage,luci-http))
611 $(eval $(call BuildPackage,luci-uci))
612 $(eval $(call BuildPackage,luci-web))
614 $(eval $(call BuildPackage,luci-httpd))
616 $(eval $(call BuildPackage,luci-ff-halle))
617 $(eval $(call BuildPackage,luci-ff-leipzig))
618 $(eval $(call BuildPackage,luci-ff-hannover))
619 $(eval $(call BuildPackage,luci-ff-berlin))
620 $(eval $(call BuildPackage,luci-ff-augsburg))
622 $(eval $(call BuildPackage,luci-mod-admin-core))
623 $(eval $(call BuildPackage,luci-mod-admin-mini))
624 $(eval $(call BuildPackage,luci-mod-admin-full))
625 $(eval $(call BuildPackage,luci-mod-freifunk))
627 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
628 $(eval $(call BuildPackage,luci-app-firewall))
629 $(eval $(call BuildPackage,luci-app-olsr))
630 $(eval $(call BuildPackage,luci-app-qos))
631 $(eval $(call BuildPackage,luci-app-splash))
632 $(eval $(call BuildPackage,luci-app-statistics))
634 $(eval $(call BuildPackage,luci-sgi-cgi))
635 $(eval $(call BuildPackage,luci-sgi-luci))
636 $(eval $(call BuildPackage,luci-sgi-webuci))
638 $(eval $(call BuildPackage,luci-theme-fledermaus))
639 $(eval $(call BuildPackage,luci-theme-openwrt))
641 $(eval $(call BuildPackage,luci-i18n-german))
642 $(eval $(call BuildPackage,luci-i18n-english))
643 $(eval $(call BuildPackage,luci-i18n-french))