SPECS: qemu.spec - alt kernel build support - move sources alter t...

glen glen at pld-linux.org
Sat Dec 15 23:59:25 CET 2007


Author: glen                         Date: Sat Dec 15 22:59:25 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- alt kernel build support
- move sources alter to prep

---- Files affected:
SPECS:
   qemu.spec (1.93 -> 1.94) 

---- Diffs:

================================================================
Index: SPECS/qemu.spec
diff -u SPECS/qemu.spec:1.93 SPECS/qemu.spec:1.94
--- SPECS/qemu.spec:1.93	Fri Dec 14 10:04:53 2007
+++ SPECS/qemu.spec	Sat Dec 15 23:59:19 2007
@@ -18,39 +18,44 @@
 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
 %define	alt_kernel	grsecurity
 %endif
+%if "%{_alt_kernel}" != "%{nil}"
+%undefine	with_userspace
+%endif
 
 # no kqemu for ppc
 %ifarch ppc
 %undefine	with_kqemu
 %undefine	with_kernel
 %endif
-%define	_kqemu_version	1.3.0pre11
+%define		kqemu_version	1.3.0pre11
+%define		qemu_version	0.9.0
 %define		_rel	4
+%define		pname	qemu
 Summary:	QEMU CPU Emulator
 Summary(pl.UTF-8):	QEMU - emulator procesora
-Name:		qemu
-Version:	0.9.0
+Name:		%{pname}%{_alt_kernel}
+Version:	%{qemu_version}
 Release:	%{_rel}%{?with_kqemu:k}
 License:	GPL
 Group:		Applications/Emulators
 #Source0Download: http://fabrice.bellard.free.fr/qemu/download.html
-Source0:	http://fabrice.bellard.free.fr/qemu/%{name}-%{version}.tar.gz
+Source0:	http://fabrice.bellard.free.fr/qemu/%{pname}-%{version}.tar.gz
 # Source0-md5:	ab11a03ba30cf4a70641f0f170473d69
-Source1:	http://fabrice.bellard.free.fr/qemu/k%{name}-%{_kqemu_version}.tar.gz
+Source1:	http://fabrice.bellard.free.fr/qemu/k%{pname}-%{kqemu_version}.tar.gz
 # Source1-md5:	970521874ef8b1ba4598925ace5936c3
-Patch0:		%{name}-nostatic.patch
-Patch1:		%{name}-cc.patch
-Patch3:		%{name}-dot.patch
-Patch4:		%{name}-gcc4_x86.patch
-Patch5:		%{name}-gcc4_ppc.patch
-Patch6:		%{name}-nosdlgui.patch
+Patch0:		%{pname}-nostatic.patch
+Patch1:		%{pname}-cc.patch
+Patch3:		%{pname}-dot.patch
+Patch4:		%{pname}-gcc4_x86.patch
+Patch5:		%{pname}-gcc4_ppc.patch
+Patch6:		%{pname}-nosdlgui.patch
 # Proof of concept, for reference, do not remove
-Patch8:		%{name}-kde_virtual_workspaces_hack.patch
+Patch8:		%{pname}-kde_virtual_workspaces_hack.patch
 # http://gwenole.beauchesne.info/en/projects/qemu
-Patch9:		%{name}-0.8.0-gcc4-hacks.patch
-Patch11:	%{name}-0.7.2-gcc4-opts.patch
-#Patch12:	%{name}-0.7.2-dyngen-check-stack-clobbers.patch
-Patch13:	%{name}-dosguest.patch
+Patch9:		%{pname}-0.8.0-gcc4-hacks.patch
+Patch11:	%{pname}-0.7.2-gcc4-opts.patch
+#Patch12:	%{pname}-0.7.2-dyngen-check-stack-clobbers.patch
+Patch13:	%{pname}-dosguest.patch
 URL:		http://fabrice.bellard.free.fr/qemu/
 %if %{with kernel} && %{with dist_kernel}
 BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.7
