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
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 module
292 define Package/luci-mod-admin-core/install
293 $(call Package/luci/install/template,$(1),modules/admin-core)
297 define Package/luci-mod-freifunk
298 $(call Package/luci/fftemplate)
299 DEPENDS:=+luci-mod-admin-core
300 TITLE:=LuCI Freifunk module
303 define Package/luci-mod-freifunk/conffiles
307 define Package/luci-mod-freifunk/install
308 $(call Package/luci/install/template,$(1),modules/freifunk)
315 define Package/luci-app-ffwizard-leipzig
316 $(call Package/luci/fftemplate)
317 DEPENDS+=+luci-app-firewall
318 TITLE:=Freifunk Leipzig configuration wizard
321 define Package/luci-app-ffwizard-leipzig/install
322 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
326 define Package/luci-app-firewall
327 $(call Package/luci/webtemplate)
328 DEPENDS+=+luci-mod-admin-core
329 TITLE:=Firewall and Portforwarding application
332 define Package/luci-app-firewall/conffiles
336 define Package/luci-app-firewall/install
337 $(call Package/luci/install/template,$(1),applications/luci-fw)
341 define Package/luci-app-olsr
342 $(call Package/luci/webtemplate)
343 DEPENDS+=+luci-mod-admin-core +olsrd-mod-txtinfo
344 TITLE:=OLSR configuration and status module
347 define Package/luci-app-olsr/install
348 $(call Package/luci/install/template,$(1),applications/luci-olsr)
352 define Package/luci-app-qos
353 $(call Package/luci/webtemplate)
354 DEPENDS+=+luci-mod-admin-core +qos-scripts
355 TITLE:=Quality of Service configuration module
358 define Package/luci-app-qos/install
359 $(call Package/luci/install/template,$(1),applications/luci-qos)
363 define Package/luci-app-splash
364 $(call Package/luci/fftemplate)
365 DEPENDS+=+luasocket +iptables-mod-nat +iptables-mod-ipopt
366 TITLE:=Freifunk DHCP-Splash application
369 define Package/luci-app-splash/conffiles
370 /etc/config/luci_splash
373 define Package/luci-app-splash/install
374 $(call Package/luci/install/template,$(1),applications/luci-splash)
378 define Package/luci-app-statistics
379 $(call Package/luci/webtemplate)
380 DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
381 TITLE:=LuCI Statistics Application
384 define Package/luci-app-statistics/conffiles
385 /etc/config/luci_statistics
388 define Package/luci-app-statistics/install
389 $(call Package/luci/install/template,$(1),applications/luci-statistics)
393 ### Server Gateway Interfaces ###
395 define Package/luci-sgi-cgi
396 $(call Package/luci/libtemplate)
400 define Package/luci-sgi-cgi/install
401 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
404 define Package/luci-sgi-luci
405 $(call Package/luci/libtemplate)
407 TITLE:=SGI for LuCI HTTPD
410 define Package/luci-sgi-luci/install
411 $(call Package/luci/install/template,$(1),libs/sgi-luci)
414 define Package/luci-sgi-webuci
415 $(call Package/luci/libtemplate)
416 TITLE:=SGI for Webuci
419 define Package/luci-sgi-webuci/install
420 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
424 define Package/luci-theme-fledermaus
425 $(call Package/luci/fftemplate)
427 TITLE:=Fledermaus Theme
430 define Package/luci-theme-fledermaus/install
431 $(call Package/luci/install/template,$(1),themes/fledermaus)
434 define Package/luci-theme-openwrt
435 $(call Package/luci/thtemplate)
436 TITLE:=OpenWRT.org (default)
439 define Package/luci-theme-openwrt/install
440 $(call Package/luci/install/template,$(1),themes/openwrt.org)
444 define Package/luci-i18n-german
445 $(call Package/luci/i18ntemplate)
449 define Package/luci-i18n-german/install
450 $(call Package/luci/install/template,$(1),i18n/german)
454 define Package/luci-i18n-english
455 $(call Package/luci/i18ntemplate)
459 define Package/luci-i18n-english/install
460 $(call Package/luci/install/template,$(1),i18n/english)
464 define Package/luci-i18n-french
465 $(call Package/luci/i18ntemplate)
469 define Package/luci-i18n-french/install
470 $(call Package/luci/install/template,$(1),i18n/french)
477 ifneq ($(CONFIG_PACKAGE_luci-core),)
478 PKG_SELECTED_MODULES+=libs/core
480 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
481 PKG_SELECTED_MODULES+=libs/cbi
483 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
484 PKG_SELECTED_MODULES+=libs/fastindex
486 ifneq ($(CONFIG_PACKAGE_luci-http),)
487 PKG_SELECTED_MODULES+=libs/http
489 ifneq ($(CONFIG_PACKAGE_luci-uci),)
490 PKG_SELECTED_MODULES+=libs/uci
492 ifneq ($(CONFIG_PACKAGE_luci-web),)
493 PKG_SELECTED_MODULES+=libs/web
496 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
497 PKG_SELECTED_MODULES+=libs/httpd
500 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
501 PKG_SELECTED_MODULES+=applications/community-halle
503 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
504 PKG_SELECTED_MODULES+=applications/community-leipzig
506 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
507 PKG_SELECTED_MODULES+=applications/community-hannover
509 ifneq ($(CONFIG_PACKAGE_luci-ff-berlin),)
510 PKG_SELECTED_MODULES+=applications/community-berlin
512 ifneq ($(CONFIG_PACKAGE_luci-ff-augsburg),)
513 PKG_SELECTED_MODULES+=applications/community-augsburg
516 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
517 PKG_SELECTED_MODULES+=modules/admin-core
519 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
520 PKG_SELECTED_MODULES+=modules/freifunk
523 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
524 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
526 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
527 PKG_SELECTED_MODULES+=applications/luci-fw
529 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
530 PKG_SELECTED_MODULES+=applications/luci-olsr
532 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
533 PKG_SELECTED_MODULES+=applications/luci-qos
535 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
536 PKG_SELECTED_MODULES+=applications/luci-splash
538 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
539 PKG_SELECTED_MODULES+=applications/luci-statistics
542 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
543 PKG_SELECTED_MODULES+=libs/sgi-cgi
545 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
546 PKG_SELECTED_MODULES+=libs/sgi-luci
548 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
549 PKG_SELECTED_MODULES+=libs/sgi-webuci
552 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
553 PKG_SELECTED_MODULES+=themes/fledermaus
555 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
556 PKG_SELECTED_MODULES+=themes/openwrt.org
559 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
560 PKG_SELECTED_MODULES+=i18n/german
562 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
563 PKG_SELECTED_MODULES+=i18n/english
565 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
566 PKG_SELECTED_MODULES+=i18n/french
571 MODULES="$(PKG_SELECTED_MODULES)" \
572 LUA_TARGET="$(LUA_TARGET)" \
573 LUA_SHLIBS="-llua -lm" \
574 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
575 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
579 $(eval $(call BuildPackage,luci-core))
580 $(eval $(call BuildPackage,luci-cbi))
581 $(eval $(call BuildPackage,luci-fastindex))
582 $(eval $(call BuildPackage,luci-http))
583 $(eval $(call BuildPackage,luci-uci))
584 $(eval $(call BuildPackage,luci-web))
586 $(eval $(call BuildPackage,luci-httpd))
588 $(eval $(call BuildPackage,luci-ff-halle))
589 $(eval $(call BuildPackage,luci-ff-leipzig))
590 $(eval $(call BuildPackage,luci-ff-hannover))
591 $(eval $(call BuildPackage,luci-ff-berlin))
592 $(eval $(call BuildPackage,luci-ff-augsburg))
594 $(eval $(call BuildPackage,luci-mod-admin-core))
595 $(eval $(call BuildPackage,luci-mod-freifunk))
597 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
598 $(eval $(call BuildPackage,luci-app-firewall))
599 $(eval $(call BuildPackage,luci-app-olsr))
600 $(eval $(call BuildPackage,luci-app-qos))
601 $(eval $(call BuildPackage,luci-app-splash))
602 $(eval $(call BuildPackage,luci-app-statistics))
604 $(eval $(call BuildPackage,luci-sgi-cgi))
605 $(eval $(call BuildPackage,luci-sgi-luci))
606 $(eval $(call BuildPackage,luci-sgi-webuci))
608 $(eval $(call BuildPackage,luci-theme-fledermaus))
609 $(eval $(call BuildPackage,luci-theme-openwrt))
611 $(eval $(call BuildPackage,luci-i18n-german))
612 $(eval $(call BuildPackage,luci-i18n-english))
613 $(eval $(call BuildPackage,luci-i18n-french))