SPECS: kernel-video-drm.spec - _alt_kernel support

shadzik shadzik at pld-linux.org
Thu Apr 12 17:04:39 CEST 2007


Author: shadzik                      Date: Thu Apr 12 15:04:39 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- _alt_kernel support

---- Files affected:
SPECS:
   kernel-video-drm.spec (1.25 -> 1.26) 

---- Diffs:

================================================================
Index: SPECS/kernel-video-drm.spec
diff -u SPECS/kernel-video-drm.spec:1.25 SPECS/kernel-video-drm.spec:1.26
--- SPECS/kernel-video-drm.spec:1.25	Tue Feb 13 09:06:37 2007
+++ SPECS/kernel-video-drm.spec	Thu Apr 12 17:04:34 2007
@@ -7,7 +7,6 @@
 # Conditional build:
 %bcond_without	dist_kernel	# allow non-distribution kernel
 %bcond_without	kernel		# don't build kernel modules
-%bcond_without	smp		# don't build SMP module
 %bcond_with	verbose		# verbose build (V=1)
 
 %if !%{with kernel}
@@ -17,7 +16,7 @@
 %define		_rel	1
 Summary:	Linux driver for DRM
 Summary(pl.UTF-8):	Sterownik dla Linuksa do DRM
-Name:		kernel-video-drm
+Name:		kernel%{_alt_kernel}-video-drm
 Version:	20061208
 Release:	%{_rel}@%{_kernel_ver_str}
 License:	GPL v2
@@ -26,13 +25,13 @@
 # Source0-md5:	6ddb34015487c5fa15d523d26f72f97d
 URL:		http://dri.freedesktop.org/wiki/DRM
 %if %{with kernel}
-%{?with_dist_kernel:BuildRequires:	kernel-module-build >= 3:2.6.14}
-BuildRequires:	rpmbuild(macros) >= 1.286
+%{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
+BuildRequires:	rpmbuild(macros) >= 1.379
 %endif
 Requires(post,postun):	/sbin/depmod
 %if %{with dist_kernel}
-%requires_releq_kernel_up
-Requires(postun):	%releq_kernel_up
+%requires_releq_kernel
+Requires(postun):	%releq_kernel
 %endif
 Obsoletes:	kernel-drm = %{_kernel_ver_str}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -45,113 +44,37 @@
 DRM (Direct Rendering Manager) to moduł jądra Linuksa dający
 bezpośredni dostęp do sprzętu klientom DRI.
 
-%package -n kernel-smp-video-drm
-Summary:	Linux SMP driver for DRM
-Summary(pl.UTF-8):	Sterownik dla Linuksa SMP do DRM
-Release:	%{_rel}@%{_kernel_ver_str}
-License:	GPL v2
-Group:		Base/Kernel
-Requires(post,postun):	/sbin/depmod
-%if %{with dist_kernel}
-%requires_releq_kernel_smp
-Requires(postun):	%releq_kernel_smp
-%endif
-Obsoletes:	kernel-smp-drm = %{_kernel_ver_str}
-
-%description -n kernel-smp-video-drm
-The DRM (Direct Rendering Manager) is a Linux kernel module that gives
-direct hardware access to DRI clients.
-
-This package contains Linux SMP module.
-
-%description -n kernel-smp-video-drm -l pl.UTF-8
-DRM (Direct Rendering Manager) to moduł jądra Linuksa dający
-bezpośredni dostęp do sprzętu klientom DRI.
-
-Ten pakiet zawiera moduł jądra Linuksa SMP.
-
 %prep
 %setup -q -n drm
 
 %build
 %if %{with kernel}
-
 chmod u+x scripts/create_linux_pci_lists.sh
 cd linux-core
-
 cat ../shared-core/drm_pciids.txt | ../scripts/create_linux_pci_lists.sh
-
-install -d {ko-up,ko-smp}
-
-# kernel module(s)
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
-	if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
-		exit 1
-	fi
-
-	rm -f *.o
-	install -d o/include/linux
-	ln -sf %{_kernelsrcdir}/config-$cfg o/.config
-	ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
-	ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
-%if %{with dist_kernel}
-	%{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
-%else
-	install -d o/include/config
-	touch o/include/config/MARKER
-	ln -sf %{_kernelsrcdir}/scripts o/scripts
-%endif
-
-	%{__make} -C %{_kernelsrcdir} modules \
-		CC="%{__cc}" CPP="%{__cpp}" \
-		SYSSRC=%{_kernelsrcdir} \
-		SYSOUT=$PWD/o \
-		M=$PWD O=$PWD/o \
-		DRMSRCDIR="$PWD" LINUXDIR=%{_kernelsrcdir} \
-		%{?with_verbose:V=1}
-
-	mv *.ko ko-$cfg
-done
+%build_kernel_modules -m ko
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with kernel}
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/video
-cp linux-core/ko-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}/*.ko \
-	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/video
-%if %{with smp} && %{with dist_kernel}
-cp linux-core/ko-smp/*.ko \
-	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/video
-%endif
+%install_kernel_modules -m ko -d video
 %endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post	-n kernel-video-drm
+%post	-n kernel%{_alt_kernel}-video-drm
 %depmod %{_kernel_ver}
 
-%postun	-n kernel-video-drm
+%postun	-n kernel%{_alt_kernel}-video-drm
 %depmod %{_kernel_ver}
 
-%post	-n kernel-smp-video-drm
-%depmod %{_kernel_ver}smp
-
-%postun	-n kernel-smp-video-drm
-%depmod %{_kernel_ver}smp
-
 %if %{with kernel}
-%files -n kernel-video-drm
+%files -n kernel%{_alt_kernel}-video-drm
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}/video/*.ko*
-
-%if %{with smp} && %{with dist_kernel}
-%files -n kernel-smp-video-drm
-%defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}smp/video/*.ko*
-%endif
 %endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -160,6 +83,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.26  2007/04/12 15:04:34  shadzik
+- _alt_kernel support
+
 Revision 1.25  2007/02/13 08:06:37  glen
 - tabs in preamble
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/kernel-video-drm.spec?r1=1.25&r2=1.26&f=u



More information about the pld-cvs-commit mailing list