1 include $(TOPDIR
)/rules.mk
6 USELOCAL
:=$(shell grep luci ..
/..
/..
/.project
2>/dev
/null
>/dev
/null
&& echo
1)
15 PKG_SOURCE_URL
:=http
://svn.luci.subsignal.org
/luci
/$(PKG_BRANCH
)
17 PKG_REV
:=$(shell LC_ALL
=C svn
info $(CURDIR
) | sed
-ne
's/^Revision: //p')
18 PKG_VERSION
:=0.10+svn
$(PKG_REV
)
20 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_SOURCE
:=$(PKG_SOURCE_SUBDIR
).
tar.gz
23 PKG_SOURCE_VERSION
:=$(PKG_REV
)
26 PKG_BUILD_DEPENDS
:=$(if
$(STAGING_DIR_ROOT
),lua
/host
)
27 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
28 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
32 PKG_SELECTED_MODULES
:=
34 ifeq ($(BOARD
),brcm-2.4
)
35 MAKE_FLAGS
+= CRAP
="1"
41 include $(INCLUDE_DIR
)/package.mk
45 mkdir
-p
$(PKG_BUILD_DIR
)
46 $(TAR
) c
-C ..
/..
/..
/ . \
47 --exclude
=.
pc --exclude
=.svn
--exclude
=.git \
48 --exclude
='boa-0*' --exclude
='*.o' --exclude
='*.so' \
50 tar x
-C
$(PKG_BUILD_DIR
)/
54 define Build
/Configure
58 MODULES
="$(PKG_SELECTED_MODULES)" \
59 LUA_TARGET
="$(LUA_TARGET)" \
60 LUA_SHLIBS
="-llua -lm -ldl -lcrypt" \
61 CFLAGS
="$(TARGET_CFLAGS) $(LUCI_CFLAGS) -I$(STAGING_DIR)/usr/include" \
62 LDFLAGS
="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
63 NIXIO_TLS
="$(NIXIO_TLS)" OS
="Linux"
67 define Package
/luci
/install/template
68 $(CP
) -a
$(PKG_BUILD_DIR
)/$(2)/dist/* $(1)/ -R
69 $(CP
) -a
$(PKG_BUILD_DIR
)/$(2)/ipkg
/* $(1)/CONTROL
/ 2>/dev
/null || true
74 define Package
/luci-core
77 TITLE
:=LuCI
- Lua Configuration Interface
78 URL
:=http
://luci.subsignal.org
/
79 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
82 TITLE
:=LuCI core libraries
85 define Package
/luci-core
/install
86 $(call Package
/luci
/install/template
,$(1),libs
/core
)
87 $(PKG_BUILD_DIR
)/build
/mkversion.sh
$(1)/usr
/lib
/lua
/luci
/version.lua \
94 define Package
/luci-core
/config
97 default PACKAGE_luci-core_source
99 config PACKAGE_luci-core_compile
102 config PACKAGE_luci-core_stripped
105 config PACKAGE_luci-core_source
111 ifneq ($(CONFIG_PACKAGE_luci-core_compile
),)
115 ifneq ($(CONFIG_PACKAGE_luci-core_stripped
),)
119 ifneq ($(CONFIG_PACKAGE_luci-core_zipped
),)
123 ifneq ($(CONFIG_PACKAGE_luci-core
),)
124 PKG_SELECTED_MODULES
+=libs
/core
127 BUILD_PACKAGES
+= luci-core
132 define Package
/luci-
$(1)
135 TITLE
:=LuCI
- Lua Configuration Interface
136 URL
:=http
://luci.subsignal.org
/
137 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
139 TITLE
:=$(if
$(2),$(2),LuCI
$(1) library
)
140 $(if
$(3),DEPENDS
:=+luci-core
$(3))
143 define Package
/luci-
$(1)/install
144 $(call Package
/luci
/install/template
,$$(1),libs
/$(1))
145 $(call Package
/luci-
$(1)/extra-install
)
148 ifneq ($(CONFIG_PACKAGE_luci-
$(1)),)
149 PKG_SELECTED_MODULES
+=libs
/$(1)
152 BUILD_PACKAGES
+= luci-
$(1)
155 define Package
/luci-lucid
/extra-install
156 $(call Package
/luci
/install/template
,$(1),libs
/lucid-http
)
159 define Package
/luci-web
/conffiles
163 define Package
/luci-nixio
/config
165 prompt
"TLS Provider"
166 default PACKAGE_luci-nixio_notls
168 config PACKAGE_luci-nixio_notls
171 config PACKAGE_luci-nixio_axtls
172 bool
"Builtin (axTLS)"
174 config PACKAGE_luci-nixio_cyassl
176 select PACKAGE_libcyassl
178 config PACKAGE_luci-nixio_openssl
180 select PACKAGE_libopenssl
187 ifneq ($(CONFIG_PACKAGE_luci-nixio_axtls
),)
191 ifneq ($(CONFIG_PACKAGE_luci-nixio_openssl
),)
195 ifneq ($(CONFIG_PACKAGE_luci-nixio_cyassl
),)
197 LUCI_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/cyassl
201 $(eval
$(call library
,fastindex
,Fastindex indexing module
))
202 $(eval
$(call library
,httpclient
,HTTP
(S
) client library
,+luci-web
+luci-nixio
))
203 $(eval
$(call library
,ipkg
,LuCI IPKG
/OPKG call abstraction library
))
204 $(eval
$(call library
,json
,LuCI JSON library
))
205 $(eval
$(call library
,lmo
,LuCI LMO I18N library
))
206 $(eval
$(call library
,luanet
,LuCI luanet library
,+libiw
))
207 $(eval
$(call library
,lucid
,LuCId Full-Stack Webserver
,+luci-nixio
+luci-web
+luci-px5g
))
208 $(eval
$(call library
,nixio
,NIXIO POSIX library
,+PACKAGE_luci-nixio_openssl
:libopenssl
+PACKAGE_luci-nixio_cyassl
:libcyassl
))
209 $(eval
$(call library
,px5g
,RSA
/X
.509 Key Generator
(required for LuCId SSL support
),+luci-nixio
))
210 $(eval
$(call library
,sys
,LuCI Linux
/POSIX system library
,+libiwinfo
))
211 $(eval
$(call library
,web
,MVC Webframework
,+luci-sys
+luci-nixio
+luci-core
+luci-sgi-cgi
+luci-lmo
))
212 $(eval
$(call library
,uvl
,UVL
- UCI Validation Layer
,+luci-sys
+luci-core
))
215 ### Community Packages ###
216 define Package
/luci-mod-freifunk-community
219 TITLE
:=LuCI
- Lua Configuration Interface
220 URL
:=http
://luci.subsignal.org
/
221 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
223 TITLE
:=Freifunk Community Meta-Package
225 +luci-web
+luci-app-splash \
226 +luci-app-ffwizard-leipzig \
228 +PACKAGE_luci-mod-freifunk-community
:olsrd-luci
+PACKAGE_luci-mod-freifunk-community
:olsrd-luci-mod-dyn-gw-plain \
229 +PACKAGE_luci-mod-freifunk-community
:olsrd-luci-mod-txtinfo
+PACKAGE_luci-mod-freifunk-community
:olsrd-luci-mod-nameservice \
230 +PACKAGE_luci-mod-freifunk-community
:olsrd-luci-mod-watchdog
+PACKAGE_luci-mod-freifunk-community
:kmod-tun \
231 +PACKAGE_luci-mod-freifunk-community
:ip
+PACKAGE_luci-mod-freifunk-community
:freifunk-watchdog
+luci-app-olsr
234 define Package
/luci-mod-freifunk-community
/install
235 $(call Package
/luci
/install/template
,$(1),applications
/freifunk-community
)
238 ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk-community
),)
239 PKG_SELECTED_MODULES
+=applications
/freifunk-community
242 BUILD_PACKAGES
+= luci-mod-freifunk-community
247 define Package
/luci-mod-
$(1)
250 TITLE
:=LuCI
- Lua Configuration Interface
251 URL
:=http
://luci.subsignal.org
/
252 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
254 TITLE
:=$(if
$(2),$(2),LuCI
$(1) module
)
255 $(if
$(3),DEPENDS
+=$(3))
258 define Package
/luci-mod-
$(1)/install
259 $(call Package
/luci
/install/template
,$$(1),modules
/$(1))
260 $(call Package
/luci-mod-
$(1)/extra-install
)
263 ifneq ($(CONFIG_PACKAGE_luci-mod-
$(1)),)
264 PKG_SELECTED_MODULES
+=modules
/$(1)
267 BUILD_PACKAGES
+= luci-mod-
$(1)
271 define Package
/luci-mod-admin-core
/extra-install
272 touch
$(1)/etc
/init.d
/luci_fixtime || true
275 define Package
/luci-mod-freifunk
/conffiles
279 $(eval
$(call module
,admin-core
,Web UI Core module
,+luci-web
+luci-i18n-english
))
280 $(eval
$(call module
,admin-mini
,LuCI Essentials
- stripped down and user-friendly
,+luci-mod-admin-core
))
281 $(eval
$(call module
,admin-full
,LuCI Administration
- full-featured for full control
,+luci-mod-admin-core
+luci-ipkg
))
282 $(eval
$(call module
,rpc
,LuCI RPC
- JSON-RPC API
,+luci-json
))
283 $(eval
$(call module
,freifunk
,LuCI Freifunk module
,+luci-mod-admin-full
+luci-json
+PACKAGE_luci-mod-freifunk
:freifunk-firewall
))
284 $(eval
$(call module
,niu
,NIU
- Next Generation Interface
,+luci-mod-admin-core @BROKEN
))
289 define Package
/luci-app-
$(1)
292 TITLE
:=LuCI
- Lua Configuration Interface
293 URL
:=http
://luci.subsignal.org
/
294 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
295 SUBMENU
:=Applications
296 TITLE
:=$(if
$(2),$(2),LuCI
$(1) application
)
297 DEPENDS
:=+luci-mod-admin-core
$(3)
300 define Package
/luci-app-
$(1)/install
301 $(call Package
/luci
/install/template
,$$(1),applications
/luci-
$(1))
304 ifneq ($(CONFIG_PACKAGE_luci-app-
$(1)),)
305 PKG_SELECTED_MODULES
+=applications
/luci-
$(1)
308 BUILD_PACKAGES
+= luci-app-
$(1)
311 define Package
/luci-app-splash
/conffiles
312 /etc
/config
/luci_splash
315 define Package
/luci-app-statistics
/conffiles
316 /etc
/config
/luci_statistics
319 define Package
/luci-app-diag-devinfo
/conffiles
320 /etc
/config
/luci_devinfo
324 $(eval
$(call application
,ffwizard-leipzig
,Freifunk Leipzig configuration wizard
))
326 $(eval
$(call application
,siitwizard
,SIIT IPv4-over-IPv6 configuration wizard
,\
327 +PACKAGE_luci-app-siitwizard
:kmod-siit
))
329 $(eval
$(call application
,firewall
,Firmware and Portforwarding application
,\
330 +PACKAGE_luci-app-firewall
:firewall
))
332 $(eval
$(call application
,olsr
,OLSR configuration and status module
,\
333 +luci-mod-admin-full
+PACKAGE_luci-app-olsr
:olsrd-luci
+PACKAGE_luci-app-olsr
:olsrd-luci-mod-txtinfo
))
335 $(eval
$(call application
,qos
,Quality of Service configuration module
,\
336 +PACKAGE_luci-app-qos
:qos-scripts
))
338 $(eval
$(call application
,splash
,Freifunk DHCP-Splash application
,\
339 +PACKAGE_luci-app-splash
:luci-nixio
+PACKAGE_luci-app-splash
:tc \
340 +PACKAGE_luci-app-splash
:kmod-sched
+PACKAGE_luci-app-splash
:iptables-mod-nat-extra \
341 +PACKAGE_luci-app-splash
:iptables-mod-ipopt
))
343 $(eval
$(call application
,statistics
,LuCI Statistics Application
,\
344 +luci-mod-admin-full
+PACKAGE_luci-app-statistics
:collectd \
345 +PACKAGE_luci-app-statistics
:rrdtool1 \
346 +PACKAGE_luci-app-statistics
:collectd-mod-rrdtool \
347 +PACKAGE_luci-app-statistics
:collectd-mod-wireless \
348 +PACKAGE_luci-app-statistics
:collectd-mod-interface \
349 +PACKAGE_luci-app-statistics
:collectd-mod-load
))
352 $(eval
$(call application
,diag-core
,LuCI Diagnostics Tools
(Core
)))
354 $(eval
$(call application
,diag-devinfo
,LuCI Diagnostics Tools
(Device Info
),\
355 +luci-app-diag-core \
356 +PACKAGE_luci-app-diag-devinfo
:smap \
357 +PACKAGE_luci-app-diag-devinfo
:netdiscover \
358 +PACKAGE_luci-app-diag-devinfo
:mac-to-devinfo \
359 +PACKAGE_luci-app-diag-devinfo
:httping \
360 +PACKAGE_luci-app-diag-devinfo
:smap-to-devinfo \
361 +PACKAGE_luci-app-diag-devinfo
:netdiscover-to-devinfo
))
363 $(eval
$(call application
,voice-core
,LuCI Voice Software
(Core
)))
365 $(eval
$(call application
,voide-diag
,LuCI Voice Software
(Diagnostics
),\
366 +luci-app-voice-core
+luci-app-diag-devinfo
))
369 $(eval
$(call application
,upnp
,Universal Plug
& Play configuration module
,\
370 +PACKAGE_luci-app-upnp
:miniupnpd
))
372 $(eval
$(call application
,ntpc
,NTP time synchronisation configuration module
,\
373 +PACKAGE_luci-app-ntpc
:ntpclient
))
375 $(eval
$(call application
,ddns
,Dynamic DNS configuration module
,\
376 +PACKAGE_luci-app-ddns
:ddns-scripts
))
378 $(eval
$(call application
,samba
,Network Shares
- Samba SMB
/CIFS module
,\
379 +luci-mod-admin-full
+PACKAGE_luci-app-samba
:samba3
))
381 $(eval
$(call application
,mmc-over-gpio
,MMC-over-GPIO configuration module
,\
382 +luci-mod-admin-full
+PACKAGE_luci-app-mmc-over-gpio
:kmod-mmc-over-gpio
))
384 $(eval
$(call application
,p910nd
,p910nd
- Printer server module
,\
385 +luci-mod-admin-full
+PACKAGE_luci-app-p910nd
:p910nd
))
387 $(eval
$(call application
,ushare
,uShare
- UPnP A
/V
& DLNA Media Server
,\
388 +luci-mod-admin-full
+PACKAGE_luci-app-ushare
:ushare
))
390 $(eval
$(call application
,hd-idle
,Hard Disk Idle Spin-Down module
,\
391 +luci-mod-admin-full
+PACKAGE_luci-app-hd-idle
:hd-idle
))
393 $(eval
$(call application
,tinyproxy
,Tinyproxy
- HTTP
(S
)-Proxy configuration
,\
394 +luci-mod-admin-full
+PACKAGE_luci-app-tinyproxy
:tinyproxy
))
396 $(eval
$(call application
,initmgr
,LuCI Initscript Management
,\
397 +luci-mod-admin-full
))
399 $(eval
$(call application
,livestats
,LuCI Realtime Statistics
,\
402 $(eval
$(call application
,asterisk
,LuCI Support for Asterisk PBX
,\
403 @BROKEN
+PACKAGE_luci-app-asterisk
:asterisk14-xip-core
))
405 $(eval
$(call application
,polipo
,LuCI Support for the Polipo Proxy
,\
406 +PACKAGE_luci-app-polipo
:polipo
))
408 $(eval
$(call application
,openvpn
,LuCI Support for OpenVPN
,\
409 +PACKAGE_luci-app-openvpn
:openvpn
))
411 $(eval
$(call application
,p2pblock
,LuCI Support for the Freifunk P2P-Block addon
,\
412 +luci-app-firewall
+PACKAGE_luci-app-p2pblock
:freifunk-p2pblock
))
414 $(eval
$(call application
,multiwan
,LuCI Support for the OpenWrt MultiWAN agent
,\
415 +luci-app-firewall
+PACKAGE_luci-app-multiwan
:multiwan
))
417 $(eval
$(call application
,wol
,LuCI Support for Wake-on-LAN
,\
418 +PACKAGE_luci-app-wol
:etherwake
))
420 $(eval
$(call application
,vnstat
,LuCI Support for VnStat
,\
421 +PACKAGE_luci-app-vnstat
:vnstat \
422 +PACKAGE_luci-app-vnstat
:vnstati
))
425 ### Server Gateway Interfaces ###
427 define Package
/luci-sgi-
$(1)
430 TITLE
:=LuCI
- Lua Configuration Interface
431 URL
:=http
://luci.subsignal.org
/
432 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
433 SUBMENU
:=Server Interfaces
434 TITLE
:=$(if
$(2),$(2),LuCI
$(1) server gateway interface
)
435 $(if
$(3),DEPENDS
:=$(3))
438 define Package
/luci-sgi-
$(1)/install
439 $(call Package
/luci
/install/template
,$$(1),libs
/sgi-
$(1))
442 ifneq ($(CONFIG_PACKAGE_luci-sgi-
$(1)),)
443 PKG_SELECTED_MODULES
+=libs
/sgi-
$(1)
446 BUILD_PACKAGES
+= luci-sgi-
$(1)
449 $(eval
$(call sgi
,cgi
,CGI Gateway behind existing Webserver
))
450 $(eval
$(call sgi
,uhttpd
,Binding for the uHTTPd server
,+uhttpd
+uhttpd-mod-lua
))
455 define Package
/luci-theme-
$(1)
458 TITLE
:=LuCI
- Lua Configuration Interface
459 URL
:=http
://luci.subsignal.org
/
461 TITLE
:=$(if
$(2),$(2),LuCI
$(1) theme
)
462 MAINTAINER
:=$(if
$(3),$(3),LuCI Development Team
<luci@lists.subsignal.org
>)
463 DEPENDS
:=$(ifneq $(1),base
,+luci-theme-base
) $(4)
464 $(if
$(5),DEFAULT
:=y if PACKAGE_luci-core
)
467 define Package
/luci-theme-
$(1)/install
468 $(call Package
/luci
/install/template
,$$(1),themes
/$(1))
471 ifneq ($(CONFIG_PACKAGE_luci-theme-
$(1)),)
472 PKG_SELECTED_MODULES
+=themes
/$(1)
475 BUILD_PACKAGES
+= luci-theme-
$(1)
478 $(eval
$(call theme
,base
,Common base for
all themes
,,+luci-web
))
479 $(eval
$(call theme
,openwrt
,OpenWrt.org
(default
),,,1))
480 $(eval
$(call theme
,openwrtlight
,OpenWrt.org
- light variant without images
))
481 $(eval
$(call theme
,fledermaus
,Fledermaus Theme
))
483 $(eval
$(call theme
,freifunk
,alternative Freifunk Theme
,\
484 Stefan Pirwitz
<stefan-at-freifunk-bno-dot-de
>))
486 $(eval
$(call theme
,freifunk-bno
,Freifunk Berlin Nordost Theme
,\
487 Stefan Pirwitz
<stefan-at-freifunk-bno-dot-de
>))
489 $(eval
$(call theme
,freifunk-hannover
,Freifunk Hannover Theme
,\
490 Mikolas Bingemer
<mickey-at-freifunk-hannover-dot-de
>))
495 define Package
/luci-i18n-
$(1)
498 TITLE
:=LuCI
- Lua Configuration Interface
499 URL
:=http
://luci.subsignal.org
/
500 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
501 SUBMENU
:=Translations
502 TITLE
:=$(if
$(2),$(2),$(1))
505 define Package
/luci-i18n-
$(1)/install
506 $(call Package
/luci
/install/template
,$$(1),i18n
/$(1))
509 ifneq ($(CONFIG_PACKAGE_luci-i18n-
$(1)),)
510 PKG_SELECTED_MODULES
+=i18n
/$(1)
513 BUILD_PACKAGES
+= luci-i18n-
$(1)
516 $(eval
$(call translation
,german
,German
))
517 $(eval
$(call translation
,english
,English
))
518 $(eval
$(call translation
,french
,French
(by Florian Fainelli
)))
519 $(eval
$(call translation
,italian
,Italian
(by Matteo Croce
)))
520 $(eval
$(call translation
,russian
,Russian
(by Skryabin Dmitry
)))
521 $(eval
$(call translation
,portuguese_brazilian
,Portuguese
(Brazilian
) (by Carlos Cesario
)))
522 $(eval
$(call translation
,japanese
,Japanese
(by Tsukasa Hamano
)))
523 $(eval
$(call translation
,greek
,Greek
(by Vasilis Tsiligiannis
)))
524 $(eval
$(call translation
,catalan
,Catalan
(by Eduard Duran
)))
525 $(eval
$(call translation
,portuguese
,Portuguese
(by Jose Monteiro
)))
526 $(eval
$(call translation
,spanish
,Spanish
(by Guillermo Javier Nardoni
)))
527 $(eval
$(call translation
,vietnamese
,Vietnamese
(by Hong Phuc Dang
)))
528 $(eval
$(call translation
,malay
,Malay
(by Teow Wai Chet
)))
529 $(eval
$(call translation
,norwegian
,Norwegian
(by Lars Hardy
)))
534 define Package
/luci
$(if
$(1),-$(1))
537 TITLE
:=LuCI
- Lua Configuration Interface
538 URL
:=http
://luci.subsignal.org
/
539 MAINTAINER
:=LuCI Development Team
<luci@lists.subsignal.org
>
541 TITLE
:=$(if
$(2),$(2),LuCI
$(if
$(1),$(1),general
) collection
)
542 $(if
$(3),DEPENDS
:=$(3))
545 define Package
/luci
$(if
$(1),-$(1))/install
549 BUILD_PACKAGES
+= luci
$(if
$(1),-$(1))
552 $(eval
$(call collection
,,\
553 Standard OpenWrt set including full and mini admin and the standard theme
,\
554 +uhttpd
+luci-mod-admin-full
+luci-mod-admin-mini
+luci-theme-openwrt \
555 +luci-app-firewall
+luci-app-initmgr
))
557 $(eval
$(call collection
,ssl
,\
558 Standard OpenWrt set with HTTPS support
,\
559 +uhttpd
+uhttpd-mod-tls
+px5g
+luci-mod-admin-full
+luci-mod-admin-mini \
560 +luci-theme-openwrt
+luci-app-firewall
+luci-app-initmgr
))
562 $(eval
$(call collection
,medium
,\
563 Medium package set using only admin full and a theme without graphics
,\
564 +uhttpd
+luci-mod-admin-full
+luci-theme-openwrtlight
))
566 $(eval
$(call collection
,light
,\
567 Minimum package set using only admin mini and a theme without graphics
,\
568 +uhttpd
+luci-mod-admin-mini
+luci-theme-openwrtlight
))
572 PKG_CONFIG_DEPENDS
:= $(patsubst %,CONFIG_PACKAGE_
%,$(BUILD_PACKAGES
))
573 $(foreach b
,$(BUILD_PACKAGES
),$(eval
$(call BuildPackage
,$(b
))))