]> git.pld-linux.org Git - packages/busybox.git/blob - busybox.spec
f47091a3a899ec30febb41e64e71c8bf19f3a26f
[packages/busybox.git] / busybox.spec
1 Summary:        Set of common unix utils for embeded systems
2 Name:           busybox
3 Version:        0.51
4 Release:        3
5 License:        GPL
6 Group:          Applications
7 Group(de):      Applikationen
8 Group(pl):      Aplikacje
9 Source0:        ftp://ftp.lineo.com/pub/busybox/%{name}-%{version}.tar.gz
10 Source1:        %{name}-config.h
11 Patch0:         %{name}-logconsole.patch
12 Patch1:         %{name}-tee.patch
13 Patch2:         %{name}-sh-name.patch
14 URL:            http://busybox.lineo.com/
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16 BuildRequires:  uClibc-devel-BOOT
17
18 %description
19 BusyBox combines tiny versions of many common UNIX utilities into a
20 single small executable. It provides minimalist replacements for most
21 of the utilities you usually find in fileutils, shellutils, findutils,
22 textutils, grep, gzip, tar, etc. BusyBox provides a fairly complete
23 POSIX environment for any small or embedded system. The utilities in
24 BusyBox generally have fewer options than their full-featured GNU
25 cousins; however, the options that are included provide the expected
26 functionality and behave very much like their GNU counterparts.
27
28 BusyBox has been written with size-optimization and limited resources
29 in mind. It is also extremely modular so you can easily include or
30 exclude commands (or features) at compile time. This makes it easy to
31 customize your embedded systems. To create a working system, just add
32 a kernel, a shell (such as ash), and an editor (such as elvis-tiny or
33 ae).
34
35 %package BOOT
36 Summary:        busybox for PLD bootdisk
37 Group:          Applications
38 Group(de):      Applikationen
39 Group(pl):      Aplikacje
40
41 %description BOOT
42 busybox for PLD bootdisk.
43
44 %prep
45 %setup -q
46 %patch0
47 %patch1
48 %patch2 -p1
49
50 %build
51 # BOOT
52 cp %{SOURCE1} Config.h
53 %{__make} \
54         CFLAGS_EXTRA="-I%{_libdir}/bootdisk%{_includedir}" \
55         LDFLAGS="-nostdlib -s" \
56         LIBRARIES="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
57
58 # TODO make main package dynamically linked
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 %{__install} -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
63 %{__install} -d $RPM_BUILD_ROOT%{_libdir}/bootdisk/{bin,%{_libdir}/busybox}
64
65 %{__install} busybox $RPM_BUILD_ROOT%{_libdir}/bootdisk/bin/
66
67 for i in `cat busybox.links`; do
68         ln -sfn busybox "$RPM_BUILD_ROOT%{_libdir}/bootdisk/bin/`basename $i`"
69 done
70 %{__install} busybox.links $RPM_BUILD_ROOT%{_libdir}/bootdisk%{_libdir}/busybox
71 # change sh to lash (see sh_name patch)
72 mv -f $RPM_BUILD_ROOT%{_libdir}/bootdisk/bin/{sh,lash}
73
74 %{__install} busybox $RPM_BUILD_ROOT%{_bindir}
75 %{__install} busybox.links $RPM_BUILD_ROOT%{_libdir}/busybox
76 %{__install} docs/BusyBox.1 $RPM_BUILD_ROOT%{_mandir}/man1
77 echo ".so BusyBox.1" > $RPM_BUILD_ROOT%{_mandir}/man1/busybox.1
78
79 gzip -9nf AUTHORS TODO Changelog README
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %files
85 %defattr(644,root,root,755)
86 %doc *.gz
87 %attr(755,root,root) %{_bindir}/*
88 %{_libdir}/busybox
89 %{_mandir}/man1/*
90
91 %files BOOT
92 %defattr(644,root,root,755)
93 %attr(755,root,root) %{_libdir}/bootdisk/bin/*
94 %{_libdir}/bootdisk%{_libdir}/*
This page took 0.440156 seconds and 2 git commands to generate.