SPECS: qemu.spec - supply /sbin/qemu-ifup script

glen glen at pld-linux.org
Wed Aug 24 09:12:23 CEST 2005


Author: glen                         Date: Wed Aug 24 07:12:23 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- supply /sbin/qemu-ifup script

---- Files affected:
SPECS:
   qemu.spec (1.33 -> 1.34) 

---- Diffs:

================================================================
Index: SPECS/qemu.spec
diff -u SPECS/qemu.spec:1.33 SPECS/qemu.spec:1.34
--- SPECS/qemu.spec:1.33	Sat Aug 20 07:54:55 2005
+++ SPECS/qemu.spec	Wed Aug 24 09:12:17 2005
@@ -16,7 +16,7 @@
 Summary(pl):	QEMU - emulator procesora
 Name:		qemu
 Version:	0.7.1
-%define		_rel	1
+%define		_rel	1.4
 Release:	%{_rel}%{?with_kqemu:k}
 License:	GPL
 Group:		Applications/Emulators
@@ -37,6 +37,7 @@
 Patch6:		%{name}-gcc4_ppc.patch
 Patch7:		%{name}-parallel.patch
 Patch8:		%{name}-nosdlgui.patch
+Patch9:		%{name}-ifup.patch
 URL:		http://fabrice.bellard.free.fr/qemu/
 BuildRequires:	SDL-devel >= 1.2.1
 %if %{with kqemu} && %{with dist_kernel}
@@ -127,6 +128,7 @@
 %patch6 -p1
 %patch7 -p1
 %{?with_nosdlgui:%patch8 -p1}
+%patch9 -p1
 
 %{__sed} -i -e 's/sdl_static=yes/sdl_static=no/' configure
 %{__sed} -i 's/.*MAKE) -C kqemu$//' Makefile
@@ -181,6 +183,16 @@
 %if %{with userspace}
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT/sbin
+cat <<'EOF' > $RPM_BUILD_ROOT/sbin/qemu-ifup
+#!/bin/sh
+if [ -f /etc/sysconfig/qemu ]; then
+	. /etc/sysconfig/qemu
+fi
+# of course this will work only for one interface. a lot possible to involve
+sudo /sbin/ifconfig $1 ${INTERFACE_ADDR:-172.20.0.1}
+EOF
 %endif
 
 %if %{with kernel}
@@ -217,11 +229,11 @@
 %postun -n kernel-smp-misc-kqemu
 %depmod %{_kernel_ver}smp
 
-
 %if %{with userspace}
 %files
 %defattr(644,root,root,755)
 %doc README qemu-doc.html qemu-tech.html
+%attr(755,root,root) /sbin/qemu-ifup
 %attr(755,root,root) %{_bindir}/*
 %{_datadir}/qemu
 %{_mandir}/man1/qemu.1*
@@ -250,6 +262,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.34  2005/08/24 07:12:17  glen
+- supply /sbin/qemu-ifup script
+
 Revision 1.33  2005/08/20 05:54:55  charles
 - separated kernel modules + bconds
 - updated BRs
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/qemu.spec?r1=1.33&r2=1.34&f=u




More information about the pld-cvs-commit mailing list