]>
Commit | Line | Data |
---|---|---|
02a5a01c | 1 | # |
ee61dafa MM |
2 | Summary: Set of common unix utils for embeded systems |
3 | Name: busybox | |
02a5a01c | 4 | Version: 1.8.3 |
04ca9553 | 5 | Release: 1 |
ee61dafa | 6 | License: GPL |
02a5a01c | 7 | Group: Applications |
8 | Source0: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2 | |
9 | # Source0-md5: 38616bdac37732c8f702f332bc375784 | |
10 | Source1: %{name}-initrd.config | |
11 | Source2: %{name}-system.config | |
12 | Patch1: %{name}-logconsole.patch | |
13 | Patch2: %{name}-printf-gettext.patch | |
14 | Patch3: %{name}-loadfont.patch | |
15 | Patch4: %{name}-ash_exec.patch | |
16 | Patch5: %{name}-kernel_headers.patch | |
17 | Patch6: %{name}-insmod-morearchs.patch | |
18 | Patch7: %{name}-dhcp.patch | |
19 | Patch8: %{name}-fix_64_archs.patch | |
20 | URL: http://www.busybox.net/ | |
21 | BuildRequires: gcc >= 3.2 | |
22 | BuildRequires: perl-tools-pod | |
23 | BuildRequires: rpmbuild(macros) >= 1.333 | |
24 | BuildRequires: uClibc-static >= 2:0.9.21 | |
ea453652 | 25 | ExclusiveArch: i586 |
ee61dafa MM |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
02a5a01c | 28 | %define _bindir /bin |
29 | %define _initrd_bindir /bin | |
30 | ||
31 | %if "%{_target_base_arch}" != "%{_arch}" | |
32 | %define CrossOpts CROSS="%{_target_cpu}-pld-linux-" | |
33 | %else | |
34 | %define CrossOpts %{nil} | |
35 | %endif | |
36 | ||
ee61dafa | 37 | %description |
02a5a01c | 38 | BusyBox combines tiny versions of many common UNIX utilities into a |
39 | single small executable. It provides minimalist replacements for most | |
40 | of the utilities you usually find in fileutils, shellutils, findutils, | |
41 | textutils, grep, gzip, tar, etc. BusyBox provides a fairly complete | |
42 | POSIX environment for any small or embedded system. The utilities in | |
43 | BusyBox generally have fewer options than their full-featured GNU | |
44 | cousins; however, the options that are included provide the expected | |
45 | functionality and behave very much like their GNU counterparts. | |
46 | ||
47 | BusyBox has been written with size-optimization and limited resources | |
48 | in mind. It is also extremely modular so you can easily include or | |
49 | exclude commands (or features) at compile time. This makes it easy to | |
50 | customize your embedded systems. To create a working system, just add | |
51 | a kernel, a shell (such as ash), and an editor (such as elvis-tiny or | |
52 | ae). | |
53 | ||
54 | %package CRI-initrd | |
55 | Summary: Busybox for CRI initrd images | |
56 | Group: Applications | |
57 | Conflicts: geninitrd < 3075 | |
58 | ||
59 | %description CRI-initrd | |
60 | Busybox for CRI initrd images. | |
61 | ||
62 | %package CRI-system | |
63 | Summary: Busybox for CRI system images | |
64 | Group: Applications | |
65 | Conflicts: geninitrd < 3075 | |
66 | ||
67 | %description CRI-system | |
68 | Busybox for CRI system images. | |
52db7bd4 | 69 | |
ee61dafa | 70 | %prep |
693dc2a0 | 71 | %setup -q |
02a5a01c | 72 | %patch1 -p1 |
73 | %patch2 -p1 | |
74 | %patch3 -p1 | |
75 | %patch4 -p1 | |
76 | %patch5 -p1 | |
77 | %patch6 -p1 | |
78 | %patch7 -p1 | |
79 | %patch8 -p1 | |
ea0cda84 | 80 | |
ee61dafa | 81 | %build |
02a5a01c | 82 | install -d built |
83 | install %{SOURCE1} .config | |
84 | %{__make} oldconfig | |
85 | %{__make} \ | |
86 | CROSS_CFLAGS="%{rpmcflags} -Os -D_BSD_SOURCE" \ | |
87 | LDFLAGS="%{ld_rpmldflags} -static" \ | |
88 | %if "%{_target_base_arch}" != "%{_arch}" | |
89 | CROSS="%{_target_cpu}-uclibc-" \ | |
90 | %endif | |
91 | CC="%{_target_cpu}-uclibc-gcc" | |
92 | ||
93 | mv -f busybox built/busybox.initrd | |
94 | %{__make} clean | |
95 | ||
96 | install %{SOURCE2} .config | |
97 | %{__make} oldconfig | |
98 | %{__make} \ | |
99 | CROSS_CFLAGS="%{rpmcflags} -Os -D_BSD_SOURCE" \ | |
100 | LDFLAGS="%{ld_rpmldflags} -static" \ | |
101 | %if "%{_target_base_arch}" != "%{_arch}" | |
102 | CROSS="%{_target_cpu}-uclibc-" \ | |
103 | %endif | |
104 | CC="%{_target_cpu}-uclibc-gcc" | |
105 | ||
106 | mv -f busybox built/busybox.system | |
107 | %{__make} clean | |
108 | ||
4e2ab1f5 | 109 | |
ee61dafa MM |
110 | %install |
111 | rm -rf $RPM_BUILD_ROOT | |
02a5a01c | 112 | install -d $RPM_BUILD_ROOT%{_bindir} |
ee61dafa | 113 | |
02a5a01c | 114 | install built/busybox.initrd $RPM_BUILD_ROOT%{_bindir} |
115 | install built/busybox.system $RPM_BUILD_ROOT%{_bindir} | |
d635bde0 | 116 | |
ee61dafa MM |
117 | %clean |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
02a5a01c | 120 | %files CRI-initrd |
121 | %defattr(644,root,root,755) | |
122 | %attr(755,root,root) %{_bindir}/busybox.initrd | |
123 | ||
124 | %files CRI-system | |
ee61dafa | 125 | %defattr(644,root,root,755) |
02a5a01c | 126 | %attr(755,root,root) %{_bindir}/busybox.system |