[package] wide-dhcpv6: improve user DUID handling
[packages.git] / ipv6 / wide-dhcpv6 / Makefile
1
2 include $(TOPDIR)/rules.mk
3
4 PKG_NAME:=wide-dhcpv6
5 PKG_VERSION:=20080615
6 PKG_RELEASE:=7
7
8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
9 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
10 PKG_MD5SUM:=1011e165850fe40d3e332dad2bfd30b3
11
12 include $(INCLUDE_DIR)/package.mk
13
14 define Package/wide-dhcpv6/Default
15   SECTION:=ipv6
16   CATEGORY:=IPv6
17   TITLE:=WIDE-DHCPv6
18   SUBMENU:=wide-dhcpv6
19   DEPENDS:=+kmod-ipv6 
20   URL:=https://sourceforge.net/projects/wide-dhcpv6/
21   MAINTAINER:=Andrew Byrne <openwrt@andy.id.au>
22 endef
23
24 define Package/wide-dhcpv6-client
25   $(call Package/wide-dhcpv6/Default)
26   TITLE+= client
27 endef
28
29 define Package/wide-dhcpv6-client/description
30         WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol
31         for IPv6 (DHCPv6) originally developed by the KAME project. The implementation
32         mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc.
33
34         This package installs the client component.
35 endef
36
37 define Package/wide-dhcpv6-server
38   $(call Package/wide-dhcpv6/Default)
39   TITLE+= server
40 endef
41
42 define Package/wide-dhcpv6-server/description
43         WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol
44         for IPv6 (DHCPv6) originally developed by the KAME project. The implementation
45         mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc.
46
47         This package installs the server component.
48 endef
49
50 define Package/wide-dhcpv6-relay
51   $(call Package/wide-dhcpv6/Default)
52   TITLE+= relay
53 endef
54
55 define Package/wide-dhcpv6-relay/description
56         WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol
57         for IPv6 (DHCPv6) originally developed by the KAME project. The implementation
58         mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc.
59
60         This package installs the relay component.
61 endef
62
63 define Package/wide-dhcpv6-control
64   $(call Package/wide-dhcpv6/Default)
65   TITLE+= client and server control utility
66 endef
67
68 define Package/wide-dhcpv6-control/description
69         WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol
70         for IPv6 (DHCPv6) originally developed by the KAME project. The implementation
71         mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc.
72
73         This package installs the client and server control utility.
74 endef
75
76 TARGET_CFLAGS+=-D_GNU_SOURCE
77
78 define Build/Configure
79         $(call Build/Configure/Default,--with-localdbdir=/var)
80 endef
81
82 define Build/Compile    
83         $(MAKE) -C $(PKG_BUILD_DIR) \
84                 DESTDIR="$(PKG_INSTALL_DIR)" \
85                 EXTRA_CFLAGS="-include debug.h" \
86                 all 
87 endef
88
89 define Package/wide-dhcpv6-client/conffiles
90 /etc/config/dhcp6c
91 endef
92
93 define Package/wide-dhcpv6-client/install
94         $(INSTALL_DIR) $(1)/usr/sbin
95         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6c $(1)/usr/sbin
96         $(INSTALL_DIR) $(1)/etc/config
97         $(INSTALL_CONF) ./files/dhcp6c.conf $(1)/etc/config/dhcp6c
98         $(INSTALL_DIR) $(1)/etc/init.d
99         $(INSTALL_BIN) ./files/dhcp6c.init $(1)/etc/init.d/dhcp6c
100         $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
101         $(INSTALL_DATA) ./files/dhcp6c.hotplug $(1)/etc/hotplug.d/iface/40-dhcp6c       
102         $(INSTALL_DIR) $(1)/etc/hotplug.d/dhcp6c
103         $(INSTALL_DATA) ./files/dhcp6c-dnsmasq.hotplug $(1)/etc/hotplug.d/dhcp6c/10-dnsmasq
104         $(INSTALL_DATA) ./files/dhcp6c-radvd.hotplug $(1)/etc/hotplug.d/dhcp6c/20-radvd
105         $(INSTALL_DIR) $(1)/usr/bin
106         $(INSTALL_BIN) ./files/dhcp6c-state $(1)/usr/bin/dhcp6c-state
107 endef
108
109 define Package/wide-dhcpv6-server/conffiles
110 /etc/config/dhcp6s
111 endef
112
113 define Package/wide-dhcpv6-server/install
114         $(INSTALL_DIR) $(1)/usr/sbin
115         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6s $(1)/usr/sbin
116         $(INSTALL_DIR) $(1)/etc
117         $(INSTALL_CONF) $(PKG_BUILD_DIR)/dhcp6s.conf.sample $(1)/etc
118         $(INSTALL_DIR) $(1)/etc/config
119         $(INSTALL_CONF) ./files/dhcp6s.conf $(1)/etc/config/dhcp6s
120         $(INSTALL_DIR) $(1)/etc/init.d
121         $(INSTALL_BIN) ./files/dhcp6s.init $(1)/etc/init.d/dhcp6s
122         $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
123         $(INSTALL_DATA) ./files/dhcp6s.hotplug $(1)/etc/hotplug.d/iface/50-dhcp6s       
124 endef
125
126 define Package/wide-dhcpv6-relay/install
127         $(INSTALL_DIR) $(1)/usr/sbin
128         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6relay $(1)/usr/sbin
129 endef
130
131 define Package/wide-dhcpv6-control/install
132         $(INSTALL_DIR) $(1)/usr/sbin
133         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6ctl $(1)/usr/sbin
134 endef
135
136 $(eval $(call BuildPackage,wide-dhcpv6-client))
137 $(eval $(call BuildPackage,wide-dhcpv6-server))
138 $(eval $(call BuildPackage,wide-dhcpv6-relay))
139 $(eval $(call BuildPackage,wide-dhcpv6-control))