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)
86 define Package/luci/webtemplate
87 $(call Package/luci/libtemplate)
88 SUBMENU:=LuCI 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_source
116 config PACKAGE_luci-core_compile
119 config PACKAGE_luci-core_stripped
122 config PACKAGE_luci-core_source
128 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
132 ifneq ($(CONFIG_PACKAGE_luci-core_stripped),)
138 define Package/luci-cbi
139 $(call Package/luci/libtemplate)
141 TITLE:=Configuration Binding Interface
144 define Package/luci-cbi/install
145 $(call Package/luci/install/template,$(1),libs/cbi)
149 define Package/luci-uci
150 $(call Package/luci/libtemplate)
152 TITLE:=High-Level UCI API
155 define Package/luci-uci/install
156 $(call Package/luci/install/template,$(1),libs/uci)
160 define Package/luci-fastindex
161 $(call Package/luci/libtemplate)
162 TITLE:=Fastindex indexing module
165 define Package/luci-fastindex/install
166 $(call Package/luci/install/template,$(1),libs/fastindex)
170 define Package/luci-http
171 $(call Package/luci/libtemplate)
172 TITLE:=HTTP Protocol implementation
175 define Package/luci-http/install
176 $(call Package/luci/install/template,$(1),libs/http)
180 define Package/luci-web
181 $(call Package/luci/libtemplate)
182 DEPENDS+=+luci-http +luci-addons +luci-uci +luci-sgi-cgi
183 TITLE:=MVC Webframework
186 define Package/luci-web/conffiles
190 define Package/luci-web/install
191 $(call Package/luci/install/template,$(1),libs/web)
198 define Package/luci-httpd
199 $(call Package/luci/httpdtemplate)
200 DEPENDS:=+luci-http +luasocket
204 define Package/luci-httpd/install
205 $(call Package/luci/install/template,$(1),libs/httpd)
210 ### Community Packages ###
212 define Package/luci-ff-halle
213 $(call Package/luci/fftemplate)
215 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
216 +luci-app-ffwizard-leipzig \
217 +luci-theme-fledermaus \
219 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
221 TITLE:=Freifunk Halle Community Meta-Package
224 define Package/luci-ff-halle/install
225 $(call Package/luci/install/template,$(1),applications/community-halle)
229 define Package/luci-ff-leipzig
230 $(call Package/luci/fftemplate)
232 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
233 +luci-app-ffwizard-leipzig \
234 +luci-theme-fledermaus \
236 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
238 TITLE:=Freifunk Leipzig Community Meta-Package
241 define Package/luci-ff-leipzig/install
242 $(call Package/luci/install/template,$(1),applications/community-leipzig)
246 define Package/luci-ff-hannover
247 $(call Package/luci/fftemplate)
249 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
250 +luci-theme-fledermaus \
252 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
253 TITLE:=Freifunk Hannover Community Meta-Package
254 URL:=http://www.freifunk-hannover.de/
255 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
258 define Package/luci-ff-hannover/install
259 $(call Package/luci/install/template,$(1),applications/community-hannover)
263 define Package/luci-ff-berlin
264 $(call Package/luci/fftemplate)
266 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
267 +luci-theme-fledermaus \
269 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
270 TITLE:=Freifunk Berlin Community Meta-Package
273 define Package/luci-ff-berlin/install
274 $(call Package/luci/install/template,$(1),applications/community-berlin)
277 define Package/luci-ff-augsburg
278 $(call Package/luci/fftemplate)
280 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
281 +luci-theme-fledermaus \
283 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
284 TITLE:=Freifunk Augsburg Community Meta-Package
287 define Package/luci-ff-augsburg/install
288 $(call Package/luci/install/template,$(1),applications/community-augsburg)
293 define Package/luci-admin-core
294 $(call Package/luci/webtemplate)
295 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
296 TITLE:=Web UI Core Module
299 define Package/luci-admin-core/install
300 $(call Package/luci/install/template,$(1),modules/admin-core)
304 define Package/luci-admin-mini
305 $(call Package/luci/webtemplate)
306 DEPENDS+=+luci-admin-core
307 TITLE:=LuCI Essentials - casual user's interface
310 define Package/luci-admin-mini/install
311 $(call Package/luci/install/template,$(1),modules/admin-mini)
315 define Package/luci-admin-full
316 $(call Package/luci/webtemplate)
317 DEPENDS+=+luci-admin-core
318 TITLE:=LuCI Administration - power user's interface
321 define Package/luci-admin-full/install
322 $(call Package/luci/install/template,$(1),modules/admin-full)
326 define Package/luci-mod-freifunk
327 $(call Package/luci/fftemplate)
328 DEPENDS:=+luci-admin-full
329 TITLE:=LuCI Freifunk module
332 define Package/luci-mod-freifunk/conffiles
336 define Package/luci-mod-freifunk/install
337 $(call Package/luci/install/template,$(1),modules/freifunk)
344 define Package/luci-app-ffwizard-leipzig
345 $(call Package/luci/fftemplate)
346 DEPENDS+=+luci-app-firewall
347 TITLE:=Freifunk Leipzig configuration wizard
350 define Package/luci-app-ffwizard-leipzig/install
351 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
355 define Package/luci-app-firewall
356 $(call Package/luci/webtemplate)
357 DEPENDS+=+luci-admin-core
358 TITLE:=Firewall and Portforwarding application
361 define Package/luci-app-firewall/conffiles
365 define Package/luci-app-firewall/install
366 $(call Package/luci/install/template,$(1),applications/luci-fw)
370 define Package/luci-app-olsr
371 $(call Package/luci/webtemplate)
372 DEPENDS+=+luci-admin-full +olsrd-mod-txtinfo
373 TITLE:=OLSR configuration and status module
376 define Package/luci-app-olsr/install
377 $(call Package/luci/install/template,$(1),applications/luci-olsr)
381 define Package/luci-app-qos
382 $(call Package/luci/webtemplate)
383 DEPENDS+=+luci-admin-core +qos-scripts
384 TITLE:=Quality of Service configuration module
387 define Package/luci-app-qos/install
388 $(call Package/luci/install/template,$(1),applications/luci-qos)
392 define Package/luci-app-splash
393 $(call Package/luci/fftemplate)
394 DEPENDS+=+luasocket +iptables-mod-nat +iptables-mod-ipopt
395 TITLE:=Freifunk DHCP-Splash application
398 define Package/luci-app-splash/conffiles
399 /etc/config/luci_splash
402 define Package/luci-app-splash/install
403 $(call Package/luci/install/template,$(1),applications/luci-splash)
407 define Package/luci-app-statistics
408 $(call Package/luci/webtemplate)
409 DEPENDS+=+luci-admin-full +collectd +collectd-mod-rrdtool1 +rrdtool1
410 TITLE:=LuCI Statistics Application
413 define Package/luci-app-statistics/conffiles
414 /etc/config/luci_statistics
417 define Package/luci-app-statistics/install
418 $(call Package/luci/install/template,$(1),applications/luci-statistics)
422 define Package/luci-app-upnp
423 $(call Package/luci/webtemplate)
424 DEPENDS+=+luci-admin-core +miniupnpd
425 TITLE:=Universal Plug & Play configuration module
428 define Package/luci-app-upnp/install
429 $(call Package/luci/install/template,$(1),applications/luci-upnp)
433 define Package/luci-app-ntpc
434 $(call Package/luci/webtemplate)
435 DEPENDS+=+luci-admin-core +ntpclient
436 TITLE:=NTP time synchronisation client configuration module
439 define Package/luci-app-ntpc/install
440 $(call Package/luci/install/template,$(1),applications/luci-ntpc)
444 define Package/luci-app-ddns
445 $(call Package/luci/webtemplate)
446 DEPENDS+=+luci-admin-core +ddns-scripts
447 TITLE:=Dynamic DNS configuration module
450 define Package/luci-app-ddns/install
451 $(call Package/luci/install/template,$(1),applications/luci-ddns)
455 ### Server Gateway Interfaces ###
457 define Package/luci-sgi-cgi
458 $(call Package/luci/libtemplate)
462 define Package/luci-sgi-cgi/install
463 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
466 define Package/luci-sgi-luci
467 $(call Package/luci/libtemplate)
469 TITLE:=SGI for LuCI HTTPD
472 define Package/luci-sgi-luci/install
473 $(call Package/luci/install/template,$(1),libs/sgi-luci)
476 define Package/luci-sgi-webuci
477 $(call Package/luci/libtemplate)
478 TITLE:=SGI for Webuci
481 define Package/luci-sgi-webuci/install
482 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
486 define Package/luci-theme-fledermaus
487 $(call Package/luci/fftemplate)
489 TITLE:=Fledermaus Theme
492 define Package/luci-theme-fledermaus/install
493 $(call Package/luci/install/template,$(1),themes/fledermaus)
496 define Package/luci-theme-openwrt
497 $(call Package/luci/thtemplate)
498 TITLE:=OpenWRT.org (default)
501 define Package/luci-theme-openwrt/install
502 $(call Package/luci/install/template,$(1),themes/openwrt.org)
506 define Package/luci-i18n-german
507 $(call Package/luci/i18ntemplate)
511 define Package/luci-i18n-german/install
512 $(call Package/luci/install/template,$(1),i18n/german)
516 define Package/luci-i18n-english
517 $(call Package/luci/i18ntemplate)
521 define Package/luci-i18n-english/install
522 $(call Package/luci/install/template,$(1),i18n/english)
526 define Package/luci-i18n-french
527 $(call Package/luci/i18ntemplate)
531 define Package/luci-i18n-french/install
532 $(call Package/luci/install/template,$(1),i18n/french)
539 ifneq ($(CONFIG_PACKAGE_luci-core),)
540 PKG_SELECTED_MODULES+=libs/core
542 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
543 PKG_SELECTED_MODULES+=libs/cbi
545 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
546 PKG_SELECTED_MODULES+=libs/fastindex
548 ifneq ($(CONFIG_PACKAGE_luci-http),)
549 PKG_SELECTED_MODULES+=libs/http
551 ifneq ($(CONFIG_PACKAGE_luci-uci),)
552 PKG_SELECTED_MODULES+=libs/uci
554 ifneq ($(CONFIG_PACKAGE_luci-web),)
555 PKG_SELECTED_MODULES+=libs/web
558 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
559 PKG_SELECTED_MODULES+=libs/httpd
562 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
563 PKG_SELECTED_MODULES+=applications/community-halle
565 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
566 PKG_SELECTED_MODULES+=applications/community-leipzig
568 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
569 PKG_SELECTED_MODULES+=applications/community-hannover
571 ifneq ($(CONFIG_PACKAGE_luci-ff-berlin),)
572 PKG_SELECTED_MODULES+=applications/community-berlin
574 ifneq ($(CONFIG_PACKAGE_luci-ff-augsburg),)
575 PKG_SELECTED_MODULES+=applications/community-augsburg
578 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
579 PKG_SELECTED_MODULES+=modules/admin-core
581 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
582 PKG_SELECTED_MODULES+=modules/admin-mini
584 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
585 PKG_SELECTED_MODULES+=modules/admin-full
587 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
588 PKG_SELECTED_MODULES+=modules/freifunk
591 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
592 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
594 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
595 PKG_SELECTED_MODULES+=applications/luci-fw
597 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
598 PKG_SELECTED_MODULES+=applications/luci-olsr
600 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
601 PKG_SELECTED_MODULES+=applications/luci-qos
603 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
604 PKG_SELECTED_MODULES+=applications/luci-splash
606 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
607 PKG_SELECTED_MODULES+=applications/luci-statistics
609 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
610 PKG_SELECTED_MODULES+=applications/luci-upnp
612 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
613 PKG_SELECTED_MODULES+=applications/luci-ntpc
615 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
616 PKG_SELECTED_MODULES+=applications/luci-ddns
619 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
620 PKG_SELECTED_MODULES+=libs/sgi-cgi
622 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
623 PKG_SELECTED_MODULES+=libs/sgi-luci
625 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
626 PKG_SELECTED_MODULES+=libs/sgi-webuci
629 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
630 PKG_SELECTED_MODULES+=themes/fledermaus
632 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
633 PKG_SELECTED_MODULES+=themes/openwrt.org
636 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
637 PKG_SELECTED_MODULES+=i18n/german
639 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
640 PKG_SELECTED_MODULES+=i18n/english
642 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
643 PKG_SELECTED_MODULES+=i18n/french
648 MODULES="$(PKG_SELECTED_MODULES)" \
649 LUA_TARGET="$(LUA_TARGET)" \
650 LUA_SHLIBS="-llua -lm" \
651 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
652 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
656 $(eval $(call BuildPackage,luci-core))
657 $(eval $(call BuildPackage,luci-cbi))
658 $(eval $(call BuildPackage,luci-fastindex))
659 $(eval $(call BuildPackage,luci-http))
660 $(eval $(call BuildPackage,luci-uci))
661 $(eval $(call BuildPackage,luci-web))
663 $(eval $(call BuildPackage,luci-httpd))
665 $(eval $(call BuildPackage,luci-ff-halle))
666 $(eval $(call BuildPackage,luci-ff-leipzig))
667 $(eval $(call BuildPackage,luci-ff-hannover))
668 $(eval $(call BuildPackage,luci-ff-berlin))
669 $(eval $(call BuildPackage,luci-ff-augsburg))
671 $(eval $(call BuildPackage,luci-admin-core))
672 $(eval $(call BuildPackage,luci-admin-mini))
673 $(eval $(call BuildPackage,luci-admin-full))
674 $(eval $(call BuildPackage,luci-mod-freifunk))
676 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
677 $(eval $(call BuildPackage,luci-app-firewall))
678 $(eval $(call BuildPackage,luci-app-olsr))
679 $(eval $(call BuildPackage,luci-app-qos))
680 $(eval $(call BuildPackage,luci-app-splash))
681 $(eval $(call BuildPackage,luci-app-statistics))
682 $(eval $(call BuildPackage,luci-app-upnp))
683 $(eval $(call BuildPackage,luci-app-ntpc))
684 $(eval $(call BuildPackage,luci-app-ddns))
686 $(eval $(call BuildPackage,luci-sgi-cgi))
687 $(eval $(call BuildPackage,luci-sgi-luci))
688 $(eval $(call BuildPackage,luci-sgi-webuci))
690 $(eval $(call BuildPackage,luci-theme-fledermaus))
691 $(eval $(call BuildPackage,luci-theme-openwrt))
693 $(eval $(call BuildPackage,luci-i18n-german))
694 $(eval $(call BuildPackage,luci-i18n-english))
695 $(eval $(call BuildPackage,luci-i18n-french))