source: rtems-source-builder/source-builder/config/qemu-1-1.cfg @ 12f253c

4.11
Last change on this file since 12f253c was eddfda5, checked in by Chris Johns <chrisj@…>, on 06/16/15 at 10:58:19

config: Add a qemu-snapshot map to the qemu build.

  • Property mode set to 100644
File size: 2.0 KB
Line 
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#
12# Select Snapshot Macro Maps
13#
14%select qemu-snapshot
15
16#
17# The description.
18#
19Name:      qemu-%{qemu_version}-%{_host}-%{release}
20Summary:   Qemu is a simulator of various processors.
21Version:   %{qemu_version}
22Release:   %{release}
23URL:       http://www.qemu.org/
24BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
25
26#
27# Source
28#
29%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
30
31#
32# Prepare the source code.
33#
34%prep
35  build_top=$(pwd)
36
37  source_dir_qemu="qemu-%{qemu_version}"
38  %source setup qemu -q -n qemu-%{qemu_version}
39  %patch setup qemu -p1
40
41  cd ${build_top}
42
43%build
44  build_top=$(pwd)
45
46  %{build_directory}
47
48  mkdir -p ${build_dir}
49  cd ${build_dir}
50
51  %if %{pkgconfig check vdeplug}
52    VDE_CONFIG="--enable-vde"
53    VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
54    VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
55  %endif
56
57  %{host_build_flags}
58
59  if test "%{_build}" != "%{_host}" ; then
60    CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
61  fi
62
63  SYSROOT=$SB_TMPPREFIX
64
65  #
66  # The --extra-cflags and --extra-ldflags do not work as expected.
67  #
68  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
69  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
70  %{_ld_library_path}=$SYSROOT/lib \
71  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
72  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
73  ../${source_dir_qemu}/configure \
74    --prefix=%{_prefix} \
75    ${CROSS_PREFIX_OPTION} \
76    --make=%{__make} \
77    ${VDE_CONFIG} \
78    --disable-werror \
79    --disable-tools \
80    --disable-pie \
81    --disable-vnc \
82    --disable-sdl \
83    --disable-gtk \
84    --disable-opengl \
85    --disable-netmap
86
87  %{_ld_library_path}=$SYSROOT/lib \
88  %{__make} %{?_smp_mflags} all
89
90  cd ${build_top}
91
92%install
93  build_top=$(pwd)
94
95  %{__rmdir} $SB_BUILD_ROOT
96
97  cd ${build_dir}
98  %{_ld_library_path}=$SYSROOT/lib \
99  %{__make} DESTDIR=$SB_BUILD_ROOT install
100  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.