]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/busybox
Busybox --> 1.2.2
[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# #
cd1a2927
MT
22###############################################################################
23
24###############################################################################
25# Definitions
26###############################################################################
27
28include Config
29
893c0d03 30VER = 1.2.2
cd1a2927
MT
31
32THISAPP = busybox-$(VER)
893c0d03 33DL_FILE = $(THISAPP).tar.bz2
a2cb3a33 34DL_FROM = $(URL_IPFIRE)
cd1a2927
MT
35DIR_APP = $(DIR_SRC)/$(THISAPP)
36TARGET = $(DIR_INFO)/$(THISAPP)
37
38###############################################################################
39# Top-level Rules
40###############################################################################
41
42objects = $(DL_FILE)
43
44$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
45
893c0d03 46$(DL_FILE)_MD5 = ae8a4c65b9464c8ece3483a3d3b9544c
cd1a2927
MT
47
48install : $(TARGET)
49
50check : $(patsubst %,$(DIR_CHK)/%,$(objects))
51
52download :$(patsubst %,$(DIR_DL)/%,$(objects))
53
54md5 : $(subst %,%_MD5,$(objects))
55
56###############################################################################
57# Downloading, checking, md5sum
58###############################################################################
59
60$(patsubst %,$(DIR_CHK)/%,$(objects)) :
61 @$(CHECK)
62
63$(patsubst %,$(DIR_DL)/%,$(objects)) :
64 @$(LOAD)
65
66$(subst %,%_MD5,$(objects)) :
67 @$(MD5)
68
69###############################################################################
70# Installation Details
71###############################################################################
72
73$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
74 @$(PREBUILD)
893c0d03
MT
75 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
76 cd $(DIR_APP) && cp -f $(DIR_SRC)/config/uClibc/busybox.config .config
cd1a2927
MT
77 cd $(DIR_APP) && make
78 -mkdir -p /install/initrd/bin
79 cd $(DIR_APP) && install -m 0755 busybox /install/initrd/bin
893c0d03
MT
80 mkdir -p /install/initrd/usr/share/udhcpc
81 cd $(DIR_APP) && install -m 0755 examples/udhcp/simple.script \
82 /install/initrd/usr/share/udhcpc/default.script
83 cd /install/initrd/bin && for i in [ ash basename cat chroot cp \
84 date dd df dmesg echo gzip gunzip halt hwclock insmod ifconfig \
85 init ls ln mkdir mkswap modprobe mount reboot rmmod lsmod \
86 e2label mke2fs mkfs.minix tftp \
87 sed sh sleep swapon swapoff syslogd tar umount wget env \
88 ping sync udhcpc grep xargs route test uname wc readlink; do \
89 ln -sf busybox $$i; \
90 done
cd1a2927
MT
91 @rm -rf $(DIR_APP)
92 @$(POSTBUILD)