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