[package] fix killing and starting of dhcp (#6919)
[openwrt/svn-archive/archive.git] / net / dhcp / Makefile
index 0b10a4c4c3d72470fa7cb0e0b884ad181093c87e..409adfc2d87e22a7190755aa7b019b0f4872e2cf 100644 (file)
@@ -1,24 +1,19 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2008 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_VERSION:=3.1.0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
-PKG_MD5SUM:=724bad21ad8b638abadd5fcc07df1a0f
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_MD5SUM:=27d179a3c3fbef576566b456a1168246
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,7 +21,7 @@ define Package/dhcp/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=ISC's DHCP
-  URL:=http://www.isc.org/
+  URL:=https://www.isc.org/software/dhcp
 endef
 
 define Package/dhcp-relay
@@ -45,32 +40,35 @@ define Build/Configure
        (cd $(PKG_BUILD_DIR) ; \
                UNAME_S=Linux \
                UNAME_M=$(ARCH) \
-               UNAME_R=2.4.34 \
+               UNAME_R=2.6.23 \
                ./configure \
                        --copts "$(TARGET_CFLAGS)" \
-                       linux-2.2 \
        );
 endef
 
 define Build/Compile
        UNAME_S=Linux \
        UNAME_M=$(ARCH) \
-       UNAME_R=2.4.34 \
+       UNAME_R=2.6.23 \
        $(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
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(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
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/local/lib
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/lib/*.a $(1)/usr/local/lib
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
 endef