~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno, Aurelien Jarno
  • Date: 2009-03-22 10:13:17 UTC
  • mfrom: (1.2.1 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090322101317-iigjtnu5qil35dtb
Tags: 0.10.1-1
[ Aurelien Jarno ]
* New upstream stable release:
  - patches/80_stable-branch.patch: remove.
* debian/control: 
  - Remove depends on proll.
  - Move depends on device-tree-compiler to build-depends.
  - Bump Standards-Version to 3.8.1 (no changes).
* patches/82_qemu-img_decimal.patch: new patch from upstream to make
  qemu-img accept sizes with decimal values (closes: bug#501400).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
#
3
 
# $Id: rules 320 2008-04-23 00:17:18Z guillem $
 
3
# $Id: rules 391 2009-03-07 05:21:19Z aurel32 $
4
4
#
5
5
 
6
 
DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
7
 
 
8
 
# WARNING: Removing no-strict-aliasing will make qemu insta-segfault.
9
 
CFLAGS = -Wall -g -fno-strict-aliasing
10
 
 
11
6
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12
 
        CFLAGS += -O0
13
 
else
14
 
        CFLAGS += -O2
15
 
endif
16
 
 
17
 
ifeq ($(DEB_HOST_ARCH_OS),linux)
18
 
        conf_arch += --enable-alsa
 
7
        CFLAGS = -O0
19
8
endif
20
9
 
21
10
# Support multiple makes at once
23
12
NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
24
13
endif
25
14
 
26
 
D = $(CURDIR)/debian/qemu
27
 
 
28
 
qemu_bios_files = \
29
 
        bios.bin \
30
 
        vgabios.bin \
31
 
        vgabios-cirrus.bin \
32
 
        video.x \
33
 
        openbios-sparc32 \
34
 
        openbios-sparc64 \
35
 
        pxe-ne2k_pci.bin \
36
 
        pxe-rtl8139.bin \
37
 
        pxe-pcnet.bin \
38
 
        ppc_rom.bin \
39
 
        proll.elf
 
15
# Architecture/system specific configuration
 
16
DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
17
DEB_HOST_ARCH_CPU = $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 
18
 
 
19
TARGET_SYSTEM_TCG    = arm-softmmu cris-softmmu i386-softmmu m68k-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu x86_64-softmmu
 
20
TARGET_LINUX_TCG     = alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user i386-linux-user m68k-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user x86_64-linux-user
 
21
 
 
22
target_system_list = $(TARGET_SYSTEM_TCG)
 
23
 
 
24
ifeq ($(DEB_HOST_ARCH_OS),linux)
 
25
       conf_arch += --audio-drv-list=oss,alsa,sdl,esd,pa
 
26
       target_linux_list += $(TARGET_LINUX_TCG)
 
27
endif
 
28
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
 
29
       conf_arch += --audio-drv-list=oss,sdl,esd,pa
 
30
endif
 
31
 
 
32
ifeq ($(DEB_HOST_ARCH_CPU),i386)
 
33
       conf_arch += --cpu=i386
 
34
endif
 
35
ifeq ($(DEB_HOST_ARCH_CPU),sparc)
 
36
       conf_arch += --cpu=sparc
 
37
endif
 
38
 
 
39
include /usr/share/quilt/quilt.make
40
40
 
41
41
qemu_docs = \
42
42
        qemu-doc.html \
44
44
        qemu.1 \
45
45
        qemu-img.1
46
46
 
47
 
include /usr/share/quilt/quilt.make
48
 
 
49
47
config-host.mak: configure
50
48
        dh_testdir
51
49
        
52
50
        CFLAGS="$(CFLAGS)" ./configure \
53
 
          --prefix=/usr \
54
 
          --enable-adlib \
55
 
          $(conf_arch)
 
51
                --prefix=/usr \
 
52
                --disable-blobs \
 
53
                --target-list="$(target_system_list) $(target_linux_list)" \
 
54
                $(conf_arch)
56
55
 
57
56
setup-source: patch
58
57
        $(MAKE) -f debian/rules config-host.mak
61
60
        dh_testdir
62
61
        
63
62
        $(MAKE) $(NJOBS)
64
 
        $(MAKE) -C pc-bios
 
63
        $(MAKE) -C pc-bios bamboo.dtb
 
64
        $(MAKE) -C pc-bios mpc8544ds.dtb
65
65
 
66
66
clean: unpatch
67
67
        dh_testdir
68
68
        dh_testroot
69
69
        
70
 
        -$(MAKE) -C pc-bios clean
71
 
        -$(MAKE) distclean
 
70
        [ ! -f config-host.mak ] || $(MAKE) distclean
72
71
        
73
72
        rm -f $(qemu_docs)
 
73
        rm -f pc-bios/*.dtb
74
74
        
75
75
        dh_clean
76
76
 
80
80
        dh_clean -k
81
81
        dh_installdirs -a
82
82
        
83
 
        # Make qemu's "make install" happy
84
 
        for i in $(qemu_bios_files); do \
85
 
          touch pc-bios/$$i; \
86
 
        done
87
 
        
88
 
        $(MAKE) DESTDIR=$(D) install
89
 
        
90
 
        # Clean up the mess
91
 
        for i in $(qemu_bios_files); do \
92
 
          rm -f pc-bios/$$i $(D)/usr/share/qemu/$$i; \
93
 
        done
94
 
 
 
83
        $(MAKE) DESTDIR=$(CURDIR)/debian/qemu install
 
84
 
 
85
        zcat /usr/share/etherboot/e1000-82540em.zrom.gz > $(CURDIR)/debian/qemu/usr/share/qemu/pxe-e1000.bin
 
86
        zcat /usr/share/etherboot/rtl8029.zrom.gz       > $(CURDIR)/debian/qemu/usr/share/qemu/pxe-ne2k_pci.bin
 
87
        zcat /usr/share/etherboot/pcnet32.zrom.gz       > $(CURDIR)/debian/qemu/usr/share/qemu/pxe-pcnet.bin
 
88
        zcat /usr/share/etherboot/rtl8139.zrom.gz       > $(CURDIR)/debian/qemu/usr/share/qemu/pxe-rtl8139.bin
 
89
 
 
90
        cp $(CURDIR)/pc-bios/bamboo.dtb $(CURDIR)/pc-bios/mpc8544ds.dtb $(CURDIR)/debian/qemu/usr/share/qemu/
 
91
 
 
92
        for target in $(target_system_list) ; do \
 
93
          cp $(CURDIR)/$$target/libqemu.a $(CURDIR)/debian/libqemu-dev/usr/lib/qemu/$$target/ ; \
 
94
          cp $(CURDIR)/$$target/*.h $(CURDIR)/debian/libqemu-dev/usr/include/qemu/$$target/ ; \
 
95
        done
 
96
        
95
97
binary-indep:
96
98
# Nothing to do.
97
99
 
110
112
        dh_strip -a
111
113
        dh_compress -a
112
114
        dh_fixperms -a
113
 
        chmod a+x $(D)/etc/qemu-ifup
 
115
        chmod a+x $(CURDIR)/debian/qemu/etc/qemu-ifup
114
116
        dh_installdeb -a
115
117
        dh_shlibdeps -a
116
118
        dh_gencontrol -a