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
19 # LUA_TARGET:=compile LUAC=$(BUILD_DIR_HOST)/lua/luac
21 PKG_SELECTED_MODULES:=
24 include $(INCLUDE_DIR)/package.mk
26 define Build/Configure
31 for i in $(PKG_SELECTED_MODULES); do $(MAKE) -C$(PKG_BUILD_DIR)/$$$$i build LUA_TARGET=$(LUA_TARGET); done
36 define Package/luci/libtemplate
38 CATEGORY:=Administration
39 TITLE:=LuCI - Lua Configuration Interface
40 URL:=http://luci.freifunk-halle.net/
41 MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
42 SUBMENU:=LuCI - Libraries
46 define Package/luci/fftemplate
47 $(call Package/luci/libtemplate)
48 SUBMENU:=LuCI - Freifunk Support
49 DEPENDS:=+luci-mod-freifunk
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)
84 define Package/luci-cbi
85 $(call Package/luci/libtemplate)
87 TITLE:=Configuration Binding Interface
90 define Package/luci-cbi/install
91 $(call Package/luci/install/template,$(1),libs/cbi)
95 define Package/luci-web
96 $(call Package/luci/libtemplate)
98 TITLE:=MVC Webframework
101 define Package/luci-web/conffiles
105 define Package/luci-web/install
106 $(call Package/luci/install/template,$(1),libs/web)
111 ### Community Packages ###
113 define Package/luci-ff-halle
114 $(call Package/luci/fftemplate)
116 +luci-sgi-haserl +luci-app-splash \
117 +luci-app-ffwizard-leipzig \
118 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
120 TITLE:=Freifunk Halle Community Meta-Package
123 define Package/luci-ff-halle/install
124 $(call Package/luci/install/template,$(1),applications/community-halle)
125 $(CP) -a ./ipkg/luci-ff-halle.postinst $(1)/CONTROL/postinst
129 define Package/luci-ff-leipzig
130 $(call Package/luci/fftemplate)
132 +luci-sgi-haserl +luci-app-splash \
133 +luci-app-ffwizard-leipzig \
134 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
136 TITLE:=Freifunk Leipzig Community Meta-Package
139 define Package/luci-ff-leipzig/install
140 $(call Package/luci/install/template,$(1),applications/community-leipzig)
141 $(CP) -a ./ipkg/luci-ff-leipzig.postinst $(1)/CONTROL/postinst
145 define Package/luci-ff-hannover
146 $(call Package/luci/fftemplate)
148 +luci-sgi-haserl +luci-app-splash \
149 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
150 TITLE:=Freifunk Hannover Community Meta-Package
151 URL:=http://www.freifunk-hannover.de/
152 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
155 define Package/luci-ff-hannover/install
156 $(call Package/luci/install/template,$(1),applications/community-hannover)
157 $(CP) -a ./ipkg/luci-ff-hannover.postinst $(1)/CONTROL/postinst
163 define Package/luci-mod-admin-core
164 $(call Package/luci/webtemplate)
165 DEPENDS+=+luci-web +luci-cbi +luci-theme-fledermaus
166 TITLE:=Administration module
169 define Package/luci-mod-admin-core/install
170 $(call Package/luci/install/template,$(1),modules/admin-core)
174 define Package/luci-mod-freifunk
175 $(call Package/luci/fftemplate)
176 DEPENDS:=+luci-mod-admin-core
177 TITLE:=LuCI Freifunk module
180 define Package/luci-mod-freifunk/conffiles
184 define Package/luci-mod-freifunk/install
185 $(call Package/luci/install/template,$(1),modules/freifunk)
192 define Package/luci-app-ffwizard-leipzig
193 $(call Package/luci/fftemplate)
194 DEPENDS+=+luci-app-firewall
195 TITLE:=Freifunk Leipzig configuration wizard
198 define Package/luci-app-ffwizard-leipzig/install
199 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
203 define Package/luci-app-firewall
204 $(call Package/luci/webtemplate)
205 DEPENDS+=+luci-mod-admin-core
206 TITLE:=Firewall and Portforwarding application
209 define Package/luci-app-firewall/conffiles
213 define Package/luci-app-firewall/install
214 $(call Package/luci/install/template,$(1),applications/luci-fw)
215 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-fw/dist/etc/init.d/luci_fw $(1)/etc/init.d
219 define Package/luci-app-splash
220 $(call Package/luci/fftemplate)
221 DEPENDS+=+luci-sgi-haserl +iptables-mod-nat +iptables-mod-ipopt
222 TITLE:=Freifunk DHCP-Splash application
225 define Package/luci-app-splash/conffiles
226 /etc/config/luci_splash
229 define Package/luci-app-splash/install
230 $(call Package/luci/install/template,$(1),applications/luci-splash)
231 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/sbin/luci-splash $(1)/usr/sbin
232 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d
233 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely
234 $(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
235 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash
239 define Package/luci-app-statistics
240 $(call Package/luci/webtemplate)
241 DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
242 TITLE:=LuCI Statistics Application (incomplete)
245 define Package/luci-app-statistics/conffiles
246 /etc/config/luci_statistics
249 define Package/luci-app-statistics/install
250 $(call Package/luci/install/template,$(1),applications/luci-statistics)
251 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-statistics/dist/usr/bin/stat-genconfig $(1)/usr/bin
252 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-statistics/dist/etc/init.d/luci_statistics $(1)/etc/init.d
256 ### Server Gateway Interfaces ###
258 define Package/luci-sgi-haserl
259 $(call Package/luci/libtemplate)
260 DEPENDS+=+luci-web +haserl-lua
261 TITLE:=SGI for Haserl
264 define Package/luci-sgi-haserl/install
265 $(call Package/luci/install/template,$(1),libs/sgi-haserl)
266 $(CP) -a ./ipkg/luci-sgi-haserl.postinst $(1)/CONTROL/postinst
270 define Package/luci-sgi-webuci
271 $(call Package/luci/libtemplate)
273 TITLE:=SGI for Webuci
276 define Package/luci-sgi-webuci/install
277 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
281 define Package/luci-theme-fledermaus
282 $(call Package/luci/thtemplate)
283 TITLE:=Fledermaus (default)
286 define Package/luci-theme-fledermaus/install
287 $(call Package/luci/install/template,$(1),themes/fledermaus)
292 ifneq ($(CONFIG_PACKAGE_luci-core),)
293 PKG_SELECTED_MODULES+=libs/core
295 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
296 PKG_SELECTED_MODULES+=libs/cbi
298 ifneq ($(CONFIG_PACKAGE_luci-web),)
299 PKG_SELECTED_MODULES+=libs/web
302 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
303 PKG_SELECTED_MODULES+=applications/community-halle
305 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
306 PKG_SELECTED_MODULES+=applications/community-leipzig
308 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
309 PKG_SELECTED_MODULES+=applications/community-hannover
312 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
313 PKG_SELECTED_MODULES+=modules/admin-core
315 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
316 PKG_SELECTED_MODULES+=modules/freifunk
319 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
320 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
322 ifneq ($(CONFIG_PACKAGE_luci-app-firewall),)
323 PKG_SELECTED_MODULES+=applications/luci-fw
325 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
326 PKG_SELECTED_MODULES+=applications/luci-splash
328 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
329 PKG_SELECTED_MODULES+=applications/luci-statistics
332 ifneq ($(CONFIG_PACKAGE_luci-sgi-haserl),)
333 PKG_SELECTED_MODULES+=libs/sgi-haserl
335 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
336 PKG_SELECTED_MODULES+=libs/sgi-webuci
339 ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),)
340 PKG_SELECTED_MODULES+=themes/fledermaus
344 $(eval $(call BuildPackage,luci-core))
345 $(eval $(call BuildPackage,luci-cbi))
346 $(eval $(call BuildPackage,luci-web))
348 $(eval $(call BuildPackage,luci-ff-halle))
349 $(eval $(call BuildPackage,luci-ff-leipzig))
350 $(eval $(call BuildPackage,luci-ff-hannover))
352 $(eval $(call BuildPackage,luci-mod-admin-core))
353 $(eval $(call BuildPackage,luci-mod-freifunk))
355 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
356 $(eval $(call BuildPackage,luci-app-firewall))
357 $(eval $(call BuildPackage,luci-app-splash))
358 $(eval $(call BuildPackage,luci-app-statistics))
360 $(eval $(call BuildPackage,luci-sgi-haserl))
361 $(eval $(call BuildPackage,luci-sgi-webuci))
363 $(eval $(call BuildPackage,luci-theme-fledermaus))