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/webtemplate
53 $(call Package/luci/libtemplate)
54 SUBMENU:=LuCI - Webinterface Components
58 define Package/luci/install/template
59 $(CP) $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R
66 define Package/luci-core
67 $(call Package/luci/libtemplate)
68 DEPENDS:=+lua +luaposix
69 TITLE:=LuCI core libraries
72 define Package/luci-core/install
73 $(call Package/luci/install/template,$(1),libs/core)
78 define Package/luci-cbi
79 $(call Package/luci/libtemplate)
81 TITLE:=Configuration Binding Interface
84 define Package/luci-cbi/install
85 $(call Package/luci/install/template,$(1),libs/cbi)
89 define Package/luci-web
90 $(call Package/luci/libtemplate)
92 TITLE:=MVC Webframework
95 define Package/luci-web/conffiles
99 define Package/luci-web/install
100 $(call Package/luci/install/template,$(1),libs/web)
101 $(call Package/luci/install/template,$(1),themes/fledermaus)
106 ### Community Packages ###
108 define Package/luci-ff-halle
109 $(call Package/luci/fftemplate)
111 +luci-sgi-haserl +luci-app-splash \
112 +luci-app-ffwizard-leipzig \
113 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
115 TITLE:=Freifunk Halle Community Meta-Package
118 define Package/luci-ff-halle/install
119 $(call Package/luci/install/template,$(1),applications/community-halle)
120 $(CP) -a ./ipkg/luci-ff-halle.postinst $(1)/CONTROL/postinst
124 define Package/luci-ff-leipzig
125 $(call Package/luci/fftemplate)
127 +luci-sgi-haserl +luci-app-splash \
128 +luci-app-ffwizard-leipzig \
129 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \
131 TITLE:=Freifunk Leipzig Community Meta-Package
134 define Package/luci-ff-leipzig/install
135 $(call Package/luci/install/template,$(1),applications/community-leipzig)
136 $(CP) -a ./ipkg/luci-ff-leipzig.postinst $(1)/CONTROL/postinst
140 define Package/luci-ff-hannover
141 $(call Package/luci/fftemplate)
143 +luci-sgi-haserl +luci-app-splash \
144 +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice
145 TITLE:=Freifunk Hannover Community Meta-Package
146 URL:=http://www.freifunk-hannover.de/
147 MAINTAINER:=Mickey Knox <mickey-at-netfreaks-dot-org>
150 define Package/luci-ff-hannover/install
151 $(call Package/luci/install/template,$(1),applications/community-hannover)
152 $(CP) -a ./ipkg/luci-ff-hannover.postinst $(1)/CONTROL/postinst
158 define Package/luci-mod-admin-core
159 $(call Package/luci/webtemplate)
160 DEPENDS+=+luci-web +luci-cbi
161 TITLE:=Administration module
164 define Package/luci-mod-admin-core/install
165 $(call Package/luci/install/template,$(1),modules/admin-core)
169 define Package/luci-mod-freifunk
170 $(call Package/luci/fftemplate)
171 DEPENDS:=+luci-mod-admin-core
172 TITLE:=LuCI Freifunk module
175 define Package/luci-mod-freifunk/conffiles
179 define Package/luci-mod-freifunk/install
180 $(call Package/luci/install/template,$(1),modules/freifunk)
187 define Package/luci-app-ffwizard-leipzig
188 $(call Package/luci/fftemplate)
189 DEPENDS+=+luci-app-firewall
190 TITLE:=Freifunk Leipzig configuration wizard
193 define Package/luci-app-ffwizard-leipzig/install
194 $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig)
198 define Package/luci-app-firewall
199 $(call Package/luci/webtemplate)
200 DEPENDS+=+luci-mod-admin-core
201 TITLE:=Firewall and Portforwarding application
204 define Package/luci-app-firewall/conffiles
208 define Package/luci-app-firewall/install
209 $(call Package/luci/install/template,$(1),applications/luci-fw)
210 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-fw/dist/etc/init.d/luci_fw $(1)/etc/init.d
214 define Package/luci-app-splash
215 $(call Package/luci/fftemplate)
216 DEPENDS+=+luci-sgi-haserl +iptables-mod-nat +iptables-mod-ipopt
217 TITLE:=Freifunk DHCP-Splash application
220 define Package/luci-app-splash/conffiles
221 /etc/config/luci_splash
224 define Package/luci-app-splash/install
225 $(call Package/luci/install/template,$(1),applications/luci-splash)
226 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/sbin/luci-splash $(1)/usr/sbin
227 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d
228 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely
229 $(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
230 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash
234 define Package/luci-app-statistics
235 $(call Package/luci/webtemplate)
236 DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
237 TITLE:=LuCI Statistics Application (incomplete)
240 define Package/luci-app-statistics/conffiles
241 /etc/config/luci_statistics
244 define Package/luci-app-statistics/install
245 $(call Package/luci/install/template,$(1),applications/luci-statistics)
246 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-statistics/dist/usr/bin/stat-genconfig $(1)/usr/bin
247 $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-statistics/dist/etc/init.d/luci_statistics $(1)/etc/init.d
251 ### Server Gateway Interfaces ###
253 define Package/luci-sgi-haserl
254 $(call Package/luci/libtemplate)
255 DEPENDS+=+luci-web +haserl-lua
256 TITLE:=SGI for Haserl
259 define Package/luci-sgi-haserl/install
260 $(call Package/luci/install/template,$(1),libs/sgi-haserl)
261 $(CP) -a ./ipkg/luci-sgi-haserl.postinst $(1)/CONTROL/postinst
265 define Package/luci-sgi-webuci
266 $(call Package/luci/libtemplate)
268 TITLE:=SGI for Webuci
271 define Package/luci-sgi-webuci/install
272 $(call Package/luci/install/template,$(1),libs/sgi-webuci)
275 ### Compile Templates ###
276 ifneq ($(CONFIG_PACKAGE_luci-core),)
277 PKG_SELECTED_MODULES+=libs/core
279 ifneq ($(CONFIG_PACKAGE_luci-cbi),)
280 PKG_SELECTED_MODULES+=libs/cbi
282 ifneq ($(CONFIG_PACKAGE_luci-web),)
283 PKG_SELECTED_MODULES+=libs/web
286 ifneq ($(CONFIG_PACKAGE_luci-ff-halle),)
287 PKG_SELECTED_MODULES+=applications/community-halle
289 ifneq ($(CONFIG_PACKAGE_luci-ff-leipzig),)
290 PKG_SELECTED_MODULES+=applications/community-leipzig
292 ifneq ($(CONFIG_PACKAGE_luci-ff-hannover),)
293 PKG_SELECTED_MODULES+=applications/community-hannover
296 ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
297 PKG_SELECTED_MODULES+=modules/admin-core
299 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
300 PKG_SELECTED_MODULES+=modules/freifunk
303 ifneq ($(CONFIG_PACKAGE_luci-app-ffwizard-leipzig),)
304 PKG_SELECTED_MODULES+=applications/luci-ffwizard-leipzig
306 ifneq ($(CONFIG_PACKAGE_luci-app-splash),)
307 PKG_SELECTED_MODULES+=applications/luci-splash
309 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
310 PKG_SELECTED_MODULES+=applications/luci-statistics
313 ifneq ($(CONFIG_PACKAGE_luci-sgi-haserl),)
314 PKG_SELECTED_MODULES+=libs/sgi-haserl
316 ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),)
317 PKG_SELECTED_MODULES+=libs/sgi-webuci
321 $(eval $(call BuildPackage,luci-core))
322 $(eval $(call BuildPackage,luci-cbi))
323 $(eval $(call BuildPackage,luci-web))
325 $(eval $(call BuildPackage,luci-ff-halle))
326 $(eval $(call BuildPackage,luci-ff-leipzig))
327 $(eval $(call BuildPackage,luci-ff-hannover))
329 $(eval $(call BuildPackage,luci-mod-admin-core))
330 $(eval $(call BuildPackage,luci-mod-freifunk))
332 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
333 $(eval $(call BuildPackage,luci-app-firewall))
334 $(eval $(call BuildPackage,luci-app-splash))
335 $(eval $(call BuildPackage,luci-app-statistics))
337 $(eval $(call BuildPackage,luci-sgi-haserl))
338 $(eval $(call BuildPackage,luci-sgi-webuci))