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.5+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) $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
72 define Package/luci-core
73 $(call Package/luci/libtemplate)
74 DEPENDS:=+lua +luaposix
75 TITLE:=LuCI core libraries
78 define Package/luci-core/install
79 $(call Package/luci/install/template,$(1),libs/core)
82 define Package/luci-core/config
85 default PACKAGE_luci-core_compile
87 config PACKAGE_luci-core_compile
90 config PACKAGE_luci-core_source
96 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
102 define Package/luci-cbi
103 $(call Package/luci/libtemplate)
105 TITLE:=Configuration Binding Interface
108 define Package/luci-cbi/install
109 $(call Package/luci/install/template,$(1),libs/cbi)
113 define Package/luci-fastindex
114 $(call Package/luci/libtemplate)
115 TITLE:=Fastindex indexing module
118 define Package/luci-fastindex/install
119 $(call Package/luci/install/template,$(1),libs/fastindex)
123 define Package/luci-web
124 $(call Package/luci/libtemplate)
125 DEPENDS+=+luci-addons
126 TITLE:=MVC Webframework
129 define Package/luci-web/conffiles
133 define Package/luci-web/install
134 $(call Package/luci/install/template,$(1),libs/web)
139 ### Community Packages ###
141 define Package/luci-ff-halle
142 $(call Package/luci/fftemplate)
144 +luci-sgi-haserl +luci-app-splash \
145 +luci-app-ffwizard-leipzig \
146 +luci-theme-fledermaus \
148 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
150 TITLE:=Freifunk Halle Community Meta-Package
153 define Package/luci-ff-halle/install
154 $(call Package/luci/install/template,$(1),applications/community-halle)
155 $(CP) -a ./ipkg/luci-ff-halle.postinst $(1)/CONTROL/postinst
159 define Package/luci-ff-leipzig
160 $(call Package/luci/fftemplate)
162 +luci-sgi-haserl +luci-app-splash \
163 +luci-app-ffwizard-leipzig \
164 +luci-theme-fledermaus \
166 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
168 TITLE:=Freifunk Leipzig Community Meta-Package
171 define Package/luci-ff-leipzig/install
172 $(call Package/luci/install/template,$(1),applications/community-leipzig)
173 $(CP) -a ./ipkg/luci-ff-leipzig.postinst $(1)/CONTROL/postinst
177 define Package/luci-ff-hannover
178 $(call Package/luci/fftemplate)
180 +luci-sgi-haserl +luci-app-splash \
181 +luci-theme-fledermaus \
183 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
184 TITLE:=Freifunk Hannover Community Meta-Package
185 URL:=http://www.freifunk-hannover.de/
186 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
189 define Package/luci-ff-hannover/install
190 $(call Package/luci/install/template,$(1),applications/community-hannover)
191 $(CP) -a ./ipkg/luci-ff-hannover.postinst $(1)/CONTROL/postinst
197 define Package/luci-mod-admin-core
198 $(call Package/luci/webtemplate)
199 DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
200 TITLE:=Administration module
203 define Package/luci-mod-admin-core/install
204 $(call Package/luci/install/template,$(1),modules/admin-core)
208 define Package/luci-mod-freifunk
209 $(call Package/luci/fftemplate)
210 DEPENDS:=+luci-mod-admin-core
211 TITLE:=LuCI Freifunk module
214 define Package/luci-mod-freifunk/conffiles
218 define Package/luci-mod-freifunk/install
219 $(call Package/luci/install/template,$(1),modules/freifunk)
226 define Package/luci-app-ffwizard-leipzig
227 $(call Package/luci/fftemplate)
228 DEPENDS+=+luci-app-firewall
229 TITLE:=Freifunk Leipzig configuration wizard
232 define Package/luci-app-ffwizard-leipzig/install
233 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
237 define Package/luci-app-firewall
238 $(call Package/luci/webtemplate)
239 DEPENDS+=+luci-mod-admin-core
240 TITLE:=Firewall and Portforwarding application
243 define Package/luci-app-firewall/conffiles
247 define Package/luci-app-firewall/install
248 $(call Package/luci/install/template,$(1),applications/luci-fw)
249 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-fw/dist/etc/init.d/luci_fw $(1)/etc/init.d
253 define Package/luci-app-splash
254 $(call Package/luci/fftemplate)
255 DEPENDS+=+luci-sgi-haserl +iptables-mod-nat +iptables-mod-ipopt
256 TITLE:=Freifunk DHCP-Splash application
259 define Package/luci-app-splash/conffiles
260 /etc/config/luci_splash
263 define Package/luci-app-splash/install
264 $(call Package/luci/install/template,$(1),applications/luci-splash)
265 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/sbin/luci-splash $(1)/usr/sbin
266 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d
267 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely
268 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi $(1)/usr/lib/luci-splash/htdocs/cgi-bin
269 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash
273 define Package/luci-app-statistics
274 $(call Package/luci/webtemplate)
275 DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
276 TITLE:=LuCI Statistics Application
279 define Package/luci-app-statistics/conffiles
280 /etc/config/luci_statistics
283 define Package/luci-app-statistics/install
284 $(call Package/luci/install/template,$(1),applications/luci-statistics)
285 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-statistics/dist/usr/bin/stat-genconfig $(1)/usr/bin
286 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-statistics/dist/etc/init.d/luci_statistics $(1)/etc/init.d
290 ### Server Gateway Interfaces ###
292 define Package/luci-sgi-haserl
293 $(call Package/luci/libtemplate)
294 DEPENDS+=+luci-web +haserl-lua
295 TITLE:=SGI for Haserl
298 define Package/luci-sgi-haserl/install
299 $(call Package/luci/install/template,$(1),libs/sgi-haserl)
300 $(CP) -a ./ipkg/luci-sgi-haserl.postinst $(1)/CONTROL/postinst
304 define Package/luci-sgi-webuci
305 $(call Package/luci/libtemplate)
307 TITLE:=SGI for Webuci
310 define Package/luci-sgi-webuci/install
311 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
315 define Package/luci-theme-fledermaus
316 $(call Package/luci/fftemplate)
318 TITLE:=Fledermaus Theme
321 define Package/luci-theme-fledermaus/install
322 $(call Package/luci/install/template,$(1),themes/fledermaus)
325 define Package/luci-theme-openwrt
326 $(call Package/luci/thtemplate)
327 TITLE:=OpenWRT.org (default)
330 define Package/luci-theme-openwrt/install
331 $(call Package/luci/install/template,$(1),themes/openwrt.org)
335 define Package/luci-i18n-german
336 $(call Package/luci/i18ntemplate)
340 define Package/luci-i18n-german/install
341 $(call Package/luci/install/template,$(1),i18n/german)
345 define Package/luci-i18n-english
346 $(call Package/luci/i18ntemplate)
347 TITLE:=English (incomplete)
350 define Package/luci-i18n-english/install
351 $(call Package/luci/install/template,$(1),i18n/english)
357 ifneq ($(CONFIG_PACKAGE_luci-core),)
358 PKG_SELECTED_MODULES+=libs/core
360 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
361 PKG_SELECTED_MODULES+=libs/cbi
363 ifneq ($(CONFIG_PACKAGE_luci-fastindex),)
364 PKG_SELECTED_MODULES+=libs/fastindex
366 ifneq ($(CONFIG_PACKAGE_luci-web),)
367 PKG_SELECTED_MODULES+=libs/web
370 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
371 PKG_SELECTED_MODULES+=applications/community-halle
373 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
374 PKG_SELECTED_MODULES+=applications/community-leipzig
376 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
377 PKG_SELECTED_MODULES+=applications/community-hannover
380 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
381 PKG_SELECTED_MODULES+=modules/admin-core
383 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
384 PKG_SELECTED_MODULES+=modules/freifunk
387 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
388 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
390 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
391 PKG_SELECTED_MODULES+=applications/luci-fw
393 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
394 PKG_SELECTED_MODULES+=applications/luci-splash
396 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
397 PKG_SELECTED_MODULES+=applications/luci-statistics
400 ifneq ($(CONFIG_PACKAGE_luci-sgi-haserl),)
401 PKG_SELECTED_MODULES+=libs/sgi-haserl
403 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
404 PKG_SELECTED_MODULES+=libs/sgi-webuci
407 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
408 PKG_SELECTED_MODULES+=themes/fledermaus
410 ifneq ($(CONFIG_PACKAGE_luci-theme-openwrt),)
411 PKG_SELECTED_MODULES+=themes/openwrt.org
414 ifneq ($(CONFIG_PACKAGE_luci-i18n-german),)
415 PKG_SELECTED_MODULES+=i18n/german
417 ifneq ($(CONFIG_PACKAGE_luci-i18n-english),)
418 PKG_SELECTED_MODULES+=i18n/english
422 MAKE_FLAGS += MODULES="$(PKG_SELECTED_MODULES)" LUA_TARGET="$(LUA_TARGET)" CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" LDFLAGS="$(TARGET_LDFLAGS)"
425 $(eval $(call BuildPackage,luci-core))
426 $(eval $(call BuildPackage,luci-cbi))
427 $(eval $(call BuildPackage,luci-fastindex))
428 $(eval $(call BuildPackage,luci-web))
430 $(eval $(call BuildPackage,luci-ff-halle))
431 $(eval $(call BuildPackage,luci-ff-leipzig))
432 $(eval $(call BuildPackage,luci-ff-hannover))
434 $(eval $(call BuildPackage,luci-mod-admin-core))
435 $(eval $(call BuildPackage,luci-mod-freifunk))
437 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
438 $(eval $(call BuildPackage,luci-app-firewall))
439 $(eval $(call BuildPackage,luci-app-splash))
440 $(eval $(call BuildPackage,luci-app-statistics))
442 $(eval $(call BuildPackage,luci-sgi-haserl))
443 $(eval $(call BuildPackage,luci-sgi-webuci))
445 $(eval $(call BuildPackage,luci-theme-fledermaus))
446 $(eval $(call BuildPackage,luci-theme-openwrt))
448 $(eval $(call BuildPackage,luci-i18n-german))
449 $(eval $(call BuildPackage,luci-i18n-english))