@@ -106,7 +111,7 @@
 %package -n kernel%{_alt_kernel}-misc-kqemu
 Summary:	kqemu - kernel module
 Summary(pl.UTF-8):	kqemu - moduł jądra
-Version:	%{_kqemu_version}
+Version:	%{kqemu_version}
 Release:	%{_rel}@%{_kernel_ver_str}
 Group:		Base/Kernel
 %{?with_dist_kernel:%requires_releq_kernel}
@@ -122,7 +127,7 @@
 kqemu - moduł jądra.
 
 %prep
-%setup -q %{?with_kernel:-a1}
+%setup -q -n %{pname}-%{qemu_version} %{?with_kernel:-a1}
 %patch0 -p1
 %patch1 -p1
 %patch3 -p1
@@ -147,7 +152,7 @@
 %endif
 
 %if %{with kernel}
-echo -n > kqemu-%{_kqemu_version}/install.sh
+echo -n > kqemu-%{kqemu_version}/install.sh
 
 cat <<'EOF' > modprobe.conf
 # enable dynamic major
@@ -159,16 +164,8 @@
 cat <<'EOF' > udev.conf
 KERNEL=="kqemu", NAME="%k", MODE="0666"
 EOF
-%endif
-
-%if %{with dosguest}
-%patch13 -p1
-%endif
-
-%build
-%if %{with kernel}
-cd kqemu-%{_kqemu_version}
 
+cd kqemu-%{kqemu_version}
 %{__sed} -i 's#include ../config-host.mak##' ./common/Makefile
 %ifarch %{x8664}
 %{__sed} -i 's/^#ARCH=x86_64/ARCH=x86_64/' ./common/Makefile
@@ -188,7 +185,16 @@
 $(obj)/kqemu-mod.o: $(src)/kqemu-mod-$(ARCH).o.bin
 	cp $< $@
 EOF
+cd -
+%endif
 
+%if %{with dosguest}
+%patch13 -p1
+%endif
+
+%build
+%if %{with kernel}
+cd kqemu-%{kqemu_version}
 %build_kernel_modules -m kqemu <<'EOF'
 if grep -q "CONFIG_PREEMPT_RT" o/.config; then
 	sed 's/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(kqemu_lock)/' \
@@ -215,7 +221,7 @@
 %endif
 	%{?with_gcc4:--disable-gcc-check} \
 	--enable-alsa \
-	--interp-prefix=%{_libdir}/%{name}
+	--interp-prefix=%{_libdir}/%{pname}
 %{__make}
 %endif
 
@@ -234,7 +240,7 @@
 %endif
 
 %if %{with kernel}
-%install_kernel_modules -m kqemu-%{_kqemu_version}/kqemu -d misc
+%install_kernel_modules -m kqemu-%{kqemu_version}/kqemu -d misc
 install -d $RPM_BUILD_ROOT/etc/{modprobe.d/%{_kernel_ver}{,smp},udev/rules.d}
 install modprobe.conf $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}/kqemu.conf
 install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/kqemu.rules
@@ -248,7 +254,7 @@
 
 %if %{with kernel}
 %post
-%banner %{name} -e <<EOF
+%banner %{pname} -e <<EOF
 To enable qemu accelerator (kqemu), the kqemu kernel module must be loaded:
 modprobe kqemu
 EOF
@@ -274,7 +280,7 @@
 %if %{with kernel}
 %files -n kernel%{_alt_kernel}-misc-kqemu
 %defattr(644,root,root,755)
-%doc kqemu-%{_kqemu_version}/LICENSE
+%doc kqemu-%{kqemu_version}/LICENSE
 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/kqemu.rules
 %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/%{_kernel_ver}/kqemu.conf
 /lib/modules/%{_kernel_ver}/misc/kqemu.ko*
@@ -286,6 +292,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.94  2007-12-15 22:59:19  glen
+- alt kernel build support
+- move sources alter to prep
+
 Revision 1.93  2007-12-14 09:04:53  wolvverine
 - rel.4 for 2.6.22.14-6
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/qemu.spec?r1=1.93&r2=1.94&f=u



More information about the pld-cvs-commit mailing list