[packages] dhcp: don't build docs
[openwrt/svn-archive/archive.git] / net / dhcp / Makefile
index d15eb9c67b39b47f38553e74ce7eac19b0da722e..ba77fa77671251ab06967b2fe05a2ca9b8af73e9 100644 (file)
@@ -1,5 +1,5 @@
 #
-# 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.
@@ -9,67 +9,72 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dhcp
-PKG_VERSION:=3.0.3
+PKG_VERSION:=3.1.0
 PKG_RELEASE:=1
-PKG_MD5SUM:=f91416a0b8ed3fd0601688cf0b7df58f
 
-PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
+PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
+PKG_MD5SUM:=27d179a3c3fbef576566b456a1168246
 
 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
+define Package/dhcp/Default
   SECTION:=net
   CATEGORY:=Network
-  SUBMENU:=ISC's DHCP implementation
-  TITLE:=ISC's DHCP implementation
-  DESCRIPTION:=ISC's DHCP implementation
-  URL:=http://www.isc.org
+  TITLE:=ISC's DHCP
+  URL:=http://www.isc.org/
 endef
 
 define Package/dhcp-relay
-  $(call Package/dhcp)
-  TITLE:=DHCP relay
-  DESCRIPTION:=DHCP relay
+  $(call Package/dhcp/Default)
+  TITLE+= relay
 endef
 
 define Package/dhcp-server
-  $(call Package/dhcp)
-  TITLE:=DHCP server
-  DESCRIPTION:=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.6.23 \
                ./configure \
-                 --copts "$(TARGET_CFLAGS)" \
-                 linux-2.2 \
+                       --copts "$(TARGET_CFLAGS)" \
        );
 endef
 
 define Build/Compile
-       rm -rf $(PKG_INSTALL_DIR)
-       mkdir -p $(PKG_INSTALL_DIR)
+       UNAME_S=Linux \
+       UNAME_M=$(ARCH) \
+       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 -d -m0755 $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
 endef
 
 define Package/dhcp-server/install
-       install -d -m0755 $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
+       $(INSTALL_DIR) $(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
 
 $(eval $(call BuildPackage,dhcp-relay))