remove obsolete patches
[buildroot.git] / package / udhcp / udhcp.mk
blob8faf582172a8f5c03910f8c3b108190d2d530763
1 #############################################################
3 # uchdp DHCP client and/or server
5 #############################################################
6 # Copyright (C) 2001-2005 by Erik Andersen <andersen@codepoet.org>
7 # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU Library General Public License as
11 # published by the Free Software Foundation; either version 2 of the
12 # License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Library General Public License for more details.
19 # You should have received a copy of the GNU Library General Public
20 # License along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 # USA
23 UDHCP_VERSION:=0.9.8
24 UDHCP_SOURCE:=udhcp-$(UDHCP_VERSION).tar.gz
25 UDHCP_SITE:=http://udhcp.busybox.net/downloads/
26 UDHCP_DIR:=$(BUILD_DIR)/udhcp-$(UDHCP_VERSION)
28 $(DL_DIR)/$(UDHCP_SOURCE):
29 $(WGET) -P $(DL_DIR) $(UDHCP_SITE)/$(UDHCP_SOURCE)
31 udhcp-source: $(DL_DIR)/$(UDHCP_SOURCE)
33 $(UDHCP_DIR)/.unpacked: $(DL_DIR)/$(UDHCP_SOURCE)
34 $(ZCAT) $(DL_DIR)/$(UDHCP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
35 $(SED) 's/-Os -fomit-frame-pointer/$(TARGET_CFLAGS)/' $(UDHCP_DIR)/Makefile
36 toolchain/patch-kernel.sh $(UDHCP_DIR) package/udhcp/ udhcp\*.patch
37 touch $(UDHCP_DIR)/.unpacked
39 #$(UDHCP_DIR)/.unpacked:
40 # (cd $(BUILD_DIR); \
41 # CVS_PASSFILE=$(CVS_PASSFILE) \
42 # cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co udhcp )
43 # touch $(UDHCP_DIR)/.unpacked
45 $(UDHCP_DIR)/udhcpc: $(UDHCP_DIR)/.unpacked
46 $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(UDHCP_DIR)
48 $(TARGET_DIR)/sbin/udhcpc: $(UDHCP_DIR)/udhcpc
49 -$(SED) 's/pump/udhcpc/' $(TARGET_DIR)/etc/pcmcia/network*
50 -$(SED) 's/PUMP/UDHCPC/' $(TARGET_DIR)/etc/pcmcia/network*
51 -$(SED) 's/DHCP="n"/DHCP="y"/' $(TARGET_DIR)/etc/pcmcia/network*
52 mkdir -p $(TARGET_DIR)/sbin
53 rm -f $(TARGET_DIR)/sbin/udhcpc
54 cp $(UDHCP_DIR)/udhcpc $(TARGET_DIR)/sbin/
55 mkdir -p $(TARGET_DIR)/usr/share/udhcpc
56 cp $(UDHCP_DIR)/samples/simple.script $(TARGET_DIR)/usr/share/udhcpc/default.script
57 chmod a+x $(TARGET_DIR)/sbin/udhcpc $(TARGET_DIR)/usr/share/udhcpc/default.script
59 udhcp: uclibc $(TARGET_DIR)/sbin/udhcpc
61 udhcp-clean:
62 rm -f $(TARGET_DIR)/sbin/udhcpc
63 -$(MAKE) -C $(UDHCP_DIR) clean
65 udhcp-dirclean:
66 rm -rf $(UDHCP_DIR)
67 #############################################################
69 # Toplevel Makefile options
71 #############################################################
72 ifeq ($(BR2_PACKAGE_UDHCP),y)
73 TARGETS+=udhcp
74 endif