[packages] radvd: update to 1.7

* add RFC6106 DNSSL and clients init script options
 * add route, DNSSL and clients config sections
 * remove now ignored AdvRDNSSPreference and AdvRDNSSOpen pre RFC5006 options
 * remove empty route bool options
 * remove obsolete avr32 patch
 * use PKG_INSTALL, CONFIGURE_ARGS and MAKE_FLAGS


git-svn-id: svn://svn.openwrt.org/openwrt/packages@25224 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
swalker 2011-01-29 01:04:03 +00:00
parent 22e465c89a
commit 79e179e291
4 changed files with 103 additions and 59 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -8,13 +8,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=radvd
PKG_VERSION:=1.6
PKG_VERSION:=1.7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://v6web.litech.org/radvd/dist \
http://download.sourcemage.org/mirror
PKG_MD5SUM:=987e0660d68b4501b24dc5a068cea83c
PKG_MD5SUM:=5ec417bde33964a07231ddf6353177c8
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
@ -30,21 +32,13 @@ define Package/radvd/description
IPv6 Routing Advertisement Daemon.
endef
define Build/Configure
$(call Build/Configure/Default,\
--with-configfile=/etc/radvd.conf \
--with-logfile=/var/log/radvd.log \
--with-pidfile=/var/run/radvd.pid \
)
endef
CONFIGURE_ARGS += \
--with-configfile=/etc/radvd.conf \
--with-logfile=/var/log/radvd.log \
--with-pidfile=/var/run/radvd.pid
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
radvd_LDADD=""
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
install
endef
MAKE_FLAGS += \
radvd_LDADD=""
define Package/radvd/conffiles
/etc/config/radvd

View File

@ -14,8 +14,23 @@ config prefix
option AdvRouterAddr 0
option ignore 1
config route
option interface 'lan'
option prefix ''
option ignore 1
config rdnss
option interface 'lan'
# If not specified, the link-local address of the interface is used
option addr ''
option ignore 1
config dnssl
option interface 'lan'
option suffix ''
option ignore 1
config clients
option interface 'lan'
option client ''
option ignore 1

View File

@ -9,10 +9,10 @@ RADVD_PREFIX_STRING_OPTIONS='AdvValidLifetime AdvPreferredLifetime'
RADVD_PREFIX_BOOLEAN_OPTIONS='AdvOnLink AdvAutonomous AdvRouterAddr'
RADVD_ROUTE_STRING_OPTIONS='AdvRouteLifetime AdvRoutePreference'
RADVD_ROUTE_BOOLEAN_OPTIONS=''
RADVD_RDNSS_STRING_OPTIONS='AdvRDNSSPreference AdvRDNSSLifetime'
RADVD_RDNSS_BOOLEAN_OPTIONS='AdvRDNSSOpen'
RADVD_RDNSS_STRING_OPTIONS='AdvRDNSSLifetime'
RADVD_DNSSL_STRING_OPTIONS='AdvDNSSLLifetime'
validate_varname() {
local varname=$1
@ -255,17 +255,6 @@ radvd_write_route() {
printf '\t\t%s %s;\n' "$name" "$value"
done
for name in $RADVD_ROUTE_BOOLEAN_OPTIONS; do
config_get value "$cfg" "$name"
[ -z "$value" ] && continue
config_get_bool value "$cfg" "$name" 0
if [ "$value" -ne 0 ]; then
printf '\t\t%s on;\n' "$name"
else
printf '\t\t%s off;\n' "$name"
fi
done
printf '\t};\n'
done
@ -317,15 +306,77 @@ radvd_write_rdnss() {
printf '\t\t%s %s;\n' "$name" "$value"
done
for name in $RADVD_RDNSS_BOOLEAN_OPTIONS; do
printf '\t};\n'
return 0
}
radvd_write_dnssl() {
local cfg=$1
validate_varname "$cfg" || return 0
local ignore
local interfaces
local interface
local suffixes
local suffix
local suffix_list
local name
local value
config_get_bool ignore "$cfg" ignore 0
[ "$ignore" -ne 0 ] && return 0
config_get interfaces "$cfg" interface
exist=0
for interface in $interfaces; do
[ "$INTERFACE" = "$interface" ] && exist=1
done
[ "$exist" -eq 0 ] && return 0
config_get suffixes "$cfg" suffix
for suffix in $suffixes; do
validate_radvd_string "$suffix" || continue
suffix_list="$suffix_list $suffix"
done
printf '\n\tDNSSL%s\n\t{\n' "$suffix_list"
for name in $RADVD_DNSSL_STRING_OPTIONS; do
config_get value "$cfg" "$name"
[ -z "$value" ] && continue
config_get_bool value "$cfg" "$name" 0
if [ "$value" -ne 0 ]; then
printf '\t\t%s on;\n' "$name"
else
printf '\t\t%s off;\n' "$name"
fi
validate_radvd_string "$value" || continue
printf '\t\t%s %s;\n' "$name" "$value"
done
printf '\t};\n'
return 0
}
radvd_write_clients() {
local cfg=$1
validate_varname "$cfg" || return 0
local ignore
local interfaces
local interface
local clients
local client
config_get_bool ignore "$cfg" ignore 0
[ "$ignore" -ne 0 ] && return 0
config_get interfaces "$cfg" interface
exist=0
for interface in $interfaces; do
[ "$INTERFACE" = "$interface" ] && exist=1
done
[ "$exist" -eq 0 ] && return 0
printf '\n\tclients\n\t{\n'
config_get clients "$cfg" client
for client in $clients; do
validate_ip6addr "$client" || continue
printf '\t\t%s;\n' "$client"
done
printf '\t};\n'
@ -341,6 +392,8 @@ radvd_write_config() {
config_foreach radvd_add_interface prefix
config_foreach radvd_add_interface route
config_foreach radvd_add_interface RDNSS
config_foreach radvd_add_interface DNSSL
config_foreach radvd_add_interface clients
for INTERFACE in $RADVD_INTERFACES; do
IFNAME=$(get_ifname "$INTERFACE") || continue
@ -349,6 +402,8 @@ radvd_write_config() {
config_foreach radvd_write_prefix prefix
config_foreach radvd_write_route route
config_foreach radvd_write_rdnss rdnss
config_foreach radvd_write_dnssl dnssl
config_foreach radvd_write_clients clients
printf '};\n\n'
done

View File

@ -1,20 +0,0 @@
--- a/config.sub
+++ b/config.sub
@@ -228,7 +228,7 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| c4x | clipper \
| d10v | d30v | dsp16xx \
| fr30 \
@@ -282,7 +282,7 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c54x-* \
| clipper-* | cray2-* | cydra-* \