]> git.pld-linux.org Git - packages/busybox.git/blobdiff - busybox.spec
- disable ip and leave ifconfig/route
[packages/busybox.git] / busybox.spec
index e7d49e4f195b70af8efc12083f34b8c96f4781a1..98c08b3ddac31a1458057b1c3dd9049b9cf6f145 100644 (file)
@@ -1,58 +1,57 @@
 
-#
-# _with_altconfig <name>  - alternative busybox config file (replaces default one)
-#                           you should define cfgfile macro, i.e.
+# alternative busybox config file (replaces default one) you should 
+# define cfgfile macro, i.e.
 #
 #       rpm --rebuild busybox.*.src.rpm --with altconfig --define "cfgfile bb-emb-config.h"
-#
-#
-# _with_linkfl            - creates links to busybox binary and puts them into file list;
-#
+%bcond_with altconfig
+
+%bcond_with linkfl # creates links to busybox binary and puts them into file list
+
 # Options below are useful, when you want fileutils and grep providing.
 # For example, ash package requires fileutils and grep.
-#
-# _with_fileutl_prov      - adds fileutils providing
-# _with_grep_prov         - adds grep providing
-#
-#
+%bcond_with fileutl_prov # adds fileutils providing
+%bcond_with grep_prov    # adds grep providing
+
 # Option below is useful, when busybox is built with shell support.
-#
-# _with_sh_prov           - adds /bin/sh providing
-#
-#
+%bcond_with sh_prov      # adds /bin/sh providing
+
 # WARNING! Shell, filetuils and grep providing may depend on config file!
 # Fileutils, grep and shell provided with busybox have not such
 # functionality as their GNU countenders.
-#
-#
-# _without_static         - don't build static version
-#
 
+%bcond_without static  # don't build static version
+%bcond_without initrd  # don't build initrd version
+
+%define        pre     pre2
 Summary:       Set of common unix utils for embeded systems
 Summary(pl):   Zestaw narzêdzi uniksowych dla systemów wbudowanych
 Summary(pt_BR):        BusyBox é um conjunto de utilitários UNIX em um único binário
 Name:          busybox
-Version:       0.60.5
-Release:       1
+Version:       1.00
+Release:       0.%{pre}.1
 License:       GPL
 Group:         Applications
-Source0:       http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
-# Source0-md5: 79d244d5adbb048f1aa0d90ee9e187e4
-%{!?_with_altconfig:Source1:   %{name}-config.h}
-%{?_with_altconfig:Source1:    %{cfgfile}}
+Source0:       http://www.busybox.net/downloads/%{name}-%{version}-pre2.tar.bz2
+# Source0-md5: 06e433389a8b34ce1031a144ba5677d1
+Source1:       %{name}.config
+Source2:       %{name}-initrd.config
+%{?with_altconfig:Source3:     %{cfgfile}}
 Patch0:                %{name}-logconsole.patch
 Patch1:                %{name}-tee.patch
 Patch3:                %{name}-printf-gettext.patch
 Patch4:                %{name}-loadfont.patch
-Patch5:                %{name}-cread.patch
+Patch5:                %{name}-pivot_root.patch
 Patch6:                %{name}-malloc.patch
-Patch7:                %{name}-pivot_root.patch
-Patch8:                %{name}-child.patch
+Patch7:                %{name}-raid_start.patch
+Patch8:                %{name}-insmod_ng.patch
+Patch100:      %{name}-config.patch
+Patch101:      %{name}-initrd-config.patch
 URL:           http://www.busybox.net/
-%{?_with_fileutl_prov:Provides:        fileutils}
-%{?_with_grep_prov:Provides:   grep}
-%{?_with_sh_prov:Provides:     /bin/sh}
-%{!?_without_static:BuildRequires:     glibc-static}
+%{?with_fileutl_prov:Provides: fileutils}
+%{?with_grep_prov:Provides:    grep}
+%{?with_sh_prov:Provides:      /bin/sh}
+%{?with_static:BuildRequires:  glibc-static}
+%{?with_initrd:BuildRequires:  dietlibc-static}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -101,28 +100,59 @@ Static busybox.
 %description static -l pl
 Statycznie linkowany busybox.
 
