include $(TOPDIR)/rules.mk
PKG_NAME:=ddns-scripts
-# Version == major.minor.patch
-# increase on new functionality (minor) or patches (patch)
PKG_VERSION:=2.7.8
-# Release == build
-# increase on changes of services files or tld_names.dat
PKG_RELEASE:=24
PKG_LICENSE:=GPL-2.0
-PKG_MAINTAINER:=
include $(INCLUDE_DIR)/package.mk
-# no default dependencies
-PKG_DEFAULT_DEPENDS=
-
define Package/ddns-scripts/Default
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=IP Addresses and Names
- PKGARCH:=all
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ PKGARCH:=all
endef
-###### *************************************************************************
+
define Package/ddns-scripts
- $(call Package/ddns-scripts/Default)
- TITLE:=Dynamic DNS Client scripts (with IPv6 support)
+ $(call Package/ddns-scripts/Default)
+ TITLE:=Dynamic DNS Client scripts (with IPv6 support)
endef
-# shown in LuCI package description
+
define Package/ddns-scripts/description
- Dynamic DNS Client scripts (with IPv6 support) - Info: https://openwrt.org/docs/guide-user/services/ddns/client
-endef
-# shown in menuconfig <Help>
-define Package/ddns-scripts/config
- help
- A highly configurable set of scripts for doing dynamic dns updates.
- - IPv6 support
- - DNS server support
- - Glue Record support (require BIND host or KNOT host)
- - DNS requests via TCP
- - Proxy server support
- - log file support
- - support to run once
- Version: $(PKG_VERSION)-$(PKG_RELEASE)
- Info : https://openwrt.org/docs/guide-user/services/ddns/client
+ Dynamic DNS Client scripts (with IPv6 support)
+ A highly configurable set of scripts for doing dynamic dns updates.
+ - IPv6 support
+ - DNS server support
+ - Glue Record support (require BIND host or KNOT host)
+ - DNS requests via TCP
+ - Proxy server support
+ - log file support
+ - support to run once
+ Version: $(PKG_VERSION)-$(PKG_RELEASE)
+ Info : https://openwrt.org/docs/guide-user/services/ddns/client
endef
-###### *************************************************************************
+define Package/ddns-scripts/conffiles
+/etc/config/ddns
+endef
+
+
define Package/ddns-scripts_cloudflare.com-v4
- $(call Package/ddns-scripts/Default)
- TITLE:=CloudFlare.com API v4 (requires cURL)
- DEPENDS:=ddns-scripts +curl
+ $(call Package/ddns-scripts/Default)
+ TITLE:=CloudFlare.com API v4 (requires cURL)
+ DEPENDS:=ddns-scripts +curl
endef
+
define Package/ddns-scripts_cloudflare.com-v4/description
- Dynamic DNS Client scripts extension for CloudFlare.com API-v4 (require/install cURL)
+ Dynamic DNS Client scripts extension for CloudFlare.com API-v4 (require/install cURL)
endef
-###### *************************************************************************
+
define Package/ddns-scripts_freedns_42_pl
- $(call Package/ddns-scripts/Default)
- TITLE:=DDNS extension for FreeDNS.42.pl (requires cURL)
- DEPENDS:=ddns-scripts +curl
+ $(call Package/ddns-scripts/Default)
+ TITLE:=DDNS extension for FreeDNS.42.pl (requires cURL)
+ DEPENDS:=ddns-scripts +curl
endef
+
define Package/ddns-scripts_freedns_42_pl/description
- Dynamic DNS Client scripts extension for freedns.42.pl
+ Dynamic DNS Client scripts extension for freedns.42.pl
endef
-###### *************************************************************************
+
define Package/ddns-scripts_godaddy.com-v1
- $(call Package/ddns-scripts/Default)
- TITLE:=GoDaddy.com (require cURL)
- DEPENDS:=ddns-scripts +curl
+ $(call Package/ddns-scripts/Default)
+ TITLE:=GoDaddy.com (require cURL)
+ DEPENDS:=ddns-scripts +curl
endef
+
define Package/ddns-scripts_godaddy.com-v1/description
- Dynamic DNS Client scripts extension for GoDaddy.com (require/install cURL)
+ Dynamic DNS Client scripts extension for GoDaddy.com (require/install cURL)
endef
-###### *************************************************************************
+
define Package/ddns-scripts_digitalocean.com-v2
- $(call Package/ddns-scripts/Default)
- TITLE:=digitalocean.com (require cURL)
- DEPENDS:=ddns-scripts +curl
+ $(call Package/ddns-scripts/Default)
+ TITLE:=digitalocean.com (require cURL)
+ DEPENDS:=ddns-scripts +curl
endef
+
define Package/ddns-scripts_digitalocean.com-v2/description
- Dynamic DNS Client scripts extension for digitalocean.com (require/install cURL)
+ Dynamic DNS Client scripts extension for digitalocean.com (require/install cURL)
+ The script directly updates a DNS record using the DO API. It requires
+ "option dns_server" to be set to the server to be used by nsupdate.
+ "option domain" the dns domain to update the record for (eg. A-record: home.<example.com>)
+ "option username" the dns record name to update (eg. A-record: <home>.example.com)
+ "option param_opt" the id of the dns record to update (check using chrome inspector in the DO dns tab)
+ "option password" the api token generated in the DO panel
endef
-define Package/ddns-scripts_digitalocean.com-v2/config
- help
- The script directly updates a DNS record using the DO API. It requires
- "option dns_server" to be set to the server to be used by nsupdate.
- "option domain" the dns domain to update the record for (eg. A-record: home.<example.com>)
- "option username" the dns record name to update (eg. A-record: <home>.example.com)
- "option param_opt" the id of the dns record to update (check using chrome inspector in the DO dns tab)
- "option password" the api token generated in the DO panel
-endef
-###### *************************************************************************
define Package/ddns-scripts_no-ip_com
- $(call Package/ddns-scripts/Default)
- TITLE:=DDNS extension for No-IP.com
- DEPENDS:=ddns-scripts
+ $(call Package/ddns-scripts/Default)
+ TITLE:=DDNS extension for No-IP.com
+ DEPENDS:=ddns-scripts
endef
+
define Package/ddns-scripts_no-ip_com/description
- Dynamic DNS Client scripts extension for No-IP.com
+ Dynamic DNS Client scripts extension for No-IP.com
endef
-###### *************************************************************************
+
define Package/ddns-scripts_nsupdate
- $(call Package/ddns-scripts/Default)
- TITLE:=DDNS extension using Bind nsupdate
- DEPENDS:=ddns-scripts +bind-client
+ $(call Package/ddns-scripts/Default)
+ TITLE:=DDNS extension using Bind nsupdate
+ DEPENDS:=ddns-scripts +bind-client
endef
+
define Package/ddns-scripts_nsupdate/description
- Dynamic DNS Client scripts extension for direct updates using Bind nsupdate
+ Dynamic DNS Client scripts extension for direct updates using Bind nsupdate
+ The script directly updates a PowerDNS (or maybe bind server) via nsupdate
+ from bind-client package.
+ It requires:
+ "option dns_server" to be set to the server to be used by nsupdate.
+ "option username" should be set to the key name and
+ "option password" to the base64 encoded shared secret.
endef
-define Package/ddns-scripts_nsupdate/config
- help
- The script directly updates a PowerDNS (or maybe bind server) via nsupdate
- from bind-client package. It requires
- "option dns_server" to be set to the server to be used by nsupdate.
- "option username" should be set to the key name and
- "option password" to the base64 encoded shared secret.
-endef
-###### *************************************************************************
define Package/ddns-scripts_route53-v1
- $(call Package/ddns-scripts/Default)
- TITLE:=Amazon AWS Route 53 API v1
- DEPENDS:=ddns-scripts +curl +openssl-util
+ $(call Package/ddns-scripts/Default)
+ TITLE:=Amazon AWS Route 53 API v1
+ DEPENDS:=ddns-scripts +curl +openssl-util
endef
+
define Package/ddns-scripts_route53-v1/description
- Dynamic DNS Client scripts extension for Amazon AWS Route53. Note: You
- must also install ca-certificate or ca-bundle.
- It requires:
- "option username" to be a valid AWS access key id
- "option password" to be the matching AWS secret key id
- "option domain" to contain the hosted zone ID
+ Dynamic DNS Client scripts extension for Amazon AWS Route53. Note: You
+ must also install ca-certificate or ca-bundle.
+ It requires:
+ "option username" to be a valid AWS access key id
+ "option password" to be the matching AWS secret key id
+ "option domain" to contain the hosted zone ID
endef
-###### *************************************************************************
+
define Package/ddns-scripts_cnkuai_cn
- $(call Package/ddns-scripts/Default)
- TITLE:=CnKuai API
- DEPENDS:=ddns-scripts +curl +giflib-utils
+ $(call Package/ddns-scripts/Default)
+ TITLE:=CnKuai API
+ DEPENDS:=ddns-scripts +curl +giflib-utils
endef
+
define Package/ddns-scripts_cnkuai_cn/description
- Dynamic DNS Client scripts extension for CnKuai.Note: You
- must also install giflib-utils.
- It requires:
- "option username" to be a valid CnKuai control panel id
- "option password" to be the matching CnKuai control panel password
- "option domain" to contain the domain
+ Dynamic DNS Client scripts extension for CnKuai.Note: You
+ must also install giflib-utils.
+ It requires:
+ "option username" to be a valid CnKuai control panel id
+ "option password" to be the matching CnKuai control panel password
+ "option domain" to contain the domain
endef
-###### *************************************************************************
+
define Build/Configure
endef
+
define Build/Compile
$(CP) ./files $(PKG_BUILD_DIR)
# ensure that VERSION inside dynamic_dns_functions.sh reflect PKG_VERSION of Makefile
done
endef
-define Package/ddns-scripts/conffiles
-/etc/config/ddns
-endef
###### *************************************************************************
define Package/ddns-scripts/preinst
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns
$(INSTALL_DIR) $(1)/usr/lib/ddns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dynamic_dns_*.sh $(1)/usr/lib/ddns
endef
+
define Package/ddns-scripts/postinst
#!/bin/sh
# if NOT run buildroot and PKG_UPGRADE then (re)start service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts/prerm
#!/bin/sh
# if run within buildroot exit
exit 0 # suppress errors
endef
+
###### *************************************************************************
define Package/ddns-scripts_cloudflare.com-v4/preinst
#!/bin/sh
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_cloudflare.com-v4/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cloudflare.com-v4
$(INSTALL_DATA) ./files/usr/share/ddns/services/cloudflare.com-v4.json \
$(1)/usr/share/ddns/services/
endef
+
define Package/ddns-scripts_cloudflare.com-v4/postinst
#!/bin/sh
# on real system restart service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_cloudflare.com-v4/prerm
#!/bin/sh
# if NOT run buildroot then stop service
exit 0 # suppress errors
endef
+
###### *************************************************************************
define Package/ddns-scripts_freedns_42_pl/preinst
#!/bin/sh
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_freedns_42_pl/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_freedns_42_pl
$(INSTALL_DATA) ./files/usr/share/ddns/services/freedns.42.pl.json \
$(1)/usr/share/ddns/services
endef
+
define Package/ddns-scripts_freedns_42_pl/postinst
#!/bin/sh
# on real system restart service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_freedns_42_pl/prerm
#!/bin/sh
# if NOT run buildroot then stop service
exit 0 # suppress errors
endef
+
###### *************************************************************************
define Package/ddns-scripts_godaddy.com-v1/preinst
#!/bin/sh
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_godaddy.com-v1/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_godaddy.com-v1
$(INSTALL_DATA) ./files/usr/share/ddns/services/godaddy.com-v1.json \
$(1)/usr/share/ddns/services
endef
+
define Package/ddns-scripts_godaddy.com-v1/postinst
#!/bin/sh
# on real system restart service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_godaddy.com-v1/prerm
#!/bin/sh
# if NOT run buildroot then stop service
exit 0 # suppress errors
endef
+
###### *************************************************************************
define Package/ddns-scripts_digitalocean.com-v2/preinst
#!/bin/sh
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_digitalocean.com-v2/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_digtalocean.com-v2
$(INSTALL_DATA) ./files/usr/share/ddns/services/digitalocean.com-v2.json \
$(1)/usr/share/ddns/services
endef
+
define Package/ddns-scripts_digitalocean.com-v2/postinst
#!/bin/sh
# on real system restart service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_digitalocean.com-v2/prerm
#!/bin/sh
# if NOT run buildroot then stop service
exit 0 # suppress errors
endef
+
###### *************************************************************************
define Package/ddns-scripts_no-ip_com/preinst
#!/bin/sh
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_no-ip_com/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_no-ip_com
$(INSTALL_DATA) ./files/usr/share/ddns/services/no-ip.com.json \
$(1)/usr/share/ddns/services
endef
+
define Package/ddns-scripts_no-ip_com/postinst
#!/bin/sh
# on real system restart service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_no-ip_com/prerm
#!/bin/sh
# if NOT run buildroot then stop service
exit 0 # suppress errors
endef
+
###### *************************************************************************
define Package/ddns-scripts_nsupdate/preinst
#!/bin/sh
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_nsupdate/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_nsupdate
$(INSTALL_DATA) ./files/usr/share/ddns/services/bind-nsupdate.json \
$(1)/usr/share/ddns/services
endef
+
define Package/ddns-scripts_nsupdate/postinst
#!/bin/sh
# on real system restart service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_nsupdate/prerm
#!/bin/sh
# if NOT run buildroot then stop service
exit 0 # suppress errors
endef
+
###### *************************************************************************
define Package/ddns-scripts_route53-v1/preinst
#!/bin/sh
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_route53-v1/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_route53-v1
$(INSTALL_DATA) ./files/usr/share/ddns/services/route53-v1.json \
$(1)/usr/share/ddns/services
endef
+
define Package/ddns-scripts_route53-v1/postinst
#!/bin/sh
# on real system restart service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_route53-v1/prerm
#!/bin/sh
# if NOT run buildroot then stop service
exit 0 # suppress errors
endef
+
###### *************************************************************************
define Package/ddns-scripts_cnkuai_cn/preinst
#!/bin/sh
[ -z "$${IPKG_INSTROOT}" ] && /etc/init.d/ddns stop >/dev/null 2>&1
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_cnkuai_cn/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns.defaults $(1)/etc/uci-defaults/ddns_cnkuai_cn
$(INSTALL_DATA) ./files/usr/share/ddns/services/cnkuai.cn.json \
$(1)/usr/share/ddns/services
endef
+
define Package/ddns-scripts_cnkuai_cn/postinst
#!/bin/sh
# on real system restart service if enabled
}
exit 0 # suppress errors
endef
+
define Package/ddns-scripts_cnkuai_cn/prerm
#!/bin/sh
# if NOT run buildroot then stop service
exit 0 # suppress errors
endef
-###### *************************************************************************
+
$(eval $(call BuildPackage,ddns-scripts))
$(eval $(call BuildPackage,ddns-scripts_cloudflare.com-v4))
$(eval $(call BuildPackage,ddns-scripts_freedns_42_pl))