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 for i in $(PKG_SELECTED_MODULES); do $(MAKE) -C$(PKG_BUILD_DIR)/$$$$i build LUA_TARGET=$(LUA_TARGET); done
35 define Package/luci/libtemplate
37 CATEGORY:=Administration
38 TITLE:=LuCI - Lua Configuration Interface
39 URL:=http://luci.freifunk-halle.net/
40 MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
41 SUBMENU:=LuCI - Libraries
45 define Package/luci/fftemplate
46 $(call Package/luci/libtemplate)
47 SUBMENU:=LuCI - Freifunk Support
48 DEPENDS:=+luci-mod-freifunk
51 define Package/luci/thtemplate
52 $(call Package/luci/libtemplate)
53 SUBMENU:=LuCI - Themes
57 define Package/luci/webtemplate
58 $(call Package/luci/libtemplate)
59 SUBMENU:=LuCI - Webinterface Components
63 define Package/luci/install/template
64 $(CP) $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
71 define Package/luci-core
72 $(call Package/luci/libtemplate)
73 DEPENDS:=+lua +luaposix
74 TITLE:=LuCI core libraries
77 define Package/luci-core/install
78 $(call Package/luci/install/template,$(1),libs/core)
81 define Package/luci-core/config
84 default PACKAGE_luci-core_compile
86 config PACKAGE_luci-core_compile
89 config PACKAGE_luci-core_source
95 ifneq ($(CONFIG_PACKAGE_luci-core_compile),)
101 define Package/luci-cbi
102 $(call Package/luci/libtemplate)
104 TITLE:=Configuration Binding Interface
107 define Package/luci-cbi/install
108 $(call Package/luci/install/template,$(1),libs/cbi)
112 define Package/luci-web
113 $(call Package/luci/libtemplate)
114 DEPENDS+=+luci-addons
115 TITLE:=MVC Webframework
118 define Package/luci-web/conffiles
122 define Package/luci-web/install
123 $(call Package/luci/install/template,$(1),libs/web)
128 ### Community Packages ###
130 define Package/luci-ff-halle
131 $(call Package/luci/fftemplate)
133 +luci-sgi-haserl +luci-app-splash \
134 +luci-app-ffwizard-leipzig \
135 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
137 TITLE:=Freifunk Halle Community Meta-Package
140 define Package/luci-ff-halle/install
141 $(call Package/luci/install/template,$(1),applications/community-halle)
142 $(CP) -a ./ipkg/luci-ff-halle.postinst $(1)/CONTROL/postinst
146 define Package/luci-ff-leipzig
147 $(call Package/luci/fftemplate)
149 +luci-sgi-haserl +luci-app-splash \
150 +luci-app-ffwizard-leipzig \
151 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
153 TITLE:=Freifunk Leipzig Community Meta-Package
156 define Package/luci-ff-leipzig/install
157 $(call Package/luci/install/template,$(1),applications/community-leipzig)
158 $(CP) -a ./ipkg/luci-ff-leipzig.postinst $(1)/CONTROL/postinst
162 define Package/luci-ff-hannover
163 $(call Package/luci/fftemplate)
165 +luci-sgi-haserl +luci-app-splash \
166 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
167 TITLE:=Freifunk Hannover Community Meta-Package
168 URL:=http://www.freifunk-hannover.de/
169 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
172 define Package/luci-ff-hannover/install
173 $(call Package/luci/install/template,$(1),applications/community-hannover)
174 $(CP) -a ./ipkg/luci-ff-hannover.postinst $(1)/CONTROL/postinst
180 define Package/luci-mod-admin-core
181 $(call Package/luci/webtemplate)
182 DEPENDS+=+luci-web +luci-cbi +luci-theme-fledermaus
183 TITLE:=Administration module
186 define Package/luci-mod-admin-core/install
187 $(call Package/luci/install/template,$(1),modules/admin-core)
191 define Package/luci-mod-freifunk
192 $(call Package/luci/fftemplate)
193 DEPENDS:=+luci-mod-admin-core
194 TITLE:=LuCI Freifunk module
197 define Package/luci-mod-freifunk/conffiles
201 define Package/luci-mod-freifunk/install
202 $(call Package/luci/install/template,$(1),modules/freifunk)
209 define Package/luci-app-ffwizard-leipzig
210 $(call Package/luci/fftemplate)
211 DEPENDS+=+luci-app-firewall
212 TITLE:=Freifunk Leipzig configuration wizard
215 define Package/luci-app-ffwizard-leipzig/install
216 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
220 define Package/luci-app-firewall
221 $(call Package/luci/webtemplate)
222 DEPENDS+=+luci-mod-admin-core
223 TITLE:=Firewall and Portforwarding application
226 define Package/luci-app-firewall/conffiles
230 define Package/luci-app-firewall/install
231 $(call Package/luci/install/template,$(1),applications/luci-fw)
232 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-fw/dist/etc/init.d/luci_fw $(1)/etc/init.d
236 define Package/luci-app-splash
237 $(call Package/luci/fftemplate)
238 DEPENDS+=+luci-sgi-haserl +iptables-mod-nat +iptables-mod-ipopt
239 TITLE:=Freifunk DHCP-Splash application
242 define Package/luci-app-splash/conffiles
243 /etc/config/luci_splash
246 define Package/luci-app-splash/install
247 $(call Package/luci/install/template,$(1),applications/luci-splash)
248 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/sbin/luci-splash $(1)/usr/sbin
249 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d
250 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely
251 $(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
252 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash
256 define Package/luci-app-statistics
257 $(call Package/luci/webtemplate)
258 DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
259 TITLE:=LuCI Statistics Application (incomplete)
262 define Package/luci-app-statistics/conffiles
263 /etc/config/luci_statistics
266 define Package/luci-app-statistics/install
267 $(call Package/luci/install/template,$(1),applications/luci-statistics)
268 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-statistics/dist/usr/bin/stat-genconfig $(1)/usr/bin
269 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-statistics/dist/etc/init.d/luci_statistics $(1)/etc/init.d
273 ### Server Gateway Interfaces ###
275 define Package/luci-sgi-haserl
276 $(call Package/luci/libtemplate)
277 DEPENDS+=+luci-web +haserl-lua
278 TITLE:=SGI for Haserl
281 define Package/luci-sgi-haserl/install
282 $(call Package/luci/install/template,$(1),libs/sgi-haserl)
283 $(CP) -a ./ipkg/luci-sgi-haserl.postinst $(1)/CONTROL/postinst
287 define Package/luci-sgi-webuci
288 $(call Package/luci/libtemplate)
290 TITLE:=SGI for Webuci
293 define Package/luci-sgi-webuci/install
294 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
298 define Package/luci-theme-fledermaus
299 $(call Package/luci/thtemplate)
300 TITLE:=Fledermaus (default)
303 define Package/luci-theme-fledermaus/install
304 $(call Package/luci/install/template,$(1),themes/fledermaus)
309 ifneq ($(CONFIG_PACKAGE_luci-core),)
310 PKG_SELECTED_MODULES+=libs/core
312 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
313 PKG_SELECTED_MODULES+=libs/cbi
315 ifneq ($(CONFIG_PACKAGE_luci-web),)
316 PKG_SELECTED_MODULES+=libs/web
319 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
320 PKG_SELECTED_MODULES+=applications/community-halle
322 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
323 PKG_SELECTED_MODULES+=applications/community-leipzig
325 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
326 PKG_SELECTED_MODULES+=applications/community-hannover
329 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
330 PKG_SELECTED_MODULES+=modules/admin-core
332 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
333 PKG_SELECTED_MODULES+=modules/freifunk
336 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
337 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
339 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
340 PKG_SELECTED_MODULES+=applications/luci-fw
342 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
343 PKG_SELECTED_MODULES+=applications/luci-splash
345 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
346 PKG_SELECTED_MODULES+=applications/luci-statistics
349 ifneq ($(CONFIG_PACKAGE_luci-sgi-haserl),)
350 PKG_SELECTED_MODULES+=libs/sgi-haserl
352 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
353 PKG_SELECTED_MODULES+=libs/sgi-webuci
356 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
357 PKG_SELECTED_MODULES+=themes/fledermaus
361 $(eval $(call BuildPackage,luci-core))
362 $(eval $(call BuildPackage,luci-cbi))
363 $(eval $(call BuildPackage,luci-web))
365 $(eval $(call BuildPackage,luci-ff-halle))
366 $(eval $(call BuildPackage,luci-ff-leipzig))
367 $(eval $(call BuildPackage,luci-ff-hannover))
369 $(eval $(call BuildPackage,luci-mod-admin-core))
370 $(eval $(call BuildPackage,luci-mod-freifunk))
372 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
373 $(eval $(call BuildPackage,luci-app-firewall))
374 $(eval $(call BuildPackage,luci-app-splash))
375 $(eval $(call BuildPackage,luci-app-statistics))
377 $(eval $(call BuildPackage,luci-sgi-haserl))
378 $(eval $(call BuildPackage,luci-sgi-webuci))
380 $(eval $(call BuildPackage,luci-theme-fledermaus))