2006-08-06 10:39:32 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=dhcp6
|
|
|
|
PKG_VERSION:=1.0
|
|
|
|
PKG_RELEASE:=1
|
2006-10-30 09:35:06 +00:00
|
|
|
|
2006-08-06 10:39:32 +00:00
|
|
|
PKG_SOURCE:=dhcpv6-linux-$(PKG_VERSION).zip
|
2006-10-30 09:35:06 +00:00
|
|
|
PKG_SOURCE_URL:=@SF/dhcpv6-linux
|
|
|
|
PKG_MD5SUM:=86193dfa62137db3ea459543db4f1102
|
2006-08-06 10:39:32 +00:00
|
|
|
|
2006-10-30 09:35:06 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
2007-01-18 15:52:03 +00:00
|
|
|
PKG_UNPACK:=unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE)
|
2006-08-06 10:39:32 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2006-10-30 09:35:06 +00:00
|
|
|
define Package/dhcp6/Default
|
2006-08-06 10:39:32 +00:00
|
|
|
SECTION:=ipv6
|
|
|
|
CATEGORY:=IPv6
|
|
|
|
DEPENDS:=+libncurses
|
2006-10-30 09:35:06 +00:00
|
|
|
TITLE:=IPv6 DHCP
|
2006-08-06 10:39:32 +00:00
|
|
|
URL:=http://sourceforge.net/projects/dhcpv6-linux
|
|
|
|
endef
|
|
|
|
|
2006-10-30 09:35:06 +00:00
|
|
|
define Package/dhcp6-client
|
|
|
|
$(call Package/dhcp6/Default)
|
|
|
|
TITLE+= client
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/dhcp6-client/conffiles
|
|
|
|
/etc/dhcp6/solicit.conf
|
|
|
|
endef
|
|
|
|
|
2006-08-06 10:39:32 +00:00
|
|
|
define Package/dhcp6-server
|
2006-10-30 09:35:06 +00:00
|
|
|
$(call Package/dhcp6/Default)
|
|
|
|
TITLE+= server
|
2006-08-06 10:39:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/dhcp6-server/conffiles
|
|
|
|
/etc/dhcpd6/dhcpd6.conf
|
|
|
|
/etc/dhcpd6/leases6.conf
|
|
|
|
/etc/dhcpd6/partial_leases6.conf
|
|
|
|
endef
|
|
|
|
|
2006-10-31 17:17:01 +00:00
|
|
|
define Build/Prepare
|
|
|
|
$(call Build/Prepare/Default)
|
|
|
|
# prevent package from rebuilding
|
|
|
|
find $(PKG_BUILD_DIR) | xargs touch
|
|
|
|
endef
|
|
|
|
|
2006-08-06 10:39:32 +00:00
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/client \
|
2006-10-30 09:35:06 +00:00
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|
|
|
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/server \
|
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|
|
|
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
|
2006-08-06 10:39:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/dhcp6-client/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/dhcp6
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/client/cli $(1)/usr/sbin/dhcp6client
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/client/solicit.conf $(1)/etc/dhcp6/
|
2006-08-06 10:39:32 +00:00
|
|
|
endef
|
|
|
|
|
2006-10-30 09:35:06 +00:00
|
|
|
define Package/dhcp6-server/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/dhcpd6
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/server/serv $(1)/usr/sbin/dhcpd6
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/server/*.conf $(1)/etc/dhcpd6/
|
2006-10-30 09:35:06 +00:00
|
|
|
endef
|
|
|
|
|
2006-08-06 10:39:32 +00:00
|
|
|
$(eval $(call BuildPackage,dhcp6-client))
|
2006-10-30 09:35:06 +00:00
|
|
|
$(eval $(call BuildPackage,dhcp6-server))
|