1 include $(TOPDIR)/rules.mk
6 USELOCAL:=$(shell grep luci ../../../.project 2>/dev/null >/dev/null && echo 1)
15 PKG_SOURCE_URL:=http://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 (PARTLY BROKEN)
65 DEPENDS:=+luci-mod-freifunk @BROKEN
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 +bitlib
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-ipkg
181 $(call Package/luci/libtemplate)
182 TITLE:=LuCI IPKG/OPKG call abstraction library
185 define Package/luci-ipkg/install
186 $(call Package/luci/install/template,$(1),libs/ipkg)
190 define Package/luci-sys
191 $(call Package/luci/libtemplate)
192 TITLE:=LuCI Linux/POSIX system library
195 define Package/luci-sys/install
196 $(call Package/luci/install/template,$(1),libs/sys)
200 define Package/luci-web
201 $(call Package/luci/libtemplate)
202 DEPENDS+=+luci-http +luci-sys +luci-addons +luci-uci +luci-sgi-cgi
203 TITLE:=MVC Webframework
206 define Package/luci-web/conffiles
210 define Package/luci-web/install
211 $(call Package/luci/install/template,$(1),libs/web)
218 define Package/luci-httpd
219 $(call Package/luci/httpdtemplate)
220 DEPENDS:=+luci-http +luasocket
224 define Package/luci-httpd/install
225 $(call Package/luci/install/template,$(1),libs/httpd)
230 ### Community Packages ###
232 define Package/luci-ff-halle
233 $(call Package/luci/fftemplate)
235 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
236 +luci-app-ffwizard-leipzig \
237 +luci-theme-fledermaus \
239 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
241 TITLE:=Freifunk Halle Community Meta-Package
244 define Package/luci-ff-halle/install
245 $(call Package/luci/install/template,$(1),applications/community-halle)
249 define Package/luci-ff-leipzig
250 $(call Package/luci/fftemplate)
252 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
253 +luci-app-ffwizard-leipzig \
254 +luci-theme-fledermaus \
256 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
258 TITLE:=Freifunk Leipzig Community Meta-Package
261 define Package/luci-ff-leipzig/install
262 $(call Package/luci/install/template,$(1),applications/community-leipzig)
266 define Package/luci-ff-hannover
267 $(call Package/luci/fftemplate)
269 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
270 +luci-theme-fledermaus \
272 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
273 TITLE:=Freifunk Hannover Community Meta-Package
274 URL:=http://www.freifunk-hannover.de/
275 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
278 define Package/luci-ff-hannover/install
279 $(call Package/luci/install/template,$(1),applications/community-hannover)
283 define Package/luci-ff-berlin
284 $(call Package/luci/fftemplate)
286 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
287 +luci-theme-fledermaus \
289 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
290 TITLE:=Freifunk Berlin Community Meta-Package
293 define Package/luci-ff-berlin/install
294 $(call Package/luci/install/template,$(1),applications/community-berlin)
297 define Package/luci-ff-augsburg
298 $(call Package/luci/fftemplate)
300 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
301 +luci-theme-fledermaus \
303 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
304 TITLE:=Freifunk Augsburg Community Meta-Package
307 define Package/luci-ff-augsburg/install
308 $(call Package/luci/install/template,$(1),applications/community-augsburg)
313 define Package/luci-admin-core
314 $(call Package/luci/webtemplate)
315 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
316 TITLE:=Web UI Core Module
319 define Package/luci-admin-core/install
320 $(call Package/luci/install/template,$(1),modules/admin-core)
324 define Package/luci-admin-mini
325 $(call Package/luci/webtemplate)
326 DEPENDS+=+luci-admin-core
327 TITLE:=LuCI Essentials - casual user's interface
330 define Package/luci-admin-mini/install
331 $(call Package/luci/install/template,$(1),modules/admin-mini)
335 define Package/luci-admin-full
336 $(call Package/luci/webtemplate)
337 DEPENDS+=+luci-admin-core +luci-ipkg
338 TITLE:=LuCI Administration - power user's interface
341 define Package/luci-admin-full/install
342 $(call Package/luci/install/template,$(1),modules/admin-full)
346 define Package/luci-mod-freifunk
347 $(call Package/luci/fftemplate)
348 DEPENDS:=+luci-admin-full
349 TITLE:=LuCI Freifunk module
352 define Package/luci-mod-freifunk/conffiles
356 define Package/luci-mod-freifunk/install
357 $(call Package/luci/install/template,$(1),modules/freifunk)
364 define Package/luci-app-ffwizard-leipzig
365 $(call Package/luci/fftemplate)
366 DEPENDS+=+luci-app-firewall
367 TITLE:=Freifunk Leipzig configuration wizard
370 define Package/luci-app-ffwizard-leipzig/install
371 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
375 define Package/luci-app-firewall
376 $(call Package/luci/webtemplate)
377 DEPENDS+=+luci-admin-core +firewall
378 TITLE:=Firewall and Portforwarding application
381 define Package/luci-app-firewall/install
382 $(call Package/luci/install/template,$(1),applications/luci-fw)
386 define Package/luci-app-olsr
387 $(call Package/luci/webtemplate)
388 DEPENDS+=+luci-admin-full +olsrd +olsrd-mod-txtinfo
389 TITLE:=OLSR configuration and status module
392 define Package/luci-app-olsr/install
393 $(call Package/luci/install/template,$(1),applications/luci-olsr)
397 define Package/luci-app-qos
398 $(call Package/luci/webtemplate)
399 DEPENDS+=+luci-admin-core +qos-scripts
400 TITLE:=Quality of Service configuration module
403 define Package/luci-app-qos/install
404 $(call Package/luci/install/template,$(1),applications/luci-qos)
408 define Package/luci-app-splash
409 $(call Package/luci/fftemplate)
410 DEPENDS+=+luasocket +luci-app-firewall
411 TITLE:=Freifunk DHCP-Splash application
414 define Package/luci-app-splash/conffiles
415 /etc/config/luci_splash
418 define Package/luci-app-splash/install
419 $(call Package/luci/install/template,$(1),applications/luci-splash)
423 define Package/luci-app-statistics
424 $(call Package/luci/webtemplate)
425 DEPENDS+=+luci-admin-full +collectd +collectd-mod-rrdtool1 +rrdtool1
426 TITLE:=LuCI Statistics Application
429 define Package/luci-app-statistics/conffiles
430 /etc/config/luci_statistics
433 define Package/luci-app-statistics/install
434 $(call Package/luci/install/template,$(1),applications/luci-statistics)
438 define Package/luci-app-upnp
439 $(call Package/luci/webtemplate)
440 DEPENDS+=+luci-admin-core +miniupnpd
441 TITLE:=Universal Plug & Play configuration module
444 define Package/luci-app-upnp/install
445 $(call Package/luci/install/template,$(1),applications/luci-upnp)
449 define Package/luci-app-ntpc
450 $(call Package/luci/webtemplate)
451 DEPENDS+=+luci-admin-core +ntpclient
452 TITLE:=NTP time synchronisation client configuration module
455 define Package/luci-app-ntpc/install
456 $(call Package/luci/install/template,$(1),applications/luci-ntpc)
460 define Package/luci-app-ddns
461 $(call Package/luci/webtemplate)
462 DEPENDS+=+luci-admin-core +ddns-scripts
463 TITLE:=Dynamic DNS configuration module
466 define Package/luci-app-ddns/install
467 $(call Package/luci/install/template,$(1),applications/luci-ddns)
471 define Package/luci-app-samba
472 $(call Package/luci/webtemplate)
473 DEPENDS+=+luci-admin-full +samba3
474 TITLE:=Network Shares - Samba SMB/CIFS module
477 define Package/luci-app-samba/install
478 $(call Package/luci/install/template,$(1),applications/luci-samba)
482 ### Server Gateway Interfaces ###
484 define Package/luci-sgi-cgi
485 $(call Package/luci/libtemplate)
489 define Package/luci-sgi-cgi/install
490 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
493 define Package/luci-sgi-luci
494 $(call Package/luci/libtemplate)
496 TITLE:=SGI for LuCI HTTPD
499 define Package/luci-sgi-luci/install
500 $(call Package/luci/install/template,$(1),libs/sgi-luci)
503 define Package/luci-sgi-webuci
504 $(call Package/luci/libtemplate)
505 TITLE:=SGI for Webuci
508 define Package/luci-sgi-webuci/install
509 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
513 define Package/luci-theme-fledermaus
514 $(call Package/luci/fftemplate)
516 TITLE:=Fledermaus Theme
519 define Package/luci-theme-fledermaus/install
520 $(call Package/luci/install/template,$(1),themes/fledermaus)
523 define Package/luci-theme-openwrt
524 $(call Package/luci/thtemplate)
525 TITLE:=OpenWRT.org (default)
528 define Package/luci-theme-openwrt/install
529 $(call Package/luci/install/template,$(1),themes/openwrt.org)
532 define Package/luci-theme-openwrtlight
533 $(call Package/luci/thtemplate)
534 TITLE:=OpenWRT.org - light variant without images
537 define Package/luci-theme-openwrtlight/install
538 $(call Package/luci/install/template,$(1),themes/openwrt-light)
543 define Package/luci-i18n-german
544 $(call Package/luci/i18ntemplate)
548 define Package/luci-i18n-german/install
549 $(call Package/luci/install/template,$(1),i18n/german)
553 define Package/luci-i18n-english
554 $(call Package/luci/i18ntemplate)
558 define Package/luci-i18n-english/install
559 $(call Package/luci/install/template,$(1),i18n/english)
563 define Package/luci-i18n-french
564 $(call Package/luci/i18ntemplate)
565 TITLE:=French (by Florian Fainelli)
568 define Package/luci-i18n-french/install
569 $(call Package/luci/install/template,$(1),i18n/french)
573 define Package/luci-i18n-russian
574 $(call Package/luci/i18ntemplate)
575 TITLE:=Russian (by Skryabin Dmitry)
578 define Package/luci-i18n-russian/install
579 $(call Package/luci/install/template,$(1),i18n/russian)
585 ifneq ($(CONFIG_PACKAGE_luci-core),)
586 PKG_SELECTED_MODULES+=libs/core
588 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
589 PKG_SELECTED_MODULES+=libs/cbi
591 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
592 PKG_SELECTED_MODULES+=libs/fastindex
594 ifneq ($(CONFIG_PACKAGE_luci-http),)
595 PKG_SELECTED_MODULES+=libs/http
597 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
598 PKG_SELECTED_MODULES+=libs/ipkg
600 ifneq ($(CONFIG_PACKAGE_luci-uci),)
601 PKG_SELECTED_MODULES+=libs/uci
603 ifneq ($(CONFIG_PACKAGE_luci-sys),)
604 PKG_SELECTED_MODULES+=libs/sys
606 ifneq ($(CONFIG_PACKAGE_luci-web),)
607 PKG_SELECTED_MODULES+=libs/web
610 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
611 PKG_SELECTED_MODULES+=libs/httpd
614 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
615 PKG_SELECTED_MODULES+=applications/community-halle
617 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
618 PKG_SELECTED_MODULES+=applications/community-leipzig
620 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
621 PKG_SELECTED_MODULES+=applications/community-hannover
623 ifneq ($(CONFIG_PACKAGE_luci-ff-berlin),)
624 PKG_SELECTED_MODULES+=applications/community-berlin
626 ifneq ($(CONFIG_PACKAGE_luci-ff-augsburg),)
627 PKG_SELECTED_MODULES+=applications/community-augsburg
630 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
631 PKG_SELECTED_MODULES+=modules/admin-core
633 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
634 PKG_SELECTED_MODULES+=modules/admin-mini
636 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
637 PKG_SELECTED_MODULES+=modules/admin-full
639 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
640 PKG_SELECTED_MODULES+=modules/freifunk
643 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
644 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
646 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
647 PKG_SELECTED_MODULES+=applications/luci-fw
649 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
650 PKG_SELECTED_MODULES+=applications/luci-olsr
652 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
653 PKG_SELECTED_MODULES+=applications/luci-qos
655 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
656 PKG_SELECTED_MODULES+=applications/luci-splash
658 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
659 PKG_SELECTED_MODULES+=applications/luci-statistics
661 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
662 PKG_SELECTED_MODULES+=applications/luci-upnp
664 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
665 PKG_SELECTED_MODULES+=applications/luci-ntpc
667 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
668 PKG_SELECTED_MODULES+=applications/luci-ddns
670 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
671 PKG_SELECTED_MODULES+=applications/luci-samba
675 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
676 PKG_SELECTED_MODULES+=libs/sgi-cgi
678 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
679 PKG_SELECTED_MODULES+=libs/sgi-luci
681 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
682 PKG_SELECTED_MODULES+=libs/sgi-webuci
685 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
686 PKG_SELECTED_MODULES+=themes/fledermaus
688 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
689 PKG_SELECTED_MODULES+=themes/openwrt.org
691 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
692 PKG_SELECTED_MODULES+=themes/openwrt-light
695 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
696 PKG_SELECTED_MODULES+=i18n/german
698 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
699 PKG_SELECTED_MODULES+=i18n/english
701 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
702 PKG_SELECTED_MODULES+=i18n/french
704 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
705 PKG_SELECTED_MODULES+=i18n/russian
710 MODULES="$(PKG_SELECTED_MODULES)" \
711 LUA_TARGET="$(LUA_TARGET)" \
712 LUA_SHLIBS="-llua -lm" \
713 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
714 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
718 $(eval $(call BuildPackage,luci-core))
719 $(eval $(call BuildPackage,luci-cbi))
720 $(eval $(call BuildPackage,luci-fastindex))
721 $(eval $(call BuildPackage,luci-http))
722 $(eval $(call BuildPackage,luci-ipkg))
723 $(eval $(call BuildPackage,luci-uci))
724 $(eval $(call BuildPackage,luci-sys))
725 $(eval $(call BuildPackage,luci-web))
727 $(eval $(call BuildPackage,luci-httpd))
729 $(eval $(call BuildPackage,luci-ff-halle))
730 $(eval $(call BuildPackage,luci-ff-leipzig))
731 $(eval $(call BuildPackage,luci-ff-hannover))
732 $(eval $(call BuildPackage,luci-ff-berlin))
733 $(eval $(call BuildPackage,luci-ff-augsburg))
735 $(eval $(call BuildPackage,luci-admin-core))
736 $(eval $(call BuildPackage,luci-admin-mini))
737 $(eval $(call BuildPackage,luci-admin-full))
738 $(eval $(call BuildPackage,luci-mod-freifunk))
740 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
741 $(eval $(call BuildPackage,luci-app-firewall))
742 $(eval $(call BuildPackage,luci-app-olsr))
743 $(eval $(call BuildPackage,luci-app-qos))
744 $(eval $(call BuildPackage,luci-app-splash))
745 $(eval $(call BuildPackage,luci-app-statistics))
746 $(eval $(call BuildPackage,luci-app-upnp))
747 $(eval $(call BuildPackage,luci-app-ntpc))
748 $(eval $(call BuildPackage,luci-app-ddns))
749 $(eval $(call BuildPackage,luci-app-samba))
751 $(eval $(call BuildPackage,luci-sgi-cgi))
752 $(eval $(call BuildPackage,luci-sgi-luci))
753 $(eval $(call BuildPackage,luci-sgi-webuci))
755 $(eval $(call BuildPackage,luci-theme-fledermaus))
756 $(eval $(call BuildPackage,luci-theme-openwrt))
757 $(eval $(call BuildPackage,luci-theme-openwrtlight))
759 $(eval $(call BuildPackage,luci-i18n-german))
760 $(eval $(call BuildPackage,luci-i18n-english))
761 $(eval $(call BuildPackage,luci-i18n-french))
762 $(eval $(call BuildPackage,luci-i18n-russian))