1 include $(TOPDIR)/rules.mk
4 PKG_SOURCE_URL:=https://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH)
5 PKG_REV:=$(shell LC_ALL=C svn info ${PKG_SOURCE_URL} | sed -ne's/^Last Changed Rev: //p')
8 PKG_VERSION:=0.7+svn$(PKG_REV)
11 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
12 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
14 PKG_SOURCE_VERSION:=$(PKG_REV)
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
20 PKG_SELECTED_MODULES:=
23 include $(INCLUDE_DIR)/package.mk
25 define Build/Configure
30 define Package/luci/libtemplate
32 CATEGORY:=Administration
33 TITLE:=LuCI - Lua Configuration Interface
34 URL:=http://luci.freifunk-halle.net/
35 MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
36 SUBMENU:=LuCI - Libraries
40 define Package/luci/fftemplate
41 $(call Package/luci/libtemplate)
42 SUBMENU:=LuCI - Freifunk Support
43 DEPENDS:=+luci-mod-freifunk
46 define Package/luci/i18ntemplate
47 $(call Package/luci/libtemplate)
48 SUBMENU:=LuCI - Translations
52 define Package/luci/thtemplate
53 $(call Package/luci/libtemplate)
54 SUBMENU:=LuCI - Themes
58 define Package/luci/webtemplate
59 $(call Package/luci/libtemplate)
60 SUBMENU:=LuCI - Webinterface Components
64 define Package/luci/install/template
65 $(CP) -a $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
66 $(CP) -a $(PKG_BUILD_DIR)/$(2)/ipkg/* $(1)/CONTROL/ 2>/dev/null || true
73 define Package/luci-core
74 $(call Package/luci/libtemplate)
75 DEPENDS:=+lua +luaposix
76 TITLE:=LuCI core libraries
79 define Package/luci-core/install
80 $(call Package/luci/install/template,$(1),libs/core)
83 define Package/luci-core/config
86 default PACKAGE_luci-core_compile
88 config PACKAGE_luci-core_compile
91 config PACKAGE_luci-core_source
97 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
103 define Package/luci-cbi
104 $(call Package/luci/libtemplate)
106 TITLE:=Configuration Binding Interface
109 define Package/luci-cbi/install
110 $(call Package/luci/install/template,$(1),libs/cbi)
114 define Package/luci-uci
115 $(call Package/luci/libtemplate)
117 TITLE:=High-Level UCI API
120 define Package/luci-uci/install
121 $(call Package/luci/install/template,$(1),libs/uci)
125 define Package/luci-fastindex
126 $(call Package/luci/libtemplate)
127 TITLE:=Fastindex indexing module
130 define Package/luci-fastindex/install
131 $(call Package/luci/install/template,$(1),libs/fastindex)
135 define Package/luci-http
136 $(call Package/luci/libtemplate)
137 TITLE:=HTTP Protocol implementation
140 define Package/luci-http/install
141 $(call Package/luci/install/template,$(1),libs/http)
145 define Package/luci-web
146 $(call Package/luci/libtemplate)
147 DEPENDS+=+luci-http +luci-addons +luci-uci
148 TITLE:=MVC Webframework
151 define Package/luci-web/conffiles
155 define Package/luci-web/install
156 $(call Package/luci/install/template,$(1),libs/web)
161 ### Community Packages ###
163 define Package/luci-ff-halle
164 $(call Package/luci/fftemplate)
166 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
167 +luci-app-ffwizard-leipzig \
168 +luci-theme-fledermaus \
170 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
172 TITLE:=Freifunk Halle Community Meta-Package
175 define Package/luci-ff-halle/install
176 $(call Package/luci/install/template,$(1),applications/community-halle)
180 define Package/luci-ff-leipzig
181 $(call Package/luci/fftemplate)
183 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
184 +luci-app-ffwizard-leipzig \
185 +luci-theme-fledermaus \
187 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
189 TITLE:=Freifunk Leipzig Community Meta-Package
192 define Package/luci-ff-leipzig/install
193 $(call Package/luci/install/template,$(1),applications/community-leipzig)
197 define Package/luci-ff-hannover
198 $(call Package/luci/fftemplate)
200 +luci-sgi-cgi +luci-app-splash +luci-app-olsr \
201 +luci-theme-fledermaus \
203 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
204 TITLE:=Freifunk Hannover Community Meta-Package
205 URL:=http://www.freifunk-hannover.de/
206 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
209 define Package/luci-ff-hannover/install
210 $(call Package/luci/install/template,$(1),applications/community-hannover)
216 define Package/luci-mod-admin-core
217 $(call Package/luci/webtemplate)
218 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
219 TITLE:=Administration module
222 define Package/luci-mod-admin-core/install
223 $(call Package/luci/install/template,$(1),modules/admin-core)
227 define Package/luci-mod-freifunk
228 $(call Package/luci/fftemplate)
229 DEPENDS:=+luci-mod-admin-core
230 TITLE:=LuCI Freifunk module
233 define Package/luci-mod-freifunk/conffiles
237 define Package/luci-mod-freifunk/install
238 $(call Package/luci/install/template,$(1),modules/freifunk)
245 define Package/luci-app-ffwizard-leipzig
246 $(call Package/luci/fftemplate)
247 DEPENDS+=+luci-app-firewall
248 TITLE:=Freifunk Leipzig configuration wizard
251 define Package/luci-app-ffwizard-leipzig/install
252 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
256 define Package/luci-app-firewall
257 $(call Package/luci/webtemplate)
258 DEPENDS+=+luci-mod-admin-core
259 TITLE:=Firewall and Portforwarding application
262 define Package/luci-app-firewall/conffiles
266 define Package/luci-app-firewall/install
267 $(call Package/luci/install/template,$(1),applications/luci-fw)
271 define Package/luci-app-olsr
272 $(call Package/luci/webtemplate)
273 DEPENDS+=+luci-mod-admin-core +olsrd-mod-txtinfo
274 TITLE:=OLSR configuration and status module
277 define Package/luci-app-olsr/install
278 $(call Package/luci/install/template,$(1),applications/luci-olsr)
282 define Package/luci-app-qos
283 $(call Package/luci/webtemplate)
284 DEPENDS+=+luci-mod-admin-core +qos-scripts
285 TITLE:=Quality of Service configuration module
288 define Package/luci-app-qos/install
289 $(call Package/luci/install/template,$(1),applications/luci-qos)
293 define Package/luci-app-splash
294 $(call Package/luci/fftemplate)
295 DEPENDS+=+iptables-mod-nat +iptables-mod-ipopt
296 TITLE:=Freifunk DHCP-Splash application
299 define Package/luci-app-splash/conffiles
300 /etc/config/luci_splash
303 define Package/luci-app-splash/install
304 $(call Package/luci/install/template,$(1),applications/luci-splash)
308 define Package/luci-app-statistics
309 $(call Package/luci/webtemplate)
310 DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
311 TITLE:=LuCI Statistics Application
314 define Package/luci-app-statistics/conffiles
315 /etc/config/luci_statistics
318 define Package/luci-app-statistics/install
319 $(call Package/luci/install/template,$(1),applications/luci-statistics)
323 ### Server Gateway Interfaces ###
325 define Package/luci-sgi-cgi
326 $(call Package/luci/libtemplate)
331 define Package/luci-sgi-cgi/install
332 $(call Package/luci/install/template,$(1),libs/sgi-cgi)
335 define Package/luci-sgi-webuci
336 $(call Package/luci/libtemplate)
338 TITLE:=SGI for Webuci
341 define Package/luci-sgi-webuci/install
342 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
346 define Package/luci-theme-fledermaus
347 $(call Package/luci/fftemplate)
349 TITLE:=Fledermaus Theme
352 define Package/luci-theme-fledermaus/install
353 $(call Package/luci/install/template,$(1),themes/fledermaus)
356 define Package/luci-theme-openwrt
357 $(call Package/luci/thtemplate)
358 TITLE:=OpenWRT.org (default)
361 define Package/luci-theme-openwrt/install
362 $(call Package/luci/install/template,$(1),themes/openwrt.org)
366 define Package/luci-i18n-german
367 $(call Package/luci/i18ntemplate)
371 define Package/luci-i18n-german/install
372 $(call Package/luci/install/template,$(1),i18n/german)
376 define Package/luci-i18n-english
377 $(call Package/luci/i18ntemplate)
378 TITLE:=English (incomplete)
381 define Package/luci-i18n-english/install
382 $(call Package/luci/install/template,$(1),i18n/english)
388 ifneq ($(CONFIG_PACKAGE_luci-core),)
389 PKG_SELECTED_MODULES+=libs/core
391 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
392 PKG_SELECTED_MODULES+=libs/cbi
394 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
395 PKG_SELECTED_MODULES+=libs/fastindex
397 ifneq ($(CONFIG_PACKAGE_luci-http),)
398 PKG_SELECTED_MODULES+=libs/http
400 ifneq ($(CONFIG_PACKAGE_luci-uci),)
401 PKG_SELECTED_MODULES+=libs/uci
403 ifneq ($(CONFIG_PACKAGE_luci-web),)
404 PKG_SELECTED_MODULES+=libs/web
407 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
408 PKG_SELECTED_MODULES+=applications/community-halle
410 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
411 PKG_SELECTED_MODULES+=applications/community-leipzig
413 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
414 PKG_SELECTED_MODULES+=applications/community-hannover
417 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
418 PKG_SELECTED_MODULES+=modules/admin-core
420 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
421 PKG_SELECTED_MODULES+=modules/freifunk
424 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
425 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
427 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
428 PKG_SELECTED_MODULES+=applications/luci-fw
430 ifneq ($(CONFIG_PACKAGE_luci-app-olsr),)
431 PKG_SELECTED_MODULES+=applications/luci-olsr
433 ifneq ($(CONFIG_PACKAGE_luci-app-qos),)
434 PKG_SELECTED_MODULES+=applications/luci-qos
436 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
437 PKG_SELECTED_MODULES+=applications/luci-splash
439 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
440 PKG_SELECTED_MODULES+=applications/luci-statistics
443 ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
444 PKG_SELECTED_MODULES+=libs/sgi-cgi
446 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
447 PKG_SELECTED_MODULES+=libs/sgi-webuci
450 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
451 PKG_SELECTED_MODULES+=themes/fledermaus
453 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
454 PKG_SELECTED_MODULES+=themes/openwrt.org
457 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
458 PKG_SELECTED_MODULES+=i18n/german
460 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
461 PKG_SELECTED_MODULES+=i18n/english
465 MAKE_FLAGS += MODULES="$(PKG_SELECTED_MODULES)" LUA_TARGET="$(LUA_TARGET)" CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" LDFLAGS="$(TARGET_LDFLAGS)"
468 $(eval $(call BuildPackage,luci-core))
469 $(eval $(call BuildPackage,luci-cbi))
470 $(eval $(call BuildPackage,luci-fastindex))
471 $(eval $(call BuildPackage,luci-http))
472 $(eval $(call BuildPackage,luci-uci))
473 $(eval $(call BuildPackage,luci-web))
475 $(eval $(call BuildPackage,luci-ff-halle))
476 $(eval $(call BuildPackage,luci-ff-leipzig))
477 $(eval $(call BuildPackage,luci-ff-hannover))
479 $(eval $(call BuildPackage,luci-mod-admin-core))
480 $(eval $(call BuildPackage,luci-mod-freifunk))
482 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
483 $(eval $(call BuildPackage,luci-app-firewall))
484 $(eval $(call BuildPackage,luci-app-olsr))
485 $(eval $(call BuildPackage,luci-app-qos))
486 $(eval $(call BuildPackage,luci-app-splash))
487 $(eval $(call BuildPackage,luci-app-statistics))
489 $(eval $(call BuildPackage,luci-sgi-cgi))
490 $(eval $(call BuildPackage,luci-sgi-webuci))
492 $(eval $(call BuildPackage,luci-theme-fledermaus))
493 $(eval $(call BuildPackage,luci-theme-openwrt))
495 $(eval $(call BuildPackage,luci-i18n-german))
496 $(eval $(call BuildPackage,luci-i18n-english))