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