2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://www.busybox.net
/downloads \
16 http
://distfiles.gentoo.org
/distfiles
/
17 PKG_MD5SUM
:=ad6d0b271e60783a3c767c4ccbc7f98e
19 include $(INCLUDE_DIR
)/package.mk
22 STAMP_CONFIGURED
:=$(strip $(STAMP_CONFIGURED
))_
$(shell grep
'^CONFIG_BUSYBOX_' $(TOPDIR
)/.config | md5s
)
26 init-
$(CONFIG_BUSYBOX_CONFIG_HTTPD
) += httpd
27 init-
$(CONFIG_BUSYBOX_CONFIG_CROND
) += cron
28 init-
$(CONFIG_BUSYBOX_CONFIG_TELNETD
) += telnet
30 define Package
/busybox
33 TITLE
:=Core utilities for embedded Linux
34 URL
:=http
://busybox.net
/
38 define Package
/busybox
/description
39 The Swiss Army Knife of embedded Linux.
40 It slices
, it dices
, it makes Julian Fries.
43 define Package
/busybox
/config
45 depends on PACKAGE_busybox
46 source
"$(SOURCE)/target-config.in"
47 source
"$(SOURCE)/config/Config.in"
51 define Build
/Configure
52 rm -f
$(PKG_BUILD_DIR
)/.configured
*
53 grep
'CONFIG_BUSYBOX_' $(TOPDIR
)/.config | sed
-e
"s,\\(# \)\\?CONFIG_BUSYBOX_\\(.*\\),\\1\\2,g" > $(PKG_BUILD_DIR
)/.config
54 yes
'' |
$(MAKE
) -C
$(PKG_BUILD_DIR
) \
56 CROSS_COMPILE
="$(TARGET_CROSS)" \
63 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
65 CROSS_COMPILE
="$(TARGET_CROSS)" \
67 EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
70 rm -rf
$(PKG_INSTALL_DIR
)
71 $(FIND
) $(PKG_BUILD_DIR
) -lname
"*busybox" -exec
rm \
{\
} \
;
72 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
74 CROSS_COMPILE
="$(TARGET_CROSS)" \
75 EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
78 CONFIG_PREFIX
="$(PKG_INSTALL_DIR)" \
82 define Package
/busybox
/install
83 $(INSTALL_DIR
) $(1)/etc
/init.d
84 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)/
85 for tmp in
$(init-y
); do \
86 $(INSTALL_BIN
) .
/files
/$$$$tmp $(1)/etc
/init.d
/$$$$tmp; \
91 $(eval
$(call BuildPackage
,busybox
))