+%package initrd
+Summary:       Static busybox for initrd
+Summary(pl):   Statycznie linkowany busybox dla initrd
+Group:         Applications
+
+%description initrd
+Static busybox for initrd.
+
+%description initrd -l pl
+Statycznie linkowany busybox dla initrd.
+
 %prep
-%setup -q
+%setup -q -n %{name}-%{version}-%{pre}
 %patch0 -p1
 %patch1 -p1
-%patch3 -p1
+#X %patch3 -p1 // UPDATE ME
 %patch4 -p1
-#%patch5 -p1
-#%patch6 -p1
+%patch5 -p1
+#%patch6 -p1 // not needed
 %patch7 -p1
-#%patch8 -p1
+%patch8 -p1
 
 %build
-cp -f %{SOURCE1} Config.h
+install %{SOURCE1} .config
+
+%if %{with altconfig}
+install %{SOURCE3} .config
+%endif
 
-%if %{?_without_static:0}%{!?_without_static:1}
+%if %{with initrd}
+install %{SOURCE2} .config
+%{__make} oldconfig
 %{__make} \
+       CFLAGS_EXTRA="%{rpmcflags} -D_BSD_SOURCE" \
+       LDFLAGS="%{rpmldflags} -static" \
+       LIBRARIES="-lrpc" \
+       CC="diet gcc"
+mv -f busybox busybox.initrd
+%{__make} clean
+install %{SOURCE1} .config
+%endif
+
+%if %{with static}
+%{__make} oldconfig
+%{__make}  \
        CFLAGS_EXTRA="%{rpmcflags}" \
-       LDFLAGS="%{rpmldflags} -static"
+       LDFLAGS="%{rpmldflags} -static" \
+       CC="%{__cc}"
 mv -f busybox busybox.static
 %{__make} clean
 %endif
 
+%{__make} oldconfig 
 %{__make} \
        CFLAGS_EXTRA="%{rpmcflags}" \
        LDFLAGS="%{rpmldflags}" \
@@ -132,37 +162,47 @@ mv -f busybox busybox.static
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/busybox}
 
-%{!?_without_static:install busybox.static $RPM_BUILD_ROOT%{_bindir}}
+%{?with_static:install busybox.static $RPM_BUILD_ROOT%{_bindir}}
+%{?with_initrd:install busybox.initrd $RPM_BUILD_ROOT%{_bindir}}
 
-%{?!_with_linkfl:install busybox $RPM_BUILD_ROOT%{_bindir}}
 install busybox.links $RPM_BUILD_ROOT%{_libdir}/busybox
 install docs/BusyBox.1 $RPM_BUILD_ROOT%{_mandir}/man1
 echo ".so BusyBox.1" > $RPM_BUILD_ROOT%{_mandir}/man1/busybox.1
 
 # install links to busybox binary, when linkfl is defined
-%{?_with_linkfl:make install PREFIX=$RPM_BUILD_ROOT}
+%if %{with linkfl}
+make install PREFIX=$RPM_BUILD_ROOT
+%else
+install busybox $RPM_BUILD_ROOT%{_bindir}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS TODO Changelog README Config.h
+%doc AUTHORS TODO Changelog README .config
 
-%{?!_with_linkfl: %attr(755,root,root) %{_bindir}/busybox}
-
-%if %{?_with_linkfl:1}%{?!_with_linkfl:0}
+%if %{with linkfl}
 %attr(755,root,root) /bin/*
 %attr(755,root,root) /sbin/*
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/*
+%else
+%attr(755,root,root) %{_bindir}/busybox
 %endif
 
 %{_libdir}/busybox
 %{_mandir}/man1/*
 
-%if %{?_without_static:0}%{!?_without_static:1}
+%if %{with static}
 %files static
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/busybox.static
 %endif
+
+%if %{with initrd}
+%files initrd
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/busybox.initrd
+%endif
This page took 0.30051 seconds and 4 git commands to generate.