暫無描述

Makefile 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ddns-scripts
  3. PKG_VERSION:=2.1.0
  4. PKG_RELEASE:=5
  5. PKG_LICENSE:=GPL-2.0
  6. PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
  7. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  8. include $(INCLUDE_DIR)/package.mk
  9. define Package/ddns-scripts
  10. SECTION:=net
  11. CATEGORY:=Network
  12. SUBMENU:=IP Addresses and Names
  13. TITLE:=Dynamic DNS Scripts (with IPv6 support)
  14. PKGARCH:=all
  15. endef
  16. define Package/ddns-scripts/description
  17. A highly configurable set of scripts for doing dynamic dns updates.
  18. - IPv6 support
  19. - force communication to IPv4 or IPv6 only
  20. - DNS server support
  21. - using BIND host if installed
  22. - DNS requests via TCP
  23. - Proxy server support
  24. - log file support
  25. - support to run once
  26. endef
  27. define Build/Prepare
  28. endef
  29. define Build/Configure
  30. endef
  31. define Build/Compile
  32. endef
  33. define Package/ddns-scripts/conffiles
  34. /etc/config/ddns
  35. endef
  36. define Package/ddns-scripts/install
  37. $(INSTALL_DIR) $(1)/etc/config
  38. $(INSTALL_CONF) ./files/etc/config/* $(1)/etc/config
  39. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  40. $(INSTALL_BIN) ./files/etc/hotplug.d/iface/* $(1)/etc/hotplug.d/iface
  41. $(INSTALL_DIR) $(1)/etc/init.d
  42. $(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d/
  43. $(INSTALL_DIR) $(1)/usr/lib/ddns
  44. $(INSTALL_DATA) ./files/usr/lib/ddns/* $(1)/usr/lib/ddns
  45. $(INSTALL_BIN) ./files/usr/lib/ddns/*.sh $(1)/usr/lib/ddns
  46. endef
  47. define Package/ddns-scripts/postinst
  48. #!/bin/sh
  49. # if run within buildroot exit
  50. [ -n "$${IPKG_INSTROOT}" ] && exit 0
  51. # add new section "ddns" "global" if not exists
  52. uci -q get ddns.global > /dev/null || uci -q set ddns.global='ddns'
  53. uci -q get ddns.global.date_format > /dev/null || uci -q set ddns.global.date_format='%F %R'
  54. uci -q get ddns.global.log_lines > /dev/null || uci -q set ddns.global.log_lines='250'
  55. uci -q get ddns.global.allow_local_ip > /dev/null || uci -q set ddns.global.allow_local_ip='0'
  56. uci -q commit ddns
  57. # clear LuCI indexcache
  58. rm -f /tmp/luci-indexcache >/dev/null 2>&1
  59. exit 0
  60. endef
  61. define Package/ddns-scripts/prerm
  62. #!/bin/sh
  63. # if run within buildroot exit
  64. [ -n "$${IPKG_INSTROOT}" ] && exit 0
  65. # stop running scripts
  66. /etc/init.d/ddns disable
  67. /etc/init.d/ddns stop
  68. # clear LuCI indexcache
  69. rm -f /tmp/luci-indexcache >/dev/null 2>&1
  70. exit 0
  71. endef
  72. $(eval $(call BuildPackage,ddns-scripts))