packages/net/dhcp/Makefile
nbd e296673ba6 packages: Use $(CP) instead of $(INSTALL_BIN) for binaries.
Signed-off-by: Andy Boyett <agb-openwrt@padded-cell.net>


git-svn-id: svn://svn.openwrt.org/openwrt/packages@9695 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-12-09 18:59:01 +00:00

79 lines
1.6 KiB
Makefile

#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcp
PKG_VERSION:=3.0.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
PKG_MD5SUM:=724bad21ad8b638abadd5fcc07df1a0f
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
define Package/dhcp/Default
SECTION:=net
CATEGORY:=Network
TITLE:=ISC's DHCP
URL:=http://www.isc.org/
endef
define Package/dhcp-relay
$(call Package/dhcp/Default)
TITLE+= relay
endef
define Package/dhcp-server
$(call Package/dhcp/Default)
TITLE+= server
endef
define Build/Configure
# it's not GNU autoconf stuff
(cd $(PKG_BUILD_DIR) ; \
UNAME_S=Linux \
UNAME_M=$(ARCH) \
UNAME_R=2.4.34 \
./configure \
--copts "$(TARGET_CFLAGS)" \
linux-2.2 \
);
endef
define Build/Compile
UNAME_S=Linux \
UNAME_M=$(ARCH) \
UNAME_R=2.4.34 \
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Package/dhcp-relay/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
endef
define Package/dhcp-server/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
endef
$(eval $(call BuildPackage,dhcp-relay))
$(eval $(call BuildPackage,dhcp-server))