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