source: trunk/package/busybox/Makefile @ 9660

Last change on this file since 9660 was 9660, checked in by nbd, 9 years ago

busybox: Fix build on OSX/BSD (fix needs to be cleaned up.)

Signed-off-by: Andy Boyett <agb-openwrt@…>

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1#
2# Copyright (C) 2006 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# $Id$
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=busybox
12PKG_VERSION:=1.8.2
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=http://www.busybox.net/downloads \
17                http://distfiles.gentoo.org/distfiles/
18PKG_MD5SUM:=5794c6187c7cc8176c52b96af9bf2478
19
20include $(INCLUDE_DIR)/package.mk
21
22ifeq ($(DUMP),)
23  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | md5s)
24endif
25
26init-y :=
27init-$(CONFIG_BUSYBOX_CONFIG_HTTPD) += httpd
28init-$(CONFIG_BUSYBOX_CONFIG_CROND) += cron
29init-$(CONFIG_BUSYBOX_CONFIG_TELNETD) += telnet
30
31define Package/busybox
32  SECTION:=base
33  CATEGORY:=Base system
34  TITLE:=Core utilities for embedded Linux
35  URL:=http://busybox.net/
36  MENU:=1
37endef
38
39define Package/busybox/description
40 The Swiss Army Knife of embedded Linux.
41 It slices, it dices, it makes Julian Fries.
42endef
43
44define Package/busybox/config
45        menu "Configuration"
46                depends on PACKAGE_busybox
47                source "$(SOURCE)/target-config.in"
48                source "$(SOURCE)/config/Config.in"
49        endmenu
50endef
51
52define Build/Configure
53        rm -f $(PKG_BUILD_DIR)/.configured*
54        grep 'CONFIG_BUSYBOX_' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_\\(.*\\),\\1\\2,g" > $(PKG_BUILD_DIR)/.config
55        yes '' | $(MAKE) -C $(PKG_BUILD_DIR) \
56                CC="$(TARGET_CC)" \
57                CROSS_COMPILE="$(TARGET_CROSS)" \
58                ARCH="$(ARCH)" \
59                HOST_LOADLIBES=-lintl \
60                oldconfig
61endef
62
63define Build/Compile
64        $(MAKE) -C $(PKG_BUILD_DIR) \
65                CC="$(TARGET_CC)" \
66                CROSS_COMPILE="$(TARGET_CROSS)" \
67                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
68                ARCH="$(ARCH)" \
69                IPKG_ARCH="$(ARCH)" \
70                all
71endef
72
73define Package/busybox/install
74        $(FIND) $(PKG_BUILD_DIR) -lname "*busybox" -exec rm \{\} \;
75        $(MAKE) -C $(PKG_BUILD_DIR) \
76                CC="$(TARGET_CC)" \
77                CROSS_COMPILE="$(TARGET_CROSS)" \
78                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
79                ARCH="$(ARCH)" \
80                IPKG_ARCH="$(ARCH)" \
81                CONFIG_PREFIX="$(1)" \
82                install
83        $(INSTALL_DIR) $(1)/etc/init.d
84        for tmp in $(init-y); do \
85                $(INSTALL_BIN) ./files/$$$$tmp $(1)/etc/init.d/$$$$tmp; \
86        done
87        -rm -rf $(1)/lib64
88endef
89
90$(eval $(call BuildPackage,busybox))
Note: See TracBrowser for help on using the repository browser.