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)
140 DEPENDS+=+luci-web +luci-uvl +luci-uci
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-json
191 $(call Package/luci/libtemplate)
192 TITLE:=LuCI JSON Library
195 define Package/luci-json/install
196 $(call Package/luci/install/template,$(1),libs/json)
200 define Package/luci-sys
201 $(call Package/luci/libtemplate)
202 TITLE:=LuCI Linux/POSIX system library
205 define Package/luci-sys/install
206 $(call Package/luci/install/template,$(1),libs/sys)
210 define Package/luci-web
211 $(call Package/luci/libtemplate)
212 DEPENDS+=+luci-http +luci-sys +luci-addons +luci-uci +luci-sgi-cgi
213 TITLE:=MVC Webframework
216 define Package/luci-web/conffiles
220 define Package/luci-web/install
221 $(call Package/luci/install/template,$(1),libs/web)
225 define Package/luci-uvl
226 $(call Package/luci/libtemplate)
227 DEPENDS+=+luci-sys +luci-uci +luci-core
228 TITLE:=UVL - UCI Validation Layer
231 define Package/luci-uvl/install
232 $(call Package/luci/install/template,$(1),libs/uvl)
239 define Package/luci-httpd
240 $(call Package/luci/httpdtemplate)
241 DEPENDS:=+luci-http +luasocket
245 define Package/luci-httpd/install
246 $(call Package/luci/install/template,$(1),libs/httpd)
251 ### Community Packages ###
253 define Package/luci-ff-halle
254 $(call Package/luci/fftemplate)
256 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
257 +luci-app-ffwizard-leipzig \
258 +luci-theme-fledermaus \
260 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
262 TITLE:=Freifunk Halle Community Meta-Package
265 define Package/luci-ff-halle/install
266 $(call Package/luci/install/template,$(1),applications/community-halle)
270 define Package/luci-ff-leipzig
271 $(call Package/luci/fftemplate)
273 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
274 +luci-app-ffwizard-leipzig \
275 +luci-theme-fledermaus \
277 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
279 TITLE:=Freifunk Leipzig Community Meta-Package
282 define Package/luci-ff-leipzig/install
283 $(call Package/luci/install/template,$(1),applications/community-leipzig)
287 define Package/luci-ff-hannover
288 $(call Package/luci/fftemplate)
290 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
291 +luci-theme-fledermaus \
293 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
294 TITLE:=Freifunk Hannover Community Meta-Package
295 URL:=http://www.freifunk-hannover.de/
296 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
299 define Package/luci-ff-hannover/install
300 $(call Package/luci/install/template,$(1),applications/community-hannover)
304 define Package/luci-ff-berlin
305 $(call Package/luci/fftemplate)
307 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
308 +luci-theme-fledermaus \
310 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
311 TITLE:=Freifunk Berlin Community Meta-Package
314 define Package/luci-ff-berlin/install
315 $(call Package/luci/install/template,$(1),applications/community-berlin)
318 define Package/luci-ff-augsburg
319 $(call Package/luci/fftemplate)
321 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
322 +luci-theme-fledermaus \
324 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
325 TITLE:=Freifunk Augsburg Community Meta-Package
328 define Package/luci-ff-augsburg/install
329 $(call Package/luci/install/template,$(1),applications/community-augsburg)
334 define Package/luci-admin-core
335 $(call Package/luci/webtemplate)
336 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
337 TITLE:=Web UI Core Module
340 define Package/luci-admin-core/install
341 $(call Package/luci/install/template,$(1),modules/admin-core)
345 define Package/luci-admin-mini
346 $(call Package/luci/webtemplate)
347 DEPENDS+=+luci-admin-core
348 TITLE:=LuCI Essentials - stripped down - optimized for user-friendliness
351 define Package/luci-admin-mini/install
352 $(call Package/luci/install/template,$(1),modules/admin-mini)
356 define Package/luci-admin-full
357 $(call Package/luci/webtemplate)
358 DEPENDS+=+luci-admin-core +luci-ipkg
359 TITLE:=LuCI Administration - full featured - optimized for full control
362 define Package/luci-admin-full/install
363 $(call Package/luci/install/template,$(1),modules/admin-full)
367 define Package/luci-admin-rpc
368 $(call Package/luci/webtemplate)
370 TITLE:=LuCI RPC - JSON-RPC API
373 define Package/luci-admin-rpc/install
374 $(call Package/luci/install/template,$(1),modules/rpc)
378 define Package/luci-mod-freifunk
379 $(call Package/luci/fftemplate)
380 DEPENDS:=+luci-admin-full
381 TITLE:=LuCI Freifunk module
384 define Package/luci-mod-freifunk/conffiles
388 define Package/luci-mod-freifunk/install
389 $(call Package/luci/install/template,$(1),modules/freifunk)
396 define Package/luci-app-ffwizard-leipzig
397 $(call Package/luci/fftemplate)
398 TITLE:=Freifunk Leipzig configuration wizard
401 define Package/luci-app-ffwizard-leipzig/install
402 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
406 define Package/luci-app-firewall
407 $(call Package/luci/webtemplate)
408 DEPENDS+=+luci-admin-core
409 TITLE:=Firewall and Portforwarding application
412 define Package/luci-app-firewall/install
413 $(call Package/luci/install/template,$(1),applications/luci-fw)
417 define Package/luci-app-olsr
418 $(call Package/luci/webtemplate)
419 DEPENDS+=+luci-admin-full +olsrd +olsrd-mod-txtinfo
420 TITLE:=OLSR configuration and status module
423 define Package/luci-app-olsr/install
424 $(call Package/luci/install/template,$(1),applications/luci-olsr)
428 define Package/luci-app-qos
429 $(call Package/luci/webtemplate)
430 DEPENDS+=+luci-admin-core +qos-scripts
431 TITLE:=Quality of Service configuration module
434 define Package/luci-app-qos/install
435 $(call Package/luci/install/template,$(1),applications/luci-qos)
439 define Package/luci-app-splash
440 $(call Package/luci/fftemplate)
442 TITLE:=Freifunk DHCP-Splash application
445 define Package/luci-app-splash/conffiles
446 /etc/config/luci_splash
449 define Package/luci-app-splash/install
450 $(call Package/luci/install/template,$(1),applications/luci-splash)
454 define Package/luci-app-statistics
455 $(call Package/luci/webtemplate)
456 DEPENDS+=+luci-admin-full +collectd +collectd-mod-rrdtool1 +rrdtool1
457 TITLE:=LuCI Statistics Application
460 define Package/luci-app-statistics/conffiles
461 /etc/config/luci_statistics
464 define Package/luci-app-statistics/install
465 $(call Package/luci/install/template,$(1),applications/luci-statistics)
469 define Package/luci-app-upnp
470 $(call Package/luci/webtemplate)
471 DEPENDS+=+luci-admin-core +miniupnpd
472 TITLE:=Universal Plug & Play configuration module
475 define Package/luci-app-upnp/install
476 $(call Package/luci/install/template,$(1),applications/luci-upnp)
480 define Package/luci-app-ntpc
481 $(call Package/luci/webtemplate)
482 DEPENDS+=+luci-admin-core +ntpclient
483 TITLE:=NTP time synchronisation client configuration module
486 define Package/luci-app-ntpc/install
487 $(call Package/luci/install/template,$(1),applications/luci-ntpc)
491 define Package/luci-app-ddns
492 $(call Package/luci/webtemplate)
493 DEPENDS+=+luci-admin-core +ddns-scripts
494 TITLE:=Dynamic DNS configuration module
497 define Package/luci-app-ddns/install
498 $(call Package/luci/install/template,$(1),applications/luci-ddns)
502 define Package/luci-app-samba
503 $(call Package/luci/webtemplate)
504 DEPENDS+=+luci-admin-full +samba3
505 TITLE:=Network Shares - Samba SMB/CIFS module
508 define Package/luci-app-samba/install
509 $(call Package/luci/install/template,$(1),applications/luci-samba)
513 ### Server Gateway Interfaces ###
515 define Package/luci-sgi-cgi
516 $(call Package/luci/libtemplate)
520 define Package/luci-sgi-cgi/install
521 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
524 define Package/luci-sgi-luci
525 $(call Package/luci/libtemplate)
527 TITLE:=SGI for LuCI HTTPD
530 define Package/luci-sgi-luci/install
531 $(call Package/luci/install/template,$(1),libs/sgi-luci)
534 define Package/luci-sgi-webuci
535 $(call Package/luci/libtemplate)
536 TITLE:=SGI for Webuci
539 define Package/luci-sgi-webuci/install
540 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
544 define Package/luci-theme-fledermaus
545 $(call Package/luci/fftemplate)
547 TITLE:=Fledermaus Theme
550 define Package/luci-theme-fledermaus/install
551 $(call Package/luci/install/template,$(1),themes/fledermaus)
554 define Package/luci-theme-openwrt
555 $(call Package/luci/thtemplate)
556 TITLE:=OpenWRT.org (default)
559 define Package/luci-theme-openwrt/install
560 $(call Package/luci/install/template,$(1),themes/openwrt.org)
563 define Package/luci-theme-openwrtlight
564 $(call Package/luci/thtemplate)
565 TITLE:=OpenWRT.org - light variant without images
568 define Package/luci-theme-openwrtlight/install
569 $(call Package/luci/install/template,$(1),themes/openwrt-light)
574 define Package/luci-i18n-german
575 $(call Package/luci/i18ntemplate)
579 define Package/luci-i18n-german/install
580 $(call Package/luci/install/template,$(1),i18n/german)
584 define Package/luci-i18n-english
585 $(call Package/luci/i18ntemplate)
589 define Package/luci-i18n-english/install
590 $(call Package/luci/install/template,$(1),i18n/english)
594 define Package/luci-i18n-french
595 $(call Package/luci/i18ntemplate)
596 TITLE:=French (by Florian Fainelli)
599 define Package/luci-i18n-french/install
600 $(call Package/luci/install/template,$(1),i18n/french)
604 define Package/luci-i18n-russian
605 $(call Package/luci/i18ntemplate)
606 TITLE:=Russian (by Skryabin Dmitry)
609 define Package/luci-i18n-russian/install
610 $(call Package/luci/install/template,$(1),i18n/russian)
616 ifneq ($(CONFIG_PACKAGE_luci-core),)
617 PKG_SELECTED_MODULES+=libs/core
619 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
620 PKG_SELECTED_MODULES+=libs/cbi
622 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
623 PKG_SELECTED_MODULES+=libs/fastindex
625 ifneq ($(CONFIG_PACKAGE_luci-http),)
626 PKG_SELECTED_MODULES+=libs/http
628 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
629 PKG_SELECTED_MODULES+=libs/ipkg
631 ifneq ($(CONFIG_PACKAGE_luci-json),)
632 PKG_SELECTED_MODULES+=libs/json
634 ifneq ($(CONFIG_PACKAGE_luci-uci),)
635 PKG_SELECTED_MODULES+=libs/uci
637 ifneq ($(CONFIG_PACKAGE_luci-sys),)
638 PKG_SELECTED_MODULES+=libs/sys
640 ifneq ($(CONFIG_PACKAGE_luci-web),)
641 PKG_SELECTED_MODULES+=libs/web
643 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
644 PKG_SELECTED_MODULES+=libs/uvl
647 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
648 PKG_SELECTED_MODULES+=libs/httpd
651 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
652 PKG_SELECTED_MODULES+=applications/community-halle
654 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
655 PKG_SELECTED_MODULES+=applications/community-leipzig
657 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
658 PKG_SELECTED_MODULES+=applications/community-hannover
660 ifneq ($(CONFIG_PACKAGE_luci-ff-berlin),)
661 PKG_SELECTED_MODULES+=applications/community-berlin
663 ifneq ($(CONFIG_PACKAGE_luci-ff-augsburg),)
664 PKG_SELECTED_MODULES+=applications/community-augsburg
667 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
668 PKG_SELECTED_MODULES+=modules/admin-core
670 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
671 PKG_SELECTED_MODULES+=modules/admin-mini
673 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
674 PKG_SELECTED_MODULES+=modules/admin-full
676 ifneq ($(CONFIG_PACKAGE_luci-admin-rpc),)
677 PKG_SELECTED_MODULES+=modules/rpc
679 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
680 PKG_SELECTED_MODULES+=modules/freifunk
683 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
684 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
686 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
687 PKG_SELECTED_MODULES+=applications/luci-fw
689 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
690 PKG_SELECTED_MODULES+=applications/luci-olsr
692 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
693 PKG_SELECTED_MODULES+=applications/luci-qos
695 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
696 PKG_SELECTED_MODULES+=applications/luci-splash
698 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
699 PKG_SELECTED_MODULES+=applications/luci-statistics
701 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
702 PKG_SELECTED_MODULES+=applications/luci-upnp
704 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
705 PKG_SELECTED_MODULES+=applications/luci-ntpc
707 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
708 PKG_SELECTED_MODULES+=applications/luci-ddns
710 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
711 PKG_SELECTED_MODULES+=applications/luci-samba
715 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
716 PKG_SELECTED_MODULES+=libs/sgi-cgi
718 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
719 PKG_SELECTED_MODULES+=libs/sgi-luci
721 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
722 PKG_SELECTED_MODULES+=libs/sgi-webuci
725 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
726 PKG_SELECTED_MODULES+=themes/fledermaus
728 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
729 PKG_SELECTED_MODULES+=themes/openwrt.org
731 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
732 PKG_SELECTED_MODULES+=themes/openwrt-light
735 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
736 PKG_SELECTED_MODULES+=i18n/german
738 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
739 PKG_SELECTED_MODULES+=i18n/english
741 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
742 PKG_SELECTED_MODULES+=i18n/french
744 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
745 PKG_SELECTED_MODULES+=i18n/russian
750 MODULES="$(PKG_SELECTED_MODULES)" \
751 LUA_TARGET="$(LUA_TARGET)" \
752 LUA_SHLIBS="-llua -lm" \
753 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
754 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
758 $(eval $(call BuildPackage,luci-core))
759 $(eval $(call BuildPackage,luci-cbi))
760 $(eval $(call BuildPackage,luci-fastindex))
761 $(eval $(call BuildPackage,luci-http))
762 $(eval $(call BuildPackage,luci-ipkg))
763 $(eval $(call BuildPackage,luci-json))
764 $(eval $(call BuildPackage,luci-uci))
765 $(eval $(call BuildPackage,luci-sys))
766 $(eval $(call BuildPackage,luci-web))
767 $(eval $(call BuildPackage,luci-uvl))
769 $(eval $(call BuildPackage,luci-httpd))
771 $(eval $(call BuildPackage,luci-ff-halle))
772 $(eval $(call BuildPackage,luci-ff-leipzig))
773 $(eval $(call BuildPackage,luci-ff-hannover))
774 $(eval $(call BuildPackage,luci-ff-berlin))
775 $(eval $(call BuildPackage,luci-ff-augsburg))
777 $(eval $(call BuildPackage,luci-admin-core))
778 $(eval $(call BuildPackage,luci-admin-mini))
779 $(eval $(call BuildPackage,luci-admin-full))
780 $(eval $(call BuildPackage,luci-admin-rpc))
781 $(eval $(call BuildPackage,luci-mod-freifunk))
783 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
784 $(eval $(call BuildPackage,luci-app-firewall))
785 $(eval $(call BuildPackage,luci-app-olsr))
786 $(eval $(call BuildPackage,luci-app-qos))
787 $(eval $(call BuildPackage,luci-app-splash))
788 $(eval $(call BuildPackage,luci-app-statistics))
789 $(eval $(call BuildPackage,luci-app-upnp))
790 $(eval $(call BuildPackage,luci-app-ntpc))
791 $(eval $(call BuildPackage,luci-app-ddns))
792 $(eval $(call BuildPackage,luci-app-samba))
794 $(eval $(call BuildPackage,luci-sgi-cgi))
795 $(eval $(call BuildPackage,luci-sgi-luci))
796 $(eval $(call BuildPackage,luci-sgi-webuci))
798 $(eval $(call BuildPackage,luci-theme-fledermaus))
799 $(eval $(call BuildPackage,luci-theme-openwrt))
800 $(eval $(call BuildPackage,luci-theme-openwrtlight))
802 $(eval $(call BuildPackage,luci-i18n-german))
803 $(eval $(call BuildPackage,luci-i18n-english))
804 $(eval $(call BuildPackage,luci-i18n-french))
805 $(eval $(call BuildPackage,luci-i18n-russian))