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 ../../../ . --exclude=.pc --exclude='boa-0*' --exclude=.svn --exclude=.git --exclude='*.o' | tar x -C $(PKG_BUILD_DIR)/
43 define Build/Configure
48 define Package/luci/libtemplate
50 CATEGORY:=Administration
51 TITLE:=LuCI - Lua Configuration Interface
52 URL:=http://luci.freifunk-halle.net/
53 MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
54 SUBMENU:=LuCI - Libraries
58 define Package/luci/fftemplate
59 $(call Package/luci/libtemplate)
60 SUBMENU:=LuCI - Freifunk Support
61 DEPENDS:=+luci-mod-freifunk
64 define Package/luci/httpdtemplate
65 $(call Package/luci/libtemplate)
66 SUBMENU:=LuCI - Non-Forking HTTP-Daemon (EXPERIMENTAL)
70 define Package/luci/i18ntemplate
71 $(call Package/luci/libtemplate)
72 SUBMENU:=LuCI - Translations
76 define Package/luci/thtemplate
77 $(call Package/luci/libtemplate)
78 SUBMENU:=LuCI - Themes
82 define Package/luci/webtemplate
83 $(call Package/luci/libtemplate)
84 SUBMENU:=LuCI - Webinterface Components
88 define Package/luci/install/template
89 $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
90 $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
97 define Package/luci-core
98 $(call Package/luci/libtemplate)
99 DEPENDS:=+lua +luaposix
100 TITLE:=LuCI core libraries
103 define Package/luci-core/install
104 $(call Package/luci/install/template,$(1),libs/core)
107 define Package/luci-core/config
109 prompt "Build Target"
110 default PACKAGE_luci-core_compile
112 config PACKAGE_luci-core_compile
115 config PACKAGE_luci-core_source
121 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
127 define Package/luci-cbi
128 $(call Package/luci/libtemplate)
130 TITLE:=Configuration Binding Interface
133 define Package/luci-cbi/install
134 $(call Package/luci/install/template,$(1),libs/cbi)
138 define Package/luci-uci
139 $(call Package/luci/libtemplate)
141 TITLE:=High-Level UCI API
144 define Package/luci-uci/install
145 $(call Package/luci/install/template,$(1),libs/uci)
149 define Package/luci-fastindex
150 $(call Package/luci/libtemplate)
151 TITLE:=Fastindex indexing module
154 define Package/luci-fastindex/install
155 $(call Package/luci/install/template,$(1),libs/fastindex)
159 define Package/luci-http
160 $(call Package/luci/libtemplate)
161 TITLE:=HTTP Protocol implementation
164 define Package/luci-http/install
165 $(call Package/luci/install/template,$(1),libs/http)
169 define Package/luci-web
170 $(call Package/luci/libtemplate)
171 DEPENDS+=+luci-http +luci-addons +luci-uci
172 TITLE:=MVC Webframework
175 define Package/luci-web/conffiles
179 define Package/luci-web/install
180 $(call Package/luci/install/template,$(1),libs/web)
187 define Package/luci-httpd
188 $(call Package/luci/httpdtemplate)
189 DEPENDS:=+luci-http +luasocket
193 define Package/luci-httpd/install
194 $(call Package/luci/install/template,$(1),libs/httpd)
199 ### Community Packages ###
201 define Package/luci-ff-halle
202 $(call Package/luci/fftemplate)
204 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
205 +luci-app-ffwizard-leipzig \
206 +luci-theme-fledermaus \
208 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
210 TITLE:=Freifunk Halle Community Meta-Package
213 define Package/luci-ff-halle/install
214 $(call Package/luci/install/template,$(1),applications/community-halle)
218 define Package/luci-ff-leipzig
219 $(call Package/luci/fftemplate)
221 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
222 +luci-app-ffwizard-leipzig \
223 +luci-theme-fledermaus \
225 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
227 TITLE:=Freifunk Leipzig Community Meta-Package
230 define Package/luci-ff-leipzig/install
231 $(call Package/luci/install/template,$(1),applications/community-leipzig)
235 define Package/luci-ff-hannover
236 $(call Package/luci/fftemplate)
238 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
239 +luci-theme-fledermaus \
241 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
242 TITLE:=Freifunk Hannover Community Meta-Package
243 URL:=http://www.freifunk-hannover.de/
244 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
247 define Package/luci-ff-hannover/install
248 $(call Package/luci/install/template,$(1),applications/community-hannover)
254 define Package/luci-mod-admin-core
255 $(call Package/luci/webtemplate)
256 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
257 TITLE:=Administration module
260 define Package/luci-mod-admin-core/install
261 $(call Package/luci/install/template,$(1),modules/admin-core)
265 define Package/luci-mod-freifunk
266 $(call Package/luci/fftemplate)
267 DEPENDS:=+luci-mod-admin-core
268 TITLE:=LuCI Freifunk module
271 define Package/luci-mod-freifunk/conffiles
275 define Package/luci-mod-freifunk/install
276 $(call Package/luci/install/template,$(1),modules/freifunk)
283 define Package/luci-app-ffwizard-leipzig
284 $(call Package/luci/fftemplate)
285 DEPENDS+=+luci-app-firewall
286 TITLE:=Freifunk Leipzig configuration wizard
289 define Package/luci-app-ffwizard-leipzig/install
290 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
294 define Package/luci-app-firewall
295 $(call Package/luci/webtemplate)
296 DEPENDS+=+luci-mod-admin-core
297 TITLE:=Firewall and Portforwarding application
300 define Package/luci-app-firewall/conffiles
304 define Package/luci-app-firewall/install
305 $(call Package/luci/install/template,$(1),applications/luci-fw)
309 define Package/luci-app-olsr
310 $(call Package/luci/webtemplate)
311 DEPENDS+=+luci-mod-admin-core +olsrd-mod-txtinfo
312 TITLE:=OLSR configuration and status module
315 define Package/luci-app-olsr/install
316 $(call Package/luci/install/template,$(1),applications/luci-olsr)
320 define Package/luci-app-qos
321 $(call Package/luci/webtemplate)
322 DEPENDS+=+luci-mod-admin-core +qos-scripts
323 TITLE:=Quality of Service configuration module
326 define Package/luci-app-qos/install
327 $(call Package/luci/install/template,$(1),applications/luci-qos)
331 define Package/luci-app-splash
332 $(call Package/luci/fftemplate)
333 DEPENDS+=+iptables-mod-nat +iptables-mod-ipopt
334 TITLE:=Freifunk DHCP-Splash application
337 define Package/luci-app-splash/conffiles
338 /etc/config/luci_splash
341 define Package/luci-app-splash/install
342 $(call Package/luci/install/template,$(1),applications/luci-splash)
346 define Package/luci-app-statistics
347 $(call Package/luci/webtemplate)
348 DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
349 TITLE:=LuCI Statistics Application
352 define Package/luci-app-statistics/conffiles
353 /etc/config/luci_statistics
356 define Package/luci-app-statistics/install
357 $(call Package/luci/install/template,$(1),applications/luci-statistics)
361 ### Server Gateway Interfaces ###
363 define Package/luci-sgi-cgi
364 $(call Package/luci/libtemplate)
369 define Package/luci-sgi-cgi/install
370 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
373 define Package/luci-sgi-luci
374 $(call Package/luci/libtemplate)
375 DEPENDS+=+luci-web +luci-httpd
376 TITLE:=SGI for LuCI HTTPD
379 define Package/luci-sgi-luci/install
380 $(call Package/luci/install/template,$(1),libs/sgi-luci)
383 define Package/luci-sgi-webuci
384 $(call Package/luci/libtemplate)
386 TITLE:=SGI for Webuci
389 define Package/luci-sgi-webuci/install
390 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
394 define Package/luci-theme-fledermaus
395 $(call Package/luci/fftemplate)
397 TITLE:=Fledermaus Theme
400 define Package/luci-theme-fledermaus/install
401 $(call Package/luci/install/template,$(1),themes/fledermaus)
404 define Package/luci-theme-openwrt
405 $(call Package/luci/thtemplate)
406 TITLE:=OpenWRT.org (default)
409 define Package/luci-theme-openwrt/install
410 $(call Package/luci/install/template,$(1),themes/openwrt.org)
414 define Package/luci-i18n-german
415 $(call Package/luci/i18ntemplate)
419 define Package/luci-i18n-german/install
420 $(call Package/luci/install/template,$(1),i18n/german)
424 define Package/luci-i18n-english
425 $(call Package/luci/i18ntemplate)
426 TITLE:=English (incomplete)
429 define Package/luci-i18n-english/install
430 $(call Package/luci/install/template,$(1),i18n/english)
436 ifneq ($(CONFIG_PACKAGE_luci-core),)
437 PKG_SELECTED_MODULES+=libs/core
439 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
440 PKG_SELECTED_MODULES+=libs/cbi
442 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
443 PKG_SELECTED_MODULES+=libs/fastindex
445 ifneq ($(CONFIG_PACKAGE_luci-http),)
446 PKG_SELECTED_MODULES+=libs/http
448 ifneq ($(CONFIG_PACKAGE_luci-uci),)
449 PKG_SELECTED_MODULES+=libs/uci
451 ifneq ($(CONFIG_PACKAGE_luci-web),)
452 PKG_SELECTED_MODULES+=libs/web
455 ifneq ($(CONFIG_PACKAGE_luci-httpd),)
456 PKG_SELECTED_MODULES+=libs/httpd
459 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
460 PKG_SELECTED_MODULES+=applications/community-halle
462 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
463 PKG_SELECTED_MODULES+=applications/community-leipzig
465 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
466 PKG_SELECTED_MODULES+=applications/community-hannover
469 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
470 PKG_SELECTED_MODULES+=modules/admin-core
472 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
473 PKG_SELECTED_MODULES+=modules/freifunk
476 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
477 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
479 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
480 PKG_SELECTED_MODULES+=applications/luci-fw
482 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
483 PKG_SELECTED_MODULES+=applications/luci-olsr
485 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
486 PKG_SELECTED_MODULES+=applications/luci-qos
488 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
489 PKG_SELECTED_MODULES+=applications/luci-splash
491 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
492 PKG_SELECTED_MODULES+=applications/luci-statistics
495 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
496 PKG_SELECTED_MODULES+=libs/sgi-cgi
498 ifneq ($(CONFIG_PACKAGE_luci-sgi-luci),)
499 PKG_SELECTED_MODULES+=libs/sgi-luci
501 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
502 PKG_SELECTED_MODULES+=libs/sgi-webuci
505 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
506 PKG_SELECTED_MODULES+=themes/fledermaus
508 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
509 PKG_SELECTED_MODULES+=themes/openwrt.org
512 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
513 PKG_SELECTED_MODULES+=i18n/german
515 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
516 PKG_SELECTED_MODULES+=i18n/english
521 MODULES="$(PKG_SELECTED_MODULES)" \
522 LUA_TARGET="$(LUA_TARGET)" \
523 LUA_SHLIBS="-llua -lm" \
524 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
525 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
529 $(eval $(call BuildPackage,luci-core))
530 $(eval $(call BuildPackage,luci-cbi))
531 $(eval $(call BuildPackage,luci-fastindex))
532 $(eval $(call BuildPackage,luci-http))
533 $(eval $(call BuildPackage,luci-uci))
534 $(eval $(call BuildPackage,luci-web))
536 $(eval $(call BuildPackage,luci-httpd))
538 $(eval $(call BuildPackage,luci-ff-halle))
539 $(eval $(call BuildPackage,luci-ff-leipzig))
540 $(eval $(call BuildPackage,luci-ff-hannover))
542 $(eval $(call BuildPackage,luci-mod-admin-core))
543 $(eval $(call BuildPackage,luci-mod-freifunk))
545 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
546 $(eval $(call BuildPackage,luci-app-firewall))
547 $(eval $(call BuildPackage,luci-app-olsr))
548 $(eval $(call BuildPackage,luci-app-qos))
549 $(eval $(call BuildPackage,luci-app-splash))
550 $(eval $(call BuildPackage,luci-app-statistics))
552 $(eval $(call BuildPackage,luci-sgi-cgi))
553 $(eval $(call BuildPackage,luci-sgi-luci))
554 $(eval $(call BuildPackage,luci-sgi-webuci))
556 $(eval $(call BuildPackage,luci-theme-fledermaus))
557 $(eval $(call BuildPackage,luci-theme-openwrt))
559 $(eval $(call BuildPackage,luci-i18n-german))
560 $(eval $(call BuildPackage,luci-i18n-english))