1 include $(TOPDIR)/rules.mk
3 PKG_BRANCH:=branches/luci-0.8
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.8+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/i18ntemplate
63 $(call Package/luci/libtemplate)
64 SUBMENU:=LuCI Translations
68 define Package/luci/thtemplate
69 $(call Package/luci/libtemplate)
74 define Package/luci/webtemplate
75 $(call Package/luci/libtemplate)
76 SUBMENU:=LuCI Components
80 define Package/luci/install/template
81 $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
82 $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
89 define Package/luci-core
90 $(call Package/luci/libtemplate)
91 DEPENDS:=+lua +luaposix +bitlib
92 TITLE:=LuCI core libraries
95 define Package/luci-core/install
96 $(call Package/luci/install/template,$(1),libs/core)
99 define Package/luci-core/config
101 prompt "Build Target"
102 default PACKAGE_luci-core_source
104 config PACKAGE_luci-core_compile
107 config PACKAGE_luci-core_stripped
110 config PACKAGE_luci-core_source
116 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
120 ifneq ($(CONFIG_PACKAGE_luci-core_stripped),)
126 define Package/luci-cbi
127 $(call Package/luci/libtemplate)
128 DEPENDS+=+luci-web +luci-uvl +luci-uci
129 TITLE:=Configuration Binding Interface
132 define Package/luci-cbi/install
133 $(call Package/luci/install/template,$(1),libs/cbi)
137 define Package/luci-uci
138 $(call Package/luci/libtemplate)
140 TITLE:=High-Level UCI API
143 define Package/luci-uci/install
144 $(call Package/luci/install/template,$(1),libs/uci)
148 define Package/luci-fastindex
149 $(call Package/luci/libtemplate)
150 TITLE:=Fastindex indexing module
153 define Package/luci-fastindex/install
154 $(call Package/luci/install/template,$(1),libs/fastindex)
158 define Package/luci-http
159 $(call Package/luci/libtemplate)
160 TITLE:=HTTP Protocol implementation
163 define Package/luci-http/install
164 $(call Package/luci/install/template,$(1),libs/http)
168 define Package/luci-ipkg
169 $(call Package/luci/libtemplate)
170 TITLE:=LuCI IPKG/OPKG call abstraction library
173 define Package/luci-ipkg/install
174 $(call Package/luci/install/template,$(1),libs/ipkg)
178 define Package/luci-json
179 $(call Package/luci/libtemplate)
180 TITLE:=LuCI JSON Library
183 define Package/luci-json/install
184 $(call Package/luci/install/template,$(1),libs/json)
188 define Package/luci-sys
189 $(call Package/luci/libtemplate)
190 TITLE:=LuCI Linux/POSIX system library
193 define Package/luci-sys/install
194 $(call Package/luci/install/template,$(1),libs/sys)
198 define Package/luci-web
199 $(call Package/luci/libtemplate)
200 DEPENDS+=+luci-http +luci-sys +luci-addons +luci-uci +luci-sgi-cgi
201 TITLE:=MVC Webframework
204 define Package/luci-web/conffiles
208 define Package/luci-web/install
209 $(call Package/luci/install/template,$(1),libs/web)
213 define Package/luci-uvl
214 $(call Package/luci/libtemplate)
215 DEPENDS+=+luci-sys +luci-uci +luci-core
216 TITLE:=UVL - UCI Validation Layer
219 define Package/luci-uvl/install
220 $(call Package/luci/install/template,$(1),libs/uvl)
226 define Package/luci-admin-core
227 $(call Package/luci/webtemplate)
228 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
229 TITLE:=Web UI Core Module
232 define Package/luci-admin-core/install
233 $(call Package/luci/install/template,$(1),modules/admin-core)
237 define Package/luci-admin-mini
238 $(call Package/luci/webtemplate)
239 DEPENDS+=+luci-admin-core
240 TITLE:=LuCI Essentials - stripped down and user-friendly
243 define Package/luci-admin-mini/install
244 $(call Package/luci/install/template,$(1),modules/admin-mini)
248 define Package/luci-admin-full
249 $(call Package/luci/webtemplate)
250 DEPENDS+=+luci-admin-core +luci-ipkg
251 TITLE:=LuCI Administration - full-featured for full control
254 define Package/luci-admin-full/install
255 $(call Package/luci/install/template,$(1),modules/admin-full)
259 define Package/luci-admin-rpc
260 $(call Package/luci/webtemplate)
262 TITLE:=LuCI RPC - JSON-RPC API
265 define Package/luci-admin-rpc/install
266 $(call Package/luci/install/template,$(1),modules/rpc)
272 define Package/luci-app-firewall
273 $(call Package/luci/webtemplate)
274 DEPENDS+=+luci-admin-core
275 TITLE:=Firewall and Portforwarding application
278 define Package/luci-app-firewall/install
279 $(call Package/luci/install/template,$(1),applications/luci-fw)
283 define Package/luci-app-olsr
284 $(call Package/luci/webtemplate)
285 DEPENDS+=+luci-admin-full +olsrd-luci +olsrd-luci-mod-txtinfo
286 TITLE:=OLSR configuration and status module
289 define Package/luci-app-olsr/install
290 $(call Package/luci/install/template,$(1),applications/luci-olsr)
294 define Package/luci-app-qos
295 $(call Package/luci/webtemplate)
296 DEPENDS+=+luci-admin-core +qos-scripts
297 TITLE:=Quality of Service configuration module
300 define Package/luci-app-qos/install
301 $(call Package/luci/install/template,$(1),applications/luci-qos)
305 define Package/luci-app-statistics
306 $(call Package/luci/webtemplate)
307 DEPENDS+=+luci-admin-full +collectd +collectd-mod-rrdtool1 +rrdtool1
308 TITLE:=LuCI Statistics Application
311 define Package/luci-app-statistics/conffiles
312 /etc/config/luci_statistics
315 define Package/luci-app-statistics/install
316 $(call Package/luci/install/template,$(1),applications/luci-statistics)
320 define Package/luci-app-upnp
321 $(call Package/luci/webtemplate)
322 DEPENDS+=+luci-admin-core +miniupnpd
323 TITLE:=Universal Plug & Play configuration module
326 define Package/luci-app-upnp/install
327 $(call Package/luci/install/template,$(1),applications/luci-upnp)
331 define Package/luci-app-ntpc
332 $(call Package/luci/webtemplate)
333 DEPENDS+=+luci-admin-core +ntpclient
334 TITLE:=NTP time synchronisation client configuration module
337 define Package/luci-app-ntpc/install
338 $(call Package/luci/install/template,$(1),applications/luci-ntpc)
342 define Package/luci-app-ddns
343 $(call Package/luci/webtemplate)
344 DEPENDS+=+luci-admin-core +ddns-scripts
345 TITLE:=Dynamic DNS configuration module
348 define Package/luci-app-ddns/install
349 $(call Package/luci/install/template,$(1),applications/luci-ddns)
353 define Package/luci-app-samba
354 $(call Package/luci/webtemplate)
355 DEPENDS+=+luci-admin-full +samba3
356 TITLE:=Network Shares - Samba SMB/CIFS module
359 define Package/luci-app-samba/install
360 $(call Package/luci/install/template,$(1),applications/luci-samba)
364 define Package/luci-app-uvc_streamer
365 $(call Package/luci/webtemplate)
366 DEPENDS+=+luci-admin-full +uvc-streamer
367 TITLE:=Webcam Streaming - UVC-Streamer module
370 define Package/luci-app-uvc_streamer/install
371 $(call Package/luci/install/template,$(1),applications/luci-uvc_streamer)
375 define Package/luci-app-p910nd
376 $(call Package/luci/webtemplate)
377 DEPENDS+=+luci-admin-full +p910nd
378 TITLE:=p910nd - Printer server module
381 define Package/luci-app-p910nd/install
382 $(call Package/luci/install/template,$(1),applications/luci-p910nd)
386 ### Server Gateway Interfaces ###
388 define Package/luci-sgi-cgi
389 $(call Package/luci/libtemplate)
393 define Package/luci-sgi-cgi/install
394 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
399 define Package/luci-theme-openwrt
400 $(call Package/luci/thtemplate)
401 TITLE:=OpenWRT.org (default)
404 define Package/luci-theme-openwrt/install
405 $(call Package/luci/install/template,$(1),themes/openwrt.org)
408 define Package/luci-theme-openwrtlight
409 $(call Package/luci/thtemplate)
410 TITLE:=OpenWRT.org - light variant without images
413 define Package/luci-theme-openwrtlight/install
414 $(call Package/luci/install/template,$(1),themes/openwrt-light)
419 define Package/luci-i18n-german
420 $(call Package/luci/i18ntemplate)
424 define Package/luci-i18n-german/install
425 $(call Package/luci/install/template,$(1),i18n/german)
429 define Package/luci-i18n-english
430 $(call Package/luci/i18ntemplate)
434 define Package/luci-i18n-english/install
435 $(call Package/luci/install/template,$(1),i18n/english)
439 define Package/luci-i18n-french
440 $(call Package/luci/i18ntemplate)
441 TITLE:=French (by Florian Fainelli)
444 define Package/luci-i18n-french/install
445 $(call Package/luci/install/template,$(1),i18n/french)
449 define Package/luci-i18n-russian
450 $(call Package/luci/i18ntemplate)
451 TITLE:=Russian (by Skryabin Dmitry)
454 define Package/luci-i18n-russian/install
455 $(call Package/luci/install/template,$(1),i18n/russian)
461 ifneq ($(CONFIG_PACKAGE_luci-core),)
462 PKG_SELECTED_MODULES+=libs/core
464 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
465 PKG_SELECTED_MODULES+=libs/cbi
467 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
468 PKG_SELECTED_MODULES+=libs/fastindex
470 ifneq ($(CONFIG_PACKAGE_luci-http),)
471 PKG_SELECTED_MODULES+=libs/http
473 ifneq ($(CONFIG_PACKAGE_luci-ipkg),)
474 PKG_SELECTED_MODULES+=libs/ipkg
476 ifneq ($(CONFIG_PACKAGE_luci-json),)
477 PKG_SELECTED_MODULES+=libs/json
479 ifneq ($(CONFIG_PACKAGE_luci-uci),)
480 PKG_SELECTED_MODULES+=libs/uci
482 ifneq ($(CONFIG_PACKAGE_luci-sys),)
483 PKG_SELECTED_MODULES+=libs/sys
485 ifneq ($(CONFIG_PACKAGE_luci-web),)
486 PKG_SELECTED_MODULES+=libs/web
488 ifneq ($(CONFIG_PACKAGE_luci-uvl),)
489 PKG_SELECTED_MODULES+=libs/uvl
492 ifneq ($(CONFIG_PACKAGE_luci-admin-core),)
493 PKG_SELECTED_MODULES+=modules/admin-core
495 ifneq ($(CONFIG_PACKAGE_luci-admin-mini),)
496 PKG_SELECTED_MODULES+=modules/admin-mini
498 ifneq ($(CONFIG_PACKAGE_luci-admin-full),)
499 PKG_SELECTED_MODULES+=modules/admin-full
501 ifneq ($(CONFIG_PACKAGE_luci-admin-rpc),)
502 PKG_SELECTED_MODULES+=modules/rpc
505 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
506 PKG_SELECTED_MODULES+=applications/luci-fw
508 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
509 PKG_SELECTED_MODULES+=applications/luci-olsr
511 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
512 PKG_SELECTED_MODULES+=applications/luci-qos
514 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
515 PKG_SELECTED_MODULES+=applications/luci-statistics
517 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
518 PKG_SELECTED_MODULES+=applications/luci-upnp
520 ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
521 PKG_SELECTED_MODULES+=applications/luci-ntpc
523 ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
524 PKG_SELECTED_MODULES+=applications/luci-ddns
526 ifneq ($(CONFIG_PACKAGE_luci-app-samba),)
527 PKG_SELECTED_MODULES+=applications/luci-samba
529 ifneq ($(CONFIG_PACKAGE_luci-app-uvc_streamer),)
530 PKG_SELECTED_MODULES+=applications/luci-uvc_streamer
532 ifneq ($(CONFIG_PACKAGE_luci-app-p910nd),)
533 PKG_SELECTED_MODULES+=applications/luci-p910nd
537 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
538 PKG_SELECTED_MODULES+=libs/sgi-cgi
541 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
542 PKG_SELECTED_MODULES+=themes/openwrt.org
544 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrtlight),)
545 PKG_SELECTED_MODULES+=themes/openwrt-light
548 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
549 PKG_SELECTED_MODULES+=i18n/german
551 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
552 PKG_SELECTED_MODULES+=i18n/english
554 ifneq ($(CONFIG_PACKAGE_luci-i18n-french),)
555 PKG_SELECTED_MODULES+=i18n/french
557 ifneq ($(CONFIG_PACKAGE_luci-i18n-russian),)
558 PKG_SELECTED_MODULES+=i18n/russian
563 MODULES="$(PKG_SELECTED_MODULES)" \
564 LUA_TARGET="$(LUA_TARGET)" \
565 LUA_SHLIBS="-llua -lm" \
566 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
567 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
571 $(eval $(call BuildPackage,luci-core))
572 $(eval $(call BuildPackage,luci-cbi))
573 $(eval $(call BuildPackage,luci-fastindex))
574 $(eval $(call BuildPackage,luci-http))
575 $(eval $(call BuildPackage,luci-ipkg))
576 $(eval $(call BuildPackage,luci-json))
577 $(eval $(call BuildPackage,luci-uci))
578 $(eval $(call BuildPackage,luci-sys))
579 $(eval $(call BuildPackage,luci-web))
580 $(eval $(call BuildPackage,luci-uvl))
582 $(eval $(call BuildPackage,luci-admin-core))
583 $(eval $(call BuildPackage,luci-admin-mini))
584 $(eval $(call BuildPackage,luci-admin-full))
585 $(eval $(call BuildPackage,luci-admin-rpc))
587 $(eval $(call BuildPackage,luci-app-firewall))
588 $(eval $(call BuildPackage,luci-app-olsr))
589 $(eval $(call BuildPackage,luci-app-qos))
590 $(eval $(call BuildPackage,luci-app-statistics))
591 $(eval $(call BuildPackage,luci-app-upnp))
592 $(eval $(call BuildPackage,luci-app-ntpc))
593 $(eval $(call BuildPackage,luci-app-ddns))
594 $(eval $(call BuildPackage,luci-app-samba))
595 $(eval $(call BuildPackage,luci-app-uvc_streamer))
596 $(eval $(call BuildPackage,luci-app-p910nd))
598 $(eval $(call BuildPackage,luci-sgi-cgi))
600 $(eval $(call BuildPackage,luci-theme-openwrt))
601 $(eval $(call BuildPackage,luci-theme-openwrtlight))
603 $(eval $(call BuildPackage,luci-i18n-german))
604 $(eval $(call BuildPackage,luci-i18n-english))
605 $(eval $(call BuildPackage,luci-i18n-french))
606 $(eval $(call BuildPackage,luci-i18n-russian))