Fix libiconv InstallDev section and install headers and libraries to a standard location
[openwrt/svn-archive/archive.git] / ipv6 / dhcp6 / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dhcp6
12 PKG_VERSION:=1.0
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=86193dfa62137db3ea459543db4f1102
15 PKG_SOURCE_URL:=@SF/dhcpv6-linux
16 PKG_SOURCE:=dhcpv6-linux-$(PKG_VERSION).zip
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 PKG_CAT:=unzip
19
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/dhcp6
25 SECTION:=ipv6
26 CATEGORY:=IPv6
27 DEPENDS:=+libncurses
28 SUBMENU:=IPv6 DHCP server and client
29 TITLE:=IPv6 DHCP server and client
30 DESCRIPTION:=IPv6 DHCP server and client
31 URL:=http://sourceforge.net/projects/dhcpv6-linux
32 endef
33
34 define Package/dhcp6-server
35 $(call Package/dhcp6)
36 DEFAULT:=m if ALL
37 TITLE:=DHCPv6 server
38 DESCRIPTION:=DHCPv6 server
39 endef
40
41 define Package/dhcp6-server/conffiles
42 /etc/dhcpd6/dhcpd6.conf
43 /etc/dhcpd6/leases6.conf
44 /etc/dhcpd6/partial_leases6.conf
45 endef
46
47 define Package/dhcp6-client
48 $(call Package/dhcp6)
49 DEFAULT:=m if ALL
50 TITLE:=DHCPv6 client
51 DESCRIPTION:=DHCPv6 client
52 endef
53
54 define Package/dhcp6-client/conffiles
55 /etc/dhcp6/solicit.conf
56 endef
57
58 define Build/Compile
59 $(MAKE) -C $(PKG_BUILD_DIR)/server \
60 CC="$(TARGET_CC)" STAGING_DIR=$(STAGING_DIR)
61 $(MAKE) -C $(PKG_BUILD_DIR)/client \
62 CC="$(TARGET_CC)" STAGING_DIR=$(STAGING_DIR)
63 endef
64
65 define Package/dhcp6-server/install
66 install -d -m0755 $(1)/usr/sbin $(1)/etc/dhcpd6
67 install -m0755 $(PKG_BUILD_DIR)/server/serv $(1)/usr/sbin/dhcpd6
68 install -m0755 $(PKG_BUILD_DIR)/server/*.conf $(1)/etc/dhcpd6/
69 endef
70
71 define Package/dhcp6-client/install
72 install -d $(1)/usr/sbin $(1)/etc/dhcp6
73 install -m0755 $(PKG_BUILD_DIR)/client/cli $(1)/usr/sbin/dhcp6client
74 install -m0755 $(PKG_BUILD_DIR)/client/solicit.conf $(1)/etc/dhcp6/
75 endef
76
77 $(eval $(call BuildPackage,dhcp6-server))
78 $(eval $(call BuildPackage,dhcp6-client))