SPECS: module-init-tools.spec - rel 3 - added initrd package

baggins baggins at pld-linux.org
Mon Mar 2 16:16:59 CET 2009


Author: baggins                      Date: Mon Mar  2 15:16:59 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- rel 3
- added initrd package

---- Files affected:
SPECS:
   module-init-tools.spec (1.68 -> 1.69) 

---- Diffs:

================================================================
Index: SPECS/module-init-tools.spec
diff -u SPECS/module-init-tools.spec:1.68 SPECS/module-init-tools.spec:1.69
--- SPECS/module-init-tools.spec:1.68	Mon Mar  2 13:21:58 2009
+++ SPECS/module-init-tools.spec	Mon Mar  2 16:16:54 2009
@@ -1,4 +1,9 @@
 # $Revision$, $Date$
+#
+# Conditional build
+%bcond_without	initrd	# don't build initrd package
+%bcond_without	uClibc	# don't link with uclibc, use glibc
+#
 Summary:	Module utilities without kerneld
 Summary(de.UTF-8):	Module-Utilities
 Summary(es.UTF-8):	Utilitarios para módulos y kerneld
@@ -10,7 +15,7 @@
 Summary(uk.UTF-8):	Утиліти для роботи з модулями ядра
 Name:		module-init-tools
 Version:	3.5
-Release:	2
+Release:	3
 License:	GPL v2+
 Group:		Applications/System
 Source0:	http://kernel.org/pub/linux/utils/kernel/module-init-tools/%{name}-%{version}.tar.bz2
@@ -30,6 +35,9 @@
 BuildRequires:	docbook-to-man
 BuildRequires:	glibc-static
 BuildRequires:	zlib-static
+%if %{with initrd}
+%{?with_uClibc:BuildRequires:	uClibc-static >= 3:0.9.29-23}
+%endif
 Obsoletes:	modutils
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -47,6 +55,18 @@
 usuwania modułów jądra Linuksa (w wersji 2.5.47 i wyższych). Służy do
 tego samego, co pakiet modutils dla Linuksa 2.4.
 
+%package initrd
+Summary:	Module utilities without kerneld - static binary for initrd
+Summary(pl.UTF-8):	Narzędzia do modułów jądra systemu bez kerneld - statyczne binarki dla initrd
+Group:		Applications/System
+Requires:	%{name} = %{version}-%{release}
+
+%description initrd
+Module utilities without kerneld - static binary for initrd.
+
+%description initrd -l pl.UTF-8
+Narzędzia do modułów jądra systemu bez kerneld - statyczne binarki dla initrd.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -59,6 +79,22 @@
 %{__aclocal}
 %{__autoconf}
 %{__automake}
+
+%if %{with initrd}
+%configure \
+	%{?with_uClibc:LDFLAGS="%{rpmldflags} -static"} \
+	%{?with_uClibc:CC="%{_target_cpu}-uclibc-gcc"} \
+	--enable-zlib
+
+%{__make} \
+	ZLIB=/usr/lib/libz.a
+
+%{__make} install-exec-am \
+	DESTDIR=initrd-mod
+
+%{__make} clean
+%endif
+
 %configure \
 	--enable-zlib
 %{__make}
@@ -77,6 +113,14 @@
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/blacklist.conf
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/modprobe.d/usb.conf
 
+%if %{with initrd}
+install initrd-mod/sbin/depmod $RPM_BUILD_ROOT%{_sbindir}/initrd-depmod
+install initrd-mod/sbin/insmod $RPM_BUILD_ROOT%{_sbindir}/initrd-insmod
+install initrd-mod/sbin/lsmod $RPM_BUILD_ROOT%{_sbindir}/initrd-lsmod
+install initrd-mod/sbin/modprobe $RPM_BUILD_ROOT%{_sbindir}/initrd-modprobe
+install initrd-mod/sbin/rmmod $RPM_BUILD_ROOT%{_sbindir}/initrd-rmmod
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -93,17 +137,30 @@
 %dir /etc/modprobe.d
 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/*.conf
 %attr(755,root,root) %{_sbindir}/*
+%if %{with initrd}
+%exclude %{_sbindir}/initrd-*
+%endif
 %{_mandir}/man5/depmod.conf.5*
 %{_mandir}/man5/modprobe.conf.5*
 %{_mandir}/man5/modules.dep.5*
 %{_mandir}/man8/*.8*
 
+%if %{with initrd}
+%files initrd
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_sbindir}/initrd-*
+%endif
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.69  2009/03/02 15:16:54  baggins
+- rel 3
+- added initrd package
+
 Revision 1.68  2009/03/02 12:21:58  baggins
 - rel 2
 - no need to be paranoid about modprobe config
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/module-init-tools.spec?r1=1.68&r2=1.69&f=u



More information about the pld-cvs-commit mailing list