[package] ruby: fix path to libiconv
[openwrt/svn-archive/archive.git] / ipv6 / dhcp6 / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=dhcp6
11 PKG_VERSION:=1.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=dhcpv6-linux-$(PKG_VERSION).zip
15 PKG_SOURCE_URL:=@SF/dhcpv6-linux
16 PKG_MD5SUM:=86193dfa62137db3ea459543db4f1102
17
18 include $(INCLUDE_DIR)/package.mk
19
20 PKG_UNPACK:=unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE)
21
22 define Package/dhcp6/Default
23 SECTION:=ipv6
24 CATEGORY:=IPv6
25 DEPENDS:=+libncurses
26 TITLE:=IPv6 DHCP
27 URL:=http://sourceforge.net/projects/dhcpv6-linux
28 endef
29
30 define Package/dhcp6-client
31 $(call Package/dhcp6/Default)
32 TITLE+= client
33 endef
34
35 define Package/dhcp6-client/conffiles
36 /etc/dhcp6/solicit.conf
37 endef
38
39 define Package/dhcp6-server
40 $(call Package/dhcp6/Default)
41 TITLE+= server
42 endef
43
44 define Package/dhcp6-server/conffiles
45 /etc/dhcpd6/dhcpd6.conf
46 /etc/dhcpd6/leases6.conf
47 /etc/dhcpd6/partial_leases6.conf
48 endef
49
50 define Build/Prepare
51 $(call Build/Prepare/Default)
52 # prevent package from rebuilding
53 find $(PKG_BUILD_DIR) | xargs touch
54 endef
55
56 define Build/Compile
57 $(MAKE) -C $(PKG_BUILD_DIR)/client \
58 CC="$(TARGET_CC)" \
59 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
60 LDFLAGS="$(TARGET_LDFLAGS)"
61 $(MAKE) -C $(PKG_BUILD_DIR)/server \
62 CC="$(TARGET_CC)" \
63 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
64 LDFLAGS="$(TARGET_LDFLAGS)"
65 endef
66
67 define Package/dhcp6-client/install
68 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/dhcp6
69 $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/cli $(1)/usr/sbin/dhcp6client
70 $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/solicit.conf $(1)/etc/dhcp6/
71 endef
72
73 define Package/dhcp6-server/install
74 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/dhcpd6
75 $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/serv $(1)/usr/sbin/dhcpd6
76 $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/*.conf $(1)/etc/dhcpd6/
77 endef
78
79 $(eval $(call BuildPackage,dhcp6-client))
80 $(eval $(call BuildPackage,dhcp6-server))