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