1 | # |
---|
2 | # QEMU 1.x.x Version 1. |
---|
3 | # |
---|
4 | # This configuration file configure's, make's and install's QEMU. |
---|
5 | # |
---|
6 | |
---|
7 | %if %{release} == %{nil} |
---|
8 | %define release 1 |
---|
9 | %endif |
---|
10 | |
---|
11 | Name: qemu-%{qemu_version}-%{_host}-%{release} |
---|
12 | Summary: Qemu is a simulator of various processors. |
---|
13 | Version: %{qemu_version} |
---|
14 | Release: %{release} |
---|
15 | URL: http://www.qemu.org/ |
---|
16 | BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) |
---|
17 | |
---|
18 | # |
---|
19 | # Source |
---|
20 | # |
---|
21 | Source0: http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2 |
---|
22 | |
---|
23 | # |
---|
24 | # Prepare the source code. |
---|
25 | # |
---|
26 | %prep |
---|
27 | build_top=$(pwd) |
---|
28 | |
---|
29 | source_dir_0="qemu-%{qemu_version}" |
---|
30 | %setup -q -n qemu-%{qemu_version} |
---|
31 | %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}} |
---|
32 | %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}} |
---|
33 | %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}} |
---|
34 | %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}} |
---|
35 | %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}} |
---|
36 | %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}} |
---|
37 | %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}} |
---|
38 | %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}} |
---|
39 | %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}} |
---|
40 | %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}} |
---|
41 | |
---|
42 | cd ${build_top} |
---|
43 | |
---|
44 | %build |
---|
45 | build_top=$(pwd) |
---|
46 | |
---|
47 | %{build_directory} |
---|
48 | |
---|
49 | mkdir -p ${build_dir} |
---|
50 | cd ${build_dir} |
---|
51 | |
---|
52 | %{host_build_flags} |
---|
53 | |
---|
54 | if test "%{_build}" != "%{_host}" ; then |
---|
55 | CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-" |
---|
56 | fi |
---|
57 | |
---|
58 | SYSROOT=$SB_TMPPREFIX |
---|
59 | |
---|
60 | PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \ |
---|
61 | PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \ |
---|
62 | %{_ld_library_path}=$SYSROOT/lib \ |
---|
63 | LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib" \ |
---|
64 | ../${source_dir_0}/configure \ |
---|
65 | --prefix=%{_prefix} \ |
---|
66 | ${CROSS_PREFIX_OPTION} \ |
---|
67 | --make=%{__make} \ |
---|
68 | --disable-werror \ |
---|
69 | --disable-tools \ |
---|
70 | --disable-pie \ |
---|
71 | --disable-vnc \ |
---|
72 | --disable-netmap |
---|
73 | |
---|
74 | %{_ld_library_path}=$SYSROOT/lib \ |
---|
75 | %{__make} %{?_smp_mflags} all |
---|
76 | |
---|
77 | cd ${build_top} |
---|
78 | |
---|
79 | %install |
---|
80 | build_top=$(pwd) |
---|
81 | |
---|
82 | %{__rmdir} $SB_BUILD_ROOT |
---|
83 | |
---|
84 | cd ${build_dir} |
---|
85 | %{__make} DESTDIR=$SB_BUILD_ROOT install |
---|
86 | cd ${build_top} |
---|