SPECS: udev.spec - bcond for compiling initrd with glibc and skipp...
glen
glen at pld-linux.org
Fri Oct 14 17:02:15 CEST 2005
Author: glen Date: Fri Oct 14 15:02:15 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- bcond for compiling initrd with glibc and skipping main package build
---- Files affected:
SPECS:
udev.spec (1.99 -> 1.100)
---- Diffs:
================================================================
Index: SPECS/udev.spec
diff -u SPECS/udev.spec:1.99 SPECS/udev.spec:1.100
--- SPECS/udev.spec:1.99 Fri Oct 14 15:38:05 2005
+++ SPECS/udev.spec Fri Oct 14 17:02:10 2005
@@ -7,12 +7,18 @@
%bcond_without initrd # build without udev-initrd
%bcond_without uClibc # link initrd version with static uClibc
%bcond_with diet # link initrd version with static dietlibc (currently broken and unsupported)
+%bcond_with glibc # link initrd version with static glibc
+%bcond_without main # compile only main program, use for debugging initrd build
# can't have them both
%if %{with uClibc} && %{with diet}
%undefine with_diet
%endif
+%if %{with glibc} && %{with uClibc}
+%undefine with_uClibc
+%endif
+
Summary: A userspace implementation of devfs
Summary(pl): Implementacja devfs w przestrzeni użytkownika
Name: udev
@@ -37,6 +43,7 @@
%if %{with initrd}
%{?with_diet:BuildRequires: dietlibc-static}
%{?with_uClibc:BuildRequires: uClibc-static >= 0.9.28}
+%{?with_glibc:BuildRequires: glibc-static}
%endif
Requires: coreutils
Requires: hotplug >= 2003_08_05
@@ -83,6 +90,8 @@
%{?with_uClibc:LD="%{_target_cpu}-uclibc-gcc %{rpmldflags} -static"} \
%{?with_diet:CC="%{_target_cpu}-dietlibc-gcc"} \
%{?with_diet:LD="%{_target_cpu}-dietlibc-gcc %{rpmldflags} -static"} \
+ %{?with_glibc:CC="%{_target_cpu}-pld-linux-gcc"} \
+ %{?with_glibc:LD="%{_target_cpu}-pld-linux-gcc %{rpmldflags} -static"} \
DEBUG=%{!?debug:false}%{?debug:true} \
OPTIMIZATION="%{rpmcflags}" \
USE_KLIBC=false \
@@ -91,9 +100,12 @@
EXTRAS=""
cp -a udev initrd-udev
+%if %{without main}
%{__make} clean
%endif
+%endif
+%if %{with main}
%{__make} -C devmap_name \
CC="%{__cc}" \
OPTFLAGS="%{rpmcflags}"
@@ -108,10 +120,12 @@
EXTRAS="%{extras}"
%{__cc} %{rpmcflags} %{SOURCE6} -o uevent_listen
+%endif
%install
rm -rf $RPM_BUILD_ROOT
+%if %{with main}
install -d $RPM_BUILD_ROOT%{_sysconfdir}/udev/{rules.d,scripts}
# use of /etc/dev.d/ is no longer recommended
@@ -138,14 +152,17 @@
ln -s %{_sbindir}/udevsend $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d/default/10-udev.hotplug
+install devmap_name/devmap_name $RPM_BUILD_ROOT%{_sbindir}/devmap_name
+install uevent_listen $RPM_BUILD_ROOT%{_sbindir}
+
+%endif
+
%if %{with initrd}
+install -d $RPM_BUILD_ROOT%{_sbindir}
install -m755 initrd-udev $RPM_BUILD_ROOT%{_sbindir}/initrd-udev
ln -s initrd-udev $RPM_BUILD_ROOT%{_sbindir}/udevstart.initrd
%endif
-install devmap_name/devmap_name $RPM_BUILD_ROOT%{_sbindir}/devmap_name
-install uevent_listen $RPM_BUILD_ROOT%{_sbindir}
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -158,6 +175,7 @@
/sbin/start_udev || exit 0
fi
+%if %{with main}
%files
%defattr(644,root,root,755)
%doc ChangeLog FAQ HOWTO-udev_for_dev README TODO
@@ -195,6 +213,7 @@
%dev(c,1,3) %attr(666,root,root) /dev/null
%dev(c,5,1) %attr(660,root,console) /dev/console
%dev(c,1,5) %attr(666,root,root) /dev/zero
+%endif
%if %{with initrd}
%files initrd
@@ -208,6 +227,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.100 2005/10/14 15:02:10 glen
+- bcond for compiling initrd with glibc and skipping main package build
+
Revision 1.99 2005/10/14 13:38:05 glen
- uclibc broken on amd64
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/udev.spec?r1=1.99&r2=1.100&f=u
More information about the pld-cvs-commit
mailing list