]> git.pld-linux.org Git - packages/busybox.git/blob - busybox.spec
- adapterized.
[packages/busybox.git] / busybox.spec
1 # _without_embed - don't build uClibc version
2 # _without_static - don't build static version
3 Summary:        Set of common unix utils for embeded systems
4 Summary(pl):    Zestaw narzêdzi uniksowych dla systemów wbudowanych
5 Name:           busybox
6 Version:        0.60.1
7 Release:        16
8 License:        GPL
9 Group:          Applications
10 Source0:        ftp://ftp.lineo.com/pub/busybox/%{name}-%{version}.tar.gz
11 Source1:        %{name}-config.h
12 Patch0:         %{name}-logconsole.patch
13 Patch1:         %{name}-tee.patch
14 Patch3:         %{name}-printf-gettext.patch
15 Patch4:         %{name}-loadfont.patch
16 Patch5:         %{name}-cread.patch
17 Patch6:         %{name}-malloc.patch
18 Patch7:         %{name}-pivot_root.patch
19 URL:            http://busybox.lineo.com/
20 %{!?_without_embed:BuildRequires:       uClibc-devel}
21 %{!?_without_embed:BuildRequires:       uClibc-static}
22 %{!?_without_static:BuildRequires:      glibc-static}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define embed_path      /usr/lib/embed
26 %define embed_cc        %{_arch}-uclibc-cc
27 %define embed_cflags    %{rpmcflags} -Os
28
29 %description
30 BusyBox combines tiny versions of many common UNIX utilities into a
31 single small executable. It provides minimalist replacements for most
32 of the utilities you usually find in fileutils, shellutils, findutils,
33 textutils, grep, gzip, tar, etc. BusyBox provides a fairly complete
34 POSIX environment for any small or embedded system. The utilities in
35 BusyBox generally have fewer options than their full-featured GNU
36 cousins; however, the options that are included provide the expected
37 functionality and behave very much like their GNU counterparts.
38
39 BusyBox has been written with size-optimization and limited resources
40 in mind. It is also extremely modular so you can easily include or
41 exclude commands (or features) at compile time. This makes it easy to
42 customize your embedded systems. To create a working system, just add
43 a kernel, a shell (such as ash), and an editor (such as elvis-tiny or
44 ae).
45
46 %description -l pl
47 BusyBox sk³ada ma³e wersje wielu narzêdzi uniksowych w jeden ma³y plik
48 wykonywalny. Zapewnia minimalne zastêpniki wiêkszo¶ci narzêdzi
49 zawartych w pakietach fileutils, shellutils, findutils, grep, gzip,
50 tar itp. BusyBox daje w miarê kompletne ¶rodowisko POSIX dla ma³ych
51 lub wbudowanych systemów. Narzêdzia maj± mniej opcji ni¿ ich pe³ne
52 odpowiedniki GNU, ale maj± podstawow± funkcjonalno¶æ. Do dzia³aj±cego
53 systemu potrzeba jeszcze tylko kernela, shella (np. ash) oraz edytora
54 (np. elvis-tiny albo ae).
55
56 %package static
57 Summary:        Static busybox
58 Summary(pl):    Statycznie linkowany busybox
59 Group:          Applications
60
61 %description static
62 Static busybox.
63
64 %description static -l pl
65 Statycznie linkowany busybox.
66
67 %package embed
68 Summary:        Busybox for embedded systems
69 Summary(pl):    Busybox dla systemów wbudowanych
70 Group:          Applications
71
72 %description embed
73 Busybox for embedded systems.
74
75 %description embed -l pl
76 Busybox dla systemów wbudowanych.
77
78 %prep
79 %setup -q
80 %patch0 -p1
81 %patch1 -p1
82 %patch3 -p1
83 %patch4 -p1
84 %patch5 -p1
85 %patch6 -p1
86 %patch7 -p1
87
88 %build
89 cp -f %{SOURCE1} Config.h
90 # BOOT
91 %if %{!?_without_embed:1}%{?_without_embed:0}
92 %{__make} \
93         CFLAGS_EXTRA="%{embed_cflags}" \
94         CC=%{embed_cc}
95 mv -f busybox busybox-embed-shared
96 %{__make} \
97         CFLAGS_EXTRA="%{embed_cflags}" \
98         LDFLAGS="-static" \
99         CC=%{embed_cc}
100 mv -f busybox busybox-embed-static
101 %{__make} clean
102 %endif
103
104 %if %{?_without_static:0}%{!?_without_static:1}
105 %{__make} \
106         CFLAGS_EXTRA="%{rpmcflags}" \
107         LDFLAGS="%{rpmldflags} -static"
108 mv -f busybox busybox.static
109 %{__make} clean
110 %endif
111
112 %{__make} \
113         CFLAGS_EXTRA="%{rpmcflags}" \
114         LDFLAGS="%{rpmldflags}"
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/busybox}
119
120 %if %{!?_without_embed:1}%{?_without_embed:0}
121 install -d $RPM_BUILD_ROOT%{embed_path}/{shared,static,aux}
122
123 install busybox-embed-static $RPM_BUILD_ROOT%{embed_path}/static/busybox
124 install busybox-embed-shared $RPM_BUILD_ROOT%{embed_path}/shared/busybox
125
126 for i in `cat busybox.links`; do
127         ln -sfn busybox "$RPM_BUILD_ROOT%{embed_path}/shared/`basename $i`"
128         ln -sfn busybox "$RPM_BUILD_ROOT%{embed_path}/static/`basename $i`"
129 done
130 install busybox.links $RPM_BUILD_ROOT%{embed_path}/aux
131 %endif
132
133 %{!?_without_static:install busybox.static $RPM_BUILD_ROOT%{_bindir}}
134
135 install busybox $RPM_BUILD_ROOT%{_bindir}
136 install busybox.links $RPM_BUILD_ROOT%{_libdir}/busybox
137 install docs/BusyBox.1 $RPM_BUILD_ROOT%{_mandir}/man1
138 echo ".so BusyBox.1" > $RPM_BUILD_ROOT%{_mandir}/man1/busybox.1
139
140 gzip -9nf AUTHORS TODO Changelog README
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %files
146 %defattr(644,root,root,755)
147 %doc *.gz
148 %attr(755,root,root) %{_bindir}/busybox
149 %{_libdir}/busybox
150 %{_mandir}/man1/*
151
152 %if %{?_without_static:0}%{!?_without_static:1}
153 %files static
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_bindir}/busybox.static
156 %endif
157
158 %if %{!?_without_embed:1}%{?_without_embed:0}
159 %files embed
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{embed_path}/s*/*
162 %{embed_path}/aux/*
163 %endif
This page took 0.053402 seconds and 4 git commands to generate.