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
23 include $(INCLUDE_DIR)/package.mk
25 define Build/Configure
28 define Package/luci/compiletpl
29 ifneq ($(CONFIG_PACKAGE_$(1)),)
30 $(MAKE) -C$(PKG_BUILD_DIR)/$(2) build LUA_TARGET=$(LUA_TARGET)
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)
277 $(call Package/luci/compiletpl,luci-core,libs/core)
278 $(call Package/luci/compiletpl,luci-cbi,libs/cbi)
279 $(call Package/luci/compiletpl,luci-web,libs/web)
281 $(call Package/luci/compiletpl,luci-ff-halle,applications/community-halle)
282 $(call Package/luci/compiletpl,luci-ff-leipzig,applications/community-leipzig)
283 $(call Package/luci/compiletpl,luci-ff-hannover,applications/community-hannover)
285 $(call Package/luci/compiletpl,luci-mod-admin-core,modules/admin-core)
286 $(call Package/luci/compiletpl,luci-mod-freifunk,modules/freifunk)
288 $(call Package/luci/compiletpl,luci-app-ffwizard-leipzig,applications/luci-ffwizard-leipzig)
289 $(call Package/luci/compiletpl,luci-app-firewall,applications/luci-fw)
290 $(call Package/luci/compiletpl,luci-app-splash,applications/luci-splash)
291 $(call Package/luci/compiletpl,luci-app-statistics,applications/luci-statistics)
293 $(call Package/luci/compiletpl,luci-sgi-haserl,libs/sgi-haserl)
294 $(call Package/luci/compiletpl,luci-sgi-webuci,libs/sgi-webuci)
298 $(eval $(call BuildPackage,luci-core))
299 $(eval $(call BuildPackage,luci-cbi))
300 $(eval $(call BuildPackage,luci-web))
302 $(eval $(call BuildPackage,luci-ff-halle))
303 $(eval $(call BuildPackage,luci-ff-leipzig))
304 $(eval $(call BuildPackage,luci-ff-hannover))
306 $(eval $(call BuildPackage,luci-mod-admin-core))
307 $(eval $(call BuildPackage,luci-mod-freifunk))
309 $(eval $(call BuildPackage,luci-app-ffwizard-leipzig))
310 $(eval $(call BuildPackage,luci-app-firewall))
311 $(eval $(call BuildPackage,luci-app-splash))
312 $(eval $(call BuildPackage,luci-app-statistics))
314 $(eval $(call BuildPackage,luci-sgi-haserl))
315 $(eval $(call BuildPackage,luci-sgi-webuci))