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: ftp://ftp.lineo.com/pub/busybox/%{name}-%{version}.tar.gz
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 URL: http://busybox.lineo.com/
50 %{?_with_fileutl_prov:Provides: fileutils}
51 %{?_with_grep_prov:Provides: grep}
52 %{?_with_sh_prov:Provides: /bin/sh}
53 %{!?_without_static:BuildRequires: glibc-static}
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 BusyBox combines tiny versions of many common UNIX utilities into a
58 single small executable. It provides minimalist replacements for most
59 of the utilities you usually find in fileutils, shellutils, findutils,
60 textutils, grep, gzip, tar, etc. BusyBox provides a fairly complete
61 POSIX environment for any small or embedded system. The utilities in
62 BusyBox generally have fewer options than their full-featured GNU
63 cousins; however, the options that are included provide the expected
64 functionality and behave very much like their GNU counterparts.
66 BusyBox has been written with size-optimization and limited resources
67 in mind. It is also extremely modular so you can easily include or
68 exclude commands (or features) at compile time. This makes it easy to
69 customize your embedded systems. To create a working system, just add
70 a kernel, a shell (such as ash), and an editor (such as elvis-tiny or
74 BusyBox sk³ada ma³e wersje wielu narzêdzi uniksowych w jeden ma³y plik
75 wykonywalny. Zapewnia minimalne zastêpniki wiêkszo¶ci narzêdzi
76 zawartych w pakietach fileutils, shellutils, findutils, grep, gzip,
77 tar itp. BusyBox daje w miarê kompletne ¶rodowisko POSIX dla ma³ych
78 lub wbudowanych systemów. Narzêdzia maj± mniej opcji ni¿ ich pe³ne
79 odpowiedniki GNU, ale maj± podstawow± funkcjonalno¶æ. Do dzia³aj±cego
80 systemu potrzeba jeszcze tylko kernela, shella (np. ash) oraz edytora
81 (np. elvis-tiny albo ae).
84 BusyBox combina versões reduzidas de muitos utilitários UNIX num único
85 executável, fornecendo substitutos minimalistas para muitos dos
86 executáveis encontrados em pacotes como fileutils, shellutils,
87 findutils, textutils, grep, gzip, tar, etc. Os utilitários do BusyBox
88 em geral têm menos opções que os utilitários GNU, mas as opções
89 implementadas comportam-se de maneira similar aos equivalentes GNU.
92 Summary: Static busybox
93 Summary(pl): Statycznie linkowany busybox
99 %description static -l pl
100 Statycznie linkowany busybox.
113 cp -f %{SOURCE1} Config.h
115 %if %{?_without_static:0}%{!?_without_static:1}
117 CFLAGS_EXTRA="%{rpmcflags}" \
118 LDFLAGS="%{rpmldflags} -static"
119 mv -f busybox busybox.static
124 CFLAGS_EXTRA="%{rpmcflags}" \
125 LDFLAGS="%{rpmldflags}" \
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/busybox}
132 %{!?_without_static:install busybox.static $RPM_BUILD_ROOT%{_bindir}}
134 install busybox $RPM_BUILD_ROOT%{_bindir}
135 install busybox.links $RPM_BUILD_ROOT%{_libdir}/busybox
136 install docs/BusyBox.1 $RPM_BUILD_ROOT%{_mandir}/man1
137 echo ".so BusyBox.1" > $RPM_BUILD_ROOT%{_mandir}/man1/busybox.1
139 # install links to busybox binary, when linkfl is defined
140 %{?_with_linkfl:make install PREFIX=$RPM_BUILD_ROOT}
142 gzip -9nf AUTHORS TODO Changelog README
145 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
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