3 # _with_altconfig <name> - alternative busybox config file (replaces default one)
4 # you should define cfgfile macro, i.e.
6 # rpm --rebuild busybox.*.src.rpm --with altconfig --define "cfgfile bb-emb-config.h"
9 # _with_linkfl - creates links to busybox binary and puts them into file list;
11 # Options below are useful, when you want fileutils and grep providing.
12 # For example, ash package requires fileutils and grep.
14 # _with_fileutl_prov - adds fileutils providing
15 # _with_grep_prov - adds grep providing
18 # Option below is useful, when busybox is built with shell support.
20 # _with_sh_prov - adds /bin/sh providing
23 # WARNING! Shell, filetuils and grep providing may depend on config file!
24 # Fileutils, grep and shell provided with busybox have not such
25 # functionality as their GNU countenders.
28 # _without_static - don't build static version
31 Summary: Set of common unix utils for embeded systems
32 Summary(pl): Zestaw narzêdzi uniksowych dla systemów wbudowanych
33 Summary(pt_BR): BusyBox é um conjunto de utilitários UNIX em um único binário
39 Source0: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
40 %{!?_with_altconfig:Source1: %{name}-config.h}
41 %{?_with_altconfig:Source1: %{cfgfile}}
42 Patch0: %{name}-logconsole.patch
43 Patch1: %{name}-tee.patch
44 Patch3: %{name}-printf-gettext.patch
45 Patch4: %{name}-loadfont.patch
46 Patch5: %{name}-cread.patch
47 Patch6: %{name}-malloc.patch
48 Patch7: %{name}-pivot_root.patch
49 Patch8: %{name}-child.patch
50 URL: http://www.busybox.net/
51 %{?_with_fileutl_prov:Provides: fileutils}
52 %{?_with_grep_prov:Provides: grep}
53 %{?_with_sh_prov:Provides: /bin/sh}
54 %{!?_without_static:BuildRequires: glibc-static}
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 BusyBox combines tiny versions of many common UNIX utilities into a
59 single small executable. It provides minimalist replacements for most
60 of the utilities you usually find in fileutils, shellutils, findutils,
61 textutils, grep, gzip, tar, etc. BusyBox provides a fairly complete
62 POSIX environment for any small or embedded system. The utilities in
63 BusyBox generally have fewer options than their full-featured GNU
64 cousins; however, the options that are included provide the expected
65 functionality and behave very much like their GNU counterparts.
67 BusyBox has been written with size-optimization and limited resources
68 in mind. It is also extremely modular so you can easily include or
69 exclude commands (or features) at compile time. This makes it easy to
70 customize your embedded systems. To create a working system, just add
71 a kernel, a shell (such as ash), and an editor (such as elvis-tiny or
75 BusyBox sk³ada ma³e wersje wielu narzêdzi uniksowych w jeden ma³y plik
76 wykonywalny. Zapewnia minimalne zastêpniki wiêkszo¶ci narzêdzi
77 zawartych w pakietach fileutils, shellutils, findutils, grep, gzip,
78 tar itp. BusyBox daje w miarê kompletne ¶rodowisko POSIX dla ma³ych
79 lub wbudowanych systemów. Narzêdzia maj± mniej opcji ni¿ ich pe³ne
80 odpowiedniki GNU, ale maj± podstawow± funkcjonalno¶æ. Do dzia³aj±cego
81 systemu potrzeba jeszcze tylko kernela, shella (np. ash) oraz edytora
82 (np. elvis-tiny albo ae).
85 BusyBox combina versões reduzidas de muitos utilitários UNIX num único
86 executável, fornecendo substitutos minimalistas para muitos dos
87 executáveis encontrados em pacotes como fileutils, shellutils,
88 findutils, textutils, grep, gzip, tar, etc. Os utilitários do BusyBox
89 em geral têm menos opções que os utilitários GNU, mas as opções
90 implementadas comportam-se de maneira similar aos equivalentes GNU.
93 Summary: Static busybox
94 Summary(pl): Statycznie linkowany busybox
100 %description static -l pl
101 Statycznie linkowany busybox.
115 cp -f %{SOURCE1} Config.h
117 %if %{?_without_static:0}%{!?_without_static:1}
119 CFLAGS_EXTRA="%{rpmcflags}" \
120 LDFLAGS="%{rpmldflags} -static"
121 mv -f busybox busybox.static
126 CFLAGS_EXTRA="%{rpmcflags}" \
127 LDFLAGS="%{rpmldflags}" \
131 rm -rf $RPM_BUILD_ROOT
132 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/busybox}
134 %{!?_without_static:install busybox.static $RPM_BUILD_ROOT%{_bindir}}
136 %{?!_with_linkfl:install busybox $RPM_BUILD_ROOT%{_bindir}}
137 install busybox.links $RPM_BUILD_ROOT%{_libdir}/busybox
138 install docs/BusyBox.1 $RPM_BUILD_ROOT%{_mandir}/man1
139 echo ".so BusyBox.1" > $RPM_BUILD_ROOT%{_mandir}/man1/busybox.1
141 # install links to busybox binary, when linkfl is defined
142 %{?_with_linkfl:make install PREFIX=$RPM_BUILD_ROOT}
145 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
149 %doc AUTHORS TODO Changelog README Config.h
151 %{?!_with_linkfl: %attr(755,root,root) %{_bindir}/busybox}
153 %if %{?_with_linkfl:1}%{?!_with_linkfl:0}
154 %attr(755,root,root) /bin/*
155 %attr(755,root,root) /sbin/*
156 %attr(755,root,root) %{_bindir}/*
157 %attr(755,root,root) %{_sbindir}/*
163 %if %{?_without_static:0}%{!?_without_static:1}
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_bindir}/busybox.static