1 include $(TOPDIR
)/rules.mk
10 PKG_VERSION
:=$(shell $(LUCI_TOPDIR
)/build
/mkrevision.sh
2>/dev
/null || echo unknown
)
12 PKG_BUILD_DEPENDS
:=$(if
$(STAGING_DIR_ROOT
),lua
/host
)
13 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)
14 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
20 LUCI_SELECTED_MODULES
:=
27 $(if
$(patsubst @
%,,$(dep
)), \
28 $(if
$(patsubst luci-
%,,$(dep
)), \
29 +PACKAGE_luci-
$(1):$(dep
), \
35 define Package
/luci-addons
/install/template
36 $(CP
) -a
$(PKG_BUILD_DIR
)/$(2)/dist/* $(1)/ -R
37 $(CP
) -a
$(PKG_BUILD_DIR
)/$(2)/ipkg
/* $(1)/CONTROL
/ 2>/dev
/null || true
41 ### Community Packages ###
42 define Package
/luci-mod-freifunk-community
45 TITLE
:=LuCI
- Lua Configuration Interface
46 URL
:=http
://luci.subsignal.org
/
47 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
49 TITLE
:=Freifunk Community Meta-Package
50 DEPENDS
+=$(call add_deps
,mod-freifunk-community
, \
51 iptables-mod-nat-extra iptables-mod-ipopt \
52 luci-app-splash luci-i18n-german \
53 olsrd olsrd-mod-dyn-gw-plain \
54 olsrd-mod-jsoninfo olsrd-mod-nameservice \
55 olsrd-mod-watchdog kmod-tun \
56 ip freifunk-watchdog luci-app-olsr \
57 luci-app-olsr-services freifunk-gwcheck freifunk-mapupdate \
61 define Package
/luci-mod-freifunk-community
/install
62 $(call Package
/luci-addons
/install/template
,$(1),applications
/freifunk-community
)
65 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk-community
),)
66 LUCI_SELECTED_MODULES
+=applications
/freifunk-community
69 LUCI_BUILD_PACKAGES
+= luci-mod-freifunk-community
74 define Package
/luci-mod-
$(1)
77 TITLE
:=LuCI
- Lua Configuration Interface
78 URL
:=http
://luci.subsignal.org
/
79 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
81 TITLE
:=$(if
$(2),$(2),LuCI
$(1) module
)
82 $(if
$(3),DEPENDS
+=$(3))
85 define Package
/luci-mod-
$(1)/install
86 $(call Package
/luci-addons
/install/template
,$$(1),modules
/$(1))
87 $(call Package
/luci-mod-
$(1)/extra-install
)
90 ifneq ($(CONFIG_PACKAGE_luci-mod-
$(1)),)
91 LUCI_SELECTED_MODULES
+=modules
/$(1)
94 LUCI_BUILD_PACKAGES
+= luci-mod-
$(1)
98 $(eval
$(call module
,freifunk
,LuCI Freifunk module
,+luci-mod-admin-full
+luci-lib-json
+PACKAGE_luci-mod-freifunk
:freifunk-firewall
+freifunk-common
))
103 define Package
/luci-app-
$(1)
106 TITLE
:=LuCI
- Lua Configuration Interface
107 URL
:=http
://luci.subsignal.org
/
108 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
109 SUBMENU
:=3. Applications
110 TITLE
:=$(if
$(2),$(2),LuCI
$(1) application
)
111 DEPENDS
:=$(call add_deps
,app-
$(1),$(3))
114 define Package
/luci-app-
$(1)/install
115 $(call Package
/luci-addons
/install/template
,$$(1),applications
/luci-
$(1))
118 ifneq ($(CONFIG_PACKAGE_luci-app-
$(1)),)
119 LUCI_SELECTED_MODULES
+=applications
/luci-
$(1)
122 LUCI_BUILD_PACKAGES
+= luci-app-
$(1)
125 define Package
/luci-app-splash
/conffiles
126 /etc
/config
/luci_splash
127 /usr
/lib
/luci-splash
/splashtext.html
128 /usr
/lib
/luci-splash
/splashtextinclude.html
131 define Package
/luci-app-statistics
/conffiles
132 /etc
/config
/luci_statistics
135 define Package
/luci-app-diag-devinfo
/conffiles
136 /etc
/config
/luci_devinfo
140 $(eval
$(call application
,siitwizard
,SIIT IPv4-over-IPv6 configuration wizard
,kmod-siit
))
141 $(eval
$(call application
,freifunk-policyrouting
,Policy routing for mesh traffic
,freifunk-policyrouting
))
142 $(eval
$(call application
,freifunk-widgets
,Widgets for the Freifunk index page
,luci-mod-freifunk
))
143 $(eval
$(call application
,meshwizard
, Shellscript based wizard to setup mesh networks
,meshwizard
))
144 $(eval
$(call application
,olsr
,OLSR configuration and status module
,olsrd olsrd-mod-jsoninfo luci-lib-luaneightbl
))
145 $(eval
$(call application
,olsr-viz
,OLSR Visualisation
,luci-app-olsr olsrd olsrd-mod-txtinfo
))
146 $(eval
$(call application
,freifunk-diagnostics
,Tools for network diagnosis like traceroute and ping
))
147 $(eval
$(call application
,olsr-services
,Show services announced with the nameservice plugin
,luci-app-olsr olsrd olsrd-mod-nameservice
))
148 $(eval
$(call application
,splash
,Freifunk DHCP-Splash application
,luci-lib-nixio tc kmod-sched iptables-mod-nat-extra iptables-mod-ipopt
))
150 $(eval
$(call application
,statistics
,LuCI Statistics Application
,\
153 collectd-mod-rrdtool \
154 collectd-mod-iwinfo \
155 collectd-mod-interface \
157 collectd-mod-network
))
160 $(eval
$(call application
,diag-core
,LuCI Diagnostics Tools
(Core
)))
162 $(eval
$(call application
,diag-devinfo
,LuCI Diagnostics Tools
(Device Info
),\
169 netdiscover-to-devinfo
))
171 $(eval
$(call application
,voice-core
,LuCI Voice Software
(Core
)))
172 $(eval
$(call application
,voice-diag
,LuCI Voice Software
(Diagnostics
),luci-app-diag-devinfo
))
174 $(eval
$(call application
,udpxy
,LuCI Support for udpxy
,udpxy
))
175 $(eval
$(call application
,upnp
,Universal Plug
& Play configuration module
,miniupnpd
))
176 $(eval
$(call application
,ntpc
,NTP time synchronisation configuration module
,ntpclient
))
177 $(eval
$(call application
,ddns
,Dynamic DNS configuration module
,ddns-scripts
))
178 $(eval
$(call application
,dump1090
,LuCI Support for dump1090
,dump1090
))
179 $(eval
$(call application
,samba
,Network Shares
- Samba SMB
/CIFS module
,samba36-server
))
180 $(eval
$(call application
,mmc-over-gpio
,MMC-over-GPIO configuration module
,kmod-mmc-over-gpio
))
181 $(eval
$(call application
,p910nd
,p910nd
- Printer server module
,p910nd
))
182 $(eval
$(call application
,ushare
,uShare
- UPnP A
/V
& DLNA Media Server
,ushare
))
183 $(eval
$(call application
,hd-idle
,Hard Disk Idle Spin-Down module
,hd-idle
))
184 $(eval
$(call application
,tinyproxy
,Tinyproxy
- HTTP
(S
)-Proxy configuration
,tinyproxy
))
185 $(eval
$(call application
,polipo
,LuCI Support for the Polipo Proxy
,polipo
))
186 $(eval
$(call application
,ocserv
,LuCI Support for OpenConnect VPN
,ocserv certtool
))
187 $(eval
$(call application
,openvpn
,LuCI Support for OpenVPN
,openvpn
))
188 $(eval
$(call application
,p2pblock
,LuCI Support for the Freifunk P2P-Block addon
,luci-app-firewall freifunk-p2pblock
))
189 $(eval
$(call application
,multiwan
,LuCI Support for the OpenWrt MultiWAN agent
,luci-app-firewall multiwan
))
190 $(eval
$(call application
,wol
,LuCI Support for Wake-on-LAN
,etherwake
))
191 $(eval
$(call application
,vnstat
,LuCI Support for VnStat
,vnstat vnstati
))
192 $(eval
$(call application
,radvd
,LuCI Support for Radvd
,radvd
))
193 $(eval
$(call application
,ahcp
,LuCI Support for AHCPd
,ahcpd
))
194 $(eval
$(call application
,wshaper
,LuCI Support for wshaper
,wshaper
))
196 $(eval
$(call application
,pbx
,LuCI PBX Administration
,\
198 asterisk18-app-authenticate \
199 asterisk18-app-disa \
200 asterisk18-app-setcallerid \
201 asterisk18-app-system \
202 asterisk18-chan-gtalk \
203 asterisk18-codec-a-mu \
204 asterisk18-codec-alaw \
205 asterisk18-func-cut \
206 asterisk18-res-clioriginate \
207 asterisk18-func-channel \
208 asterisk18-chan-local \
209 asterisk18-app-record \
210 asterisk18-app-senddtmf \
211 asterisk18-res-crypto
))
213 $(eval
$(call application
,pbx-voicemail
,LuCI PBX Administration Voicemail Support
,luci-app-pbx asterisk18 msmtp coreutils-base64
))
214 $(eval
$(call application
,ltqtapi
,Lantiq voip
))
215 $(eval
$(call application
,minidlna
,LuCI Support for miniDLNA
,minidlna
))
216 $(eval
$(call application
,shairplay
,LuCI Support for Shairplay
,shairplay
))
217 $(eval
$(call application
,shairport
,LuCI Support for Shairport
,shairport
))
218 $(eval
$(call application
,transmission
,LuCI Support for Transmission
,transmission-daemon
))
219 $(eval
$(call application
,watchcat
,LuCI Support for Watchcat
,watchcat
))
220 $(eval
$(call application
,mjpg-streamer
,MJPG-Streamer service configuration module
,mjpg-streamer
))
224 define Package
/luci-theme-
$(1)
227 TITLE
:=LuCI
- Lua Configuration Interface
228 URL
:=http
://luci.subsignal.org
/
230 TITLE
:=$(if
$(2),$(2),LuCI
$(1) theme
)
231 MAINTAINER
:=$(if
$(3),$(3),LuCI Development Team
<luci@lists.subsignal.org
>)
232 DEPENDS
:=+luci-base
$(4)
235 define Package
/luci-theme-
$(1)/install
236 $(call Package
/luci-addons
/install/template
,$$(1),themes
/$(1))
239 ifneq ($(CONFIG_PACKAGE_luci-theme-
$(1)),)
240 LUCI_SELECTED_MODULES
+=themes
/$(1)
243 LUCI_BUILD_PACKAGES
+= luci-theme-
$(1)
247 $(eval
$(call theme
,freifunk-bno
,Freifunk Berlin Nordost Theme
,\
248 Stefan Pirwitz
<stefan-at-freifunk-bno-dot-de
>))
250 $(eval
$(call theme
,freifunk-generic
,Freifunk Generic Theme
,\
251 Manuel Munz
<freifunk-at-somakoma-dot-de
>))
255 PKG_CONFIG_DEPENDS
=$(patsubst %,CONFIG_PACKAGE_
%,$(LUCI_BUILD_PACKAGES
))
257 include $(INCLUDE_DIR
)/package.mk
260 @if
[ ! -x
$(LUCI_TOPDIR
)/build
/mkrevision.sh
]; then \
261 echo
"*** Repository layout changed!" >&2; \
262 echo
"*** Please change the LuCI url in feeds.conf to http://svn.luci.subsignal.org/luci/trunk and reinstall the feed with" >&2; \
263 echo
"*** ./scripts/feeds update luci; ./scripts/feeds install -a -p luci" >&2; \
266 mkdir
-p
$(PKG_BUILD_DIR
)
267 $(TAR
) c
-C
$(LUCI_TOPDIR
) . \
268 --exclude
=.
pc --exclude
=.svn
--exclude
=.git \
269 --exclude
='*.o' --exclude
='*.so' \
271 tar x
-C
$(PKG_BUILD_DIR
)/
272 $(call Build
/Prepare
/Default
)
275 define Build
/Configure
279 MODULES
="$(LUCI_SELECTED_MODULES)" \
280 LUA_TARGET
="$(LUA_TARGET)" \
281 LUA_SHLIBS
="-llua -lm -ldl -lcrypt" \
282 CFLAGS
="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
283 LDFLAGS
="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
284 NIXIO_TLS
="$(NIXIO_TLS)" OS
="Linux"
287 $(foreach b
,$(LUCI_BUILD_PACKAGES
),$(eval
$(call BuildPackage
,$(b
))))