]> git.pld-linux.org Git - packages/busybox.git/blob - busybox.spec
- new style bconds
[packages/busybox.git] / busybox.spec
1
2 # alternative busybox config file (replaces default one) you should 
3 # define cfgfile macro, i.e.
4 #
5 #       rpm --rebuild busybox.*.src.rpm --with altconfig --define "cfgfile bb-emb-config.h"
6 %bcond_with altconfig
7
8 %bcond_with linkfl # creates links to busybox binary and puts them into file list
9
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
14
15 # Option below is useful, when busybox is built with shell support.
16 %bcond_with sh_prov      # adds /bin/sh providing
17
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.
21
22 %bcond_without static  # don't build static version
23
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
27 Name:           busybox
28 Version:        0.60.5
29 Release:        1
30 License:        GPL
31 Group:          Applications
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}-cread.patch
41 Patch6:         %{name}-malloc.patch
42 Patch7:         %{name}-pivot_root.patch
43 Patch8:         %{name}-child.patch
44 URL:            http://www.busybox.net/
45 %{?with_fileutl_prov:Provides:  fileutils}
46 %{?with_grep_prov:Provides:     grep}
47 %{?with_sh_prov:Provides:       /bin/sh}
48 %{?with_static:BuildRequires:   glibc-static}
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 BusyBox combines tiny versions of many common UNIX utilities into a
53 single small executable. It provides minimalist replacements for most
54 of the utilities you usually find in fileutils, shellutils, findutils,
55 textutils, grep, gzip, tar, etc. BusyBox provides a fairly complete
56 POSIX environment for any small or embedded system. The utilities in
57 BusyBox generally have fewer options than their full-featured GNU
58 cousins; however, the options that are included provide the expected
59 functionality and behave very much like their GNU counterparts.
60
61 BusyBox has been written with size-optimization and limited resources
62 in mind. It is also extremely modular so you can easily include or
63 exclude commands (or features) at compile time. This makes it easy to
64 customize your embedded systems. To create a working system, just add
65 a kernel, a shell (such as ash), and an editor (such as elvis-tiny or
66 ae).
67
68 %description -l pl
69 BusyBox sk³ada ma³e wersje wielu narzêdzi uniksowych w jeden ma³y plik
70 wykonywalny. Zapewnia minimalne zastêpniki wiêkszo¶ci narzêdzi
71 zawartych w pakietach fileutils, shellutils, findutils, grep, gzip,
72 tar itp. BusyBox daje w miarê kompletne ¶rodowisko POSIX dla ma³ych
73 lub wbudowanych systemów. Narzêdzia maj± mniej opcji ni¿ ich pe³ne
74 odpowiedniki GNU, ale maj± podstawow± funkcjonalno¶æ. Do dzia³aj±cego
75 systemu potrzeba jeszcze tylko kernela, shella (np. ash) oraz edytora
76 (np. elvis-tiny albo ae).
77
78 %description -l pt_BR
79 BusyBox combina versões reduzidas de muitos utilitários UNIX num único
80 executável, fornecendo substitutos minimalistas para muitos dos
81 executáveis encontrados em pacotes como fileutils, shellutils,
82 findutils, textutils, grep, gzip, tar, etc. Os utilitários do BusyBox
83 em geral têm menos opções que os utilitários GNU, mas as opções
84 implementadas comportam-se de maneira similar aos equivalentes GNU.
85
86 %package static
87 Summary:        Static busybox
88 Summary(pl):    Statycznie linkowany busybox
89 Group:          Applications
90
91 %description static
92 Static busybox.
93
94 %description static -l pl
95 Statycznie linkowany busybox.
96
97 %prep
98 %setup -q
99 %patch0 -p1
100 %patch1 -p1
101 %patch3 -p1
102 %patch4 -p1
103 #%patch5 -p1
104 #%patch6 -p1
105 %patch7 -p1
106 #%patch8 -p1
107
108 %build
109 cp -f %{SOURCE1} Config.h
110
111 %if %{with static}
112 %{__make} \
113         CFLAGS_EXTRA="%{rpmcflags}" \
114         LDFLAGS="%{rpmldflags} -static"
115 mv -f busybox busybox.static
116 %{__make} clean
117 %endif
118
119 %{__make} \
120         CFLAGS_EXTRA="%{rpmcflags}" \
121         LDFLAGS="%{rpmldflags}" \
122         CC="%{__cc}"
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/busybox}
127
128 %{?with_static:install busybox.static $RPM_BUILD_ROOT%{_bindir}}
129
130 install busybox.links $RPM_BUILD_ROOT%{_libdir}/busybox
131 install docs/BusyBox.1 $RPM_BUILD_ROOT%{_mandir}/man1
132 echo ".so BusyBox.1" > $RPM_BUILD_ROOT%{_mandir}/man1/busybox.1
133
134 # install links to busybox binary, when linkfl is defined
135 %if %{with linkfl}
136 make install PREFIX=$RPM_BUILD_ROOT
137 %else
138 install busybox $RPM_BUILD_ROOT%{_bindir}
139 %endif
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %files
145 %defattr(644,root,root,755)
146 %doc AUTHORS TODO Changelog README Config.h
147
148 %if %{with linkfl}
149 %attr(755,root,root) /bin/*
150 %attr(755,root,root) /sbin/*
151 %attr(755,root,root) %{_bindir}/*
152 %attr(755,root,root) %{_sbindir}/*
153 %else
154 %attr(755,root,root) %{_bindir}/busybox
155 %endif
156
157 %{_libdir}/busybox
158 %{_mandir}/man1/*
159
160 %if %{with static}
161 %files static
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_bindir}/busybox.static
164 %endif
This page took 0.099291 seconds and 4 git commands to generate.