Sin descripción

Makefile 2.2KB

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