]> git.pld-linux.org Git - packages/busybox.git/blame - busybox.spec
- more upstream fixes
[packages/busybox.git] / busybox.spec
CommitLineData
02a5a01c 1#
ee61dafa
MM
2Summary: Set of common unix utils for embeded systems
3Name: busybox
0dbd8885 4Version: 1.12.1
04ca9553 5Release: 1
ee61dafa 6License: GPL
02a5a01c 7Group: Applications
8Source0: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
0dbd8885 9# Source0-md5: dc2e5e00d6fee8229ae92884c68733a7
02a5a01c 10Source1: %{name}-initrd.config
11Source2: %{name}-system.config
0dbd8885 12Patch0: %{name}-grep.patch
13Patch1: %{name}-modprobe.patch
14Patch2: %{name}-standalone.patch
48a980ef 15Patch3: %{name}-vi.patch
16Patch4: %{name}-lineedit.patch
79dabc55 17Patch5: %{name}-basename.patch
18Patch6: %{name}-login.patch
02a5a01c 19URL: http://www.busybox.net/
20BuildRequires: gcc >= 3.2
21BuildRequires: perl-tools-pod
22BuildRequires: rpmbuild(macros) >= 1.333
23BuildRequires: uClibc-static >= 2:0.9.21
79dabc55 24#ExclusiveArch: i586
ee61dafa
MM
25BuildRoot: %{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 37BusyBox combines tiny versions of many common UNIX utilities into a
38single small executable. It provides minimalist replacements for most
39of the utilities you usually find in fileutils, shellutils, findutils,
40textutils, grep, gzip, tar, etc. BusyBox provides a fairly complete
41POSIX environment for any small or embedded system. The utilities in
42BusyBox generally have fewer options than their full-featured GNU
43cousins; however, the options that are included provide the expected
44functionality and behave very much like their GNU counterparts.
45
46BusyBox has been written with size-optimization and limited resources
47in mind. It is also extremely modular so you can easily include or
48exclude commands (or features) at compile time. This makes it easy to
49customize your embedded systems. To create a working system, just add
50a kernel, a shell (such as ash), and an editor (such as elvis-tiny or
51ae).
52
53%package CRI-initrd
54Summary: Busybox for CRI initrd images
55Group: Applications
56Conflicts: geninitrd < 3075
57
58%description CRI-initrd
59Busybox for CRI initrd images.
60
61%package CRI-system
62Summary: Busybox for CRI system images
63Group: Applications
64Conflicts: geninitrd < 3075
65
66%description CRI-system
67Busybox 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 80install -d built
81install %{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
91mv -f busybox built/busybox.initrd
92%{__make} clean
93
94install %{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
104mv -f busybox built/busybox.system
105%{__make} clean
106
4e2ab1f5 107
ee61dafa
MM
108%install
109rm -rf $RPM_BUILD_ROOT
02a5a01c 110install -d $RPM_BUILD_ROOT%{_bindir}
ee61dafa 111
02a5a01c 112install built/busybox.initrd $RPM_BUILD_ROOT%{_bindir}
113install built/busybox.system $RPM_BUILD_ROOT%{_bindir}
d635bde0 114
ee61dafa
MM
115%clean
116rm -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
This page took 0.100937 seconds and 4 git commands to generate.