]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/busybox
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[people/pmueller/ipfire-2.x.git] / lfs / busybox
CommitLineData
cd1a2927
MT
1
2###############################################################################
3# This file is part of the IPCop Firewall. #
4# #
5# IPCop is free software; you can redistribute it and/or modify #
6# it under the terms of the GNU General Public License as published by #
7# the Free Software Foundation; either version 2 of the License, or #
8# (at your option) any later version. #
9# #
10# IPCop is distributed in the hope that it will be useful, #
11# but WITHOUT ANY WARRANTY; without even the implied warranty of #
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
13# GNU General Public License for more details. #
14# #
15# You should have received a copy of the GNU General Public License #
16# along with IPCop; if not, write to the Free Software #
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
18# #
19# Makefiles are based on LFSMake, which is #
20# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
21# #
22# Modifications by: #
23# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
24# - Modified Makefile for IPCop build #
25# #
26# $Id: busybox,v 1.11.2.5 2005/06/22 20:00:56 rkerr Exp $
27# #
28###############################################################################
29
30###############################################################################
31# Definitions
32###############################################################################
33
34include Config
35
36VER = 0.60.5
37
38THISAPP = busybox-$(VER)
39DL_FILE = $(THISAPP).tar.gz
40DL_FROM = http://www.busybox.net/downloads
41DIR_APP = $(DIR_SRC)/$(THISAPP)
42TARGET = $(DIR_INFO)/$(THISAPP)
43
44###############################################################################
45# Top-level Rules
46###############################################################################
47
48objects = $(DL_FILE)
49
50$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
51
52$(DL_FILE)_MD5 = 1dfe09e0b1db1aab2a5f7d03e47640a6
53
54install : $(TARGET)
55
56check : $(patsubst %,$(DIR_CHK)/%,$(objects))
57
58download :$(patsubst %,$(DIR_DL)/%,$(objects))
59
60md5 : $(subst %,%_MD5,$(objects))
61
62###############################################################################
63# Downloading, checking, md5sum
64###############################################################################
65
66$(patsubst %,$(DIR_CHK)/%,$(objects)) :
67 @$(CHECK)
68
69$(patsubst %,$(DIR_DL)/%,$(objects)) :
70 @$(LOAD)
71
72$(subst %,%_MD5,$(objects)) :
73 @$(MD5)
74
75###############################################################################
76# Installation Details
77###############################################################################
78
79$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
80 @$(PREBUILD)
81 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
82 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/busybox-0.60.5-config.patch
83 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/busybox-0.60.5-gzip.patch
84 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/busybox-0.60.5-spider.patch
85 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/busybox-0.60.5-insmod_gpl_symbols.patch
86 cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/busybox-0.60.5-wget-unlink.patch
87 if [ "$(MACHINE)" = "alpha" ]; then \
88 cd $(DIR_APP) && sed -i -e 's/#define BB_INSMOD//' Config.h; \
89 cd $(DIR_APP) && sed -i -e 's/#define BB_RMMOD//' Config.h; \
90 cd $(DIR_APP) && sed -i -e 's/#define BB_MODPROBE//' Config.h; \
91 fi
92 cd $(DIR_APP) && make
93 -mkdir -p /install/initrd/bin
94 cd $(DIR_APP) && install -m 0755 busybox /install/initrd/bin
95 cd /install/initrd/bin && for i in [ ash cat chroot dd df echo gzip \
96 gunzip halt insmod ifconfig init ls mkswap modprobe mount reboot \
97 rmmod sed sh sleep swapon swapoff syslogd tar umount wget ping \
98 sync; do \
99 ln -sf busybox $$i; \
100 done
101 if [ "$(MACHINE)" = "alpha" ]; then \
102 cd /install/initrd/bin && rm -f rmmod modprobe insmod; \
103 cp /sbin/insmod.static /install/initrd/bin/insmod; \
104 cd /install/initrd/bin && ln -s insmod modprobe; \
105 cd /install/initrd/bin && ln -s insmod rmmod; \
106 fi
107 @rm -rf $(DIR_APP)
108 @$(POSTBUILD)