VirtualBox

Changeset 40390 in vbox


Ignore:
Timestamp:
Mar 7, 2012 1:58:08 PM (13 years ago)
Author:
vboxsync
Message:

deb/rpm: fix package building, VNC extension pack is integrated if requested, various other cleanups in this area

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r40383 r40390  
    901901
    902902  printf("found version %s", LIBVNCSERVER_PACKAGE_VERSION);
    903   if (major*10000 + minor*100 + micro >= 907)
     903  if (major*10000 + minor*100 + micro >= 900)
    904904  {
    905905    printf(", OK.\n");
     
    908908  else
    909909  {
    910     printf(", expected version 0.9.7 or higher\n");
     910    printf(", expected version 0.9 or higher\n");
    911911    return 1;
    912912  }
  • trunk/debian/rules

    r40217 r40390  
    11#!/usr/bin/make -f
    22#
    3 # Copyright (C) 2006-2011 Oracle Corporation
     3# Copyright (C) 2006-2012 Oracle Corporation
    44#
    55# This file is part of VirtualBox Open Source Edition (OSE), as
     
    2727#  NOMODS=1         don't build any module
    2828#  NOQT=1           don't build the Qt GUI
     29#  EFI=1            include the EFI binary from prebuild
    2930#  HEADLESS=1       build the headless version
     31#  VNC=1            build VNC code
    3032#  NOWEBSVC=1       don't build the webservice API, default for OSE
    3133#  STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
     34#  PKGDIR=<path>    where to store the final package(s)
    3235#  BLEEDING_EDGE=xyz
    3336
     
    3639current  := $(shell pwd)
    3740vboxroot := $(shell pwd)
    38 pkgdir   := ..
     41pkgdir   := $(if $(PKGDIR),$(PKGDIR),$(shell cd ..; pwd))
    3942builddir := $(current)/debian/builddir
    4043moddir   := $(current)/debian/modules
     
    7073
    7174cfg_flags := $(if $(NOQT),--disable-qt,) \
     75             $(if $(filter _Ubuntu_hardy,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
    7276             $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
    73              $(if $(filter _Ubuntu_hardy,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
    7477             $(if $(HEADLESS),--build-headless,) \
    7578             $(if $(DEBUG),--build-debug,) \
    7679             $(if $(NOWINE),,--setup-wine) \
    7780             $(if $(NOWEBSVC),,--enable-webservice) \
     81             $(if $(VNC),--enable-vnc,) \
    7882             --disable-extpack
    7983
    8084bld_flags := AUTOCFG=$(current)/debian/AutoConfig.kmk \
    8185             LOCALCFG=$(current)/debian/LocalConfig.kmk \
    82              PATH_OUT=$(current)/debian/builddir \
     86             PATH_OUT=$(builddir) \
    8387             VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \
     88             VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \
    8489             VBOX_DO_STRIP= \
    8590             VBOX_DO_STRIP_MODULES= \
     
    8893             $(if $(ose),,VBOX_WITH_DOCS_CHM=1) \
    8994             VBOX_SVN_REV=$(svnrev) \
    90              $(if $(NODOCS),VBOX_WITH_DOCS= ,)\
     95             $(if $(NODOCS),VBOX_WITH_DOCS= ,) \
    9196             $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \
    9297             $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) \
     
    106111        $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,)
    107112        $(if $(NODOCS),cp $(vboxroot)/prebuild/VirtualBox*.chm $(builddir)/bin,)
     113        $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,)
     114        $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,)
    108115        mkdir -p $(builddir)/bin/additions
    109116        $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
     
    163170        rm -f debian/$(verpkg).mime
    164171        rm -rf $(builddir) $(moddir)
     172        rm -rf debian/wine.*
    165173        dh_clean
    166174
     
    236244            $(if $(NOWEBSVC),,vboxwebsrv webtest); do \
    237245            mv $(archdir)/$$i $(prefix)/usr/lib/$(package); done
     246        $(if $(VNC),mv $(archdir)/ExtensionPacks/VNC $(prefix)/usr/lib/$(package)/ExtensionPacks,)
    238247        mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
    239248        $(if $(NOMODS),,for d in $(moddir)/*; do \
     
    269278endif
    270279        rmdir $(archdir)/additions
     280        $(if $(VNC),rmdir $(archdir)/ExtensionPacks)
    271281        rmdir $(archdir)
    272282        rmdir $(prefix)/opt
     
    291301            -e 's|%DEBIAN%|yes|g' \
    292302            -e 's|%PACKAGE%|virtualbox|g' \
     303            -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \
    293304            -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
    294305            $(vboxroot)/src/VBox/Installer/linux/vboxdrv.sh.in > debian/vboxdrv.init
     
    343354        dh_installdeb
    344355        dh_perl
    345         dh_shlibdeps
     356        LD_LIBRARY_PATH=$(prefix)/usr/lib/virtualbox dh_shlibdeps
    346357        dh_gencontrol -- \
    347358          -Valsa=$(if $(HEADLESS),,libasound2) \
  • trunk/src/VBox/Installer/linux/Makefile.kmk

    r40370 r40390  
    143143                VBoxSharedCrOpenGL.so,) \
    144144        $(if $(VBOX_WITH_PYTHON),$(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so)),) \
    145         $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
     145        $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
     146        $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
     147                ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/VBoxVNC.so \
     148                ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/VBoxVNCMain.so,) \
    146149        VBoxTunctl
    147150
     
    166169          components/VirtualBox_XPCOM.xpt) \
    167170        $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
     171        $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
     172          ExtensionPacks/VNC/ExtPack.xml \
     173          ExtensionPacks/VNC/ExtPack-license.html \
     174          ExtensionPacks/VNC/ExtPack-license.rtf \
     175          ExtensionPacks/VNC/ExtPack-license.txt,) \
    168176        VBoxSysInfo.sh \
    169177        VBoxCreateUSBNode.sh \
     
    470478        $(QUIET)$(LN_SYMLINK) $< $@
    471479
    472 # rules for creating directories in archive (the pattern rules depends on these). ## @todo use BLDDIRS
     480# rules for creating directories in archive (the pattern rules depends on these).
    473481BLDDIRS += $(foreach d,\
    474482        archive \
     
    481489          archive/sdk/bindings/xpcom/python/xpcom \
    482490          archive/sdk/bindings/xpcom/python/xpcom/client \
    483           archive/sdk/bindings/xpcom/python/xpcom/server,) \
     491          archive/sdk/bindings/xpcom/python/xpcom/server,) \
    484492        $(if $(VBOX_WITH_JXPCOM),\
    485493          archive/sdk/bindings/xpcom/java,) \
     494        $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \
     495          archive/ExtensionPacks/VNC \
     496          archive/ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),) \
    486497        archive/additions \
    487498        install\
     
    513524        $(QUIET)objcopy --only-keep-debug $< $@
    514525
    515 # rules for creating directories in archive-dbg (the pattern rules depends on these). ## @todo use BLDDIRS
     526# rules for creating directories in archive-dbg (the pattern rules depends on these).
    516527BLDDIRS += $(foreach d,\
    517528        $(VBOX_LNX_DBG_PATH) \
  • trunk/src/VBox/Installer/linux/debian/rules

    r40217 r40390  
    11#!/usr/bin/make -f
    22#
    3 # Copyright (C) 2006-2011 Oracle Corporation
     3# Copyright (C) 2006-2012 Oracle Corporation
    44#
    55# This file is part of VirtualBox Open Source Edition (OSE), as
     
    3232#  NOMODS=1         don't build any module
    3333#  NOQT=1           don't build the Qt GUI
    34 #  EFI              include the EFI binary from prebuild
     34#  EFI=1            include the EFI binary from prebuild
    3535#  VERSUFFIX=<suffix> set a particular package version suffix (e.g. _customer)
    3636#  HEADLESS=1       build the headless version
     37#  VNC=1            build VNC code
    3738#  NOWEBSVC=1       don't build the webservice API, default for OSE
    3839#  STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
     
    5758NOQT     ?= $(HEADLESS)
    5859NOWEBSVC ?= $(ose)
    59 NOWINE   := $(if $(NODOCS),$(if $(STAGEDISO),1,),)
     60NOWINE   := $(if $(NODOCS),$(if $(STAGEDISO),1,),)$(ose)
    6061
    6162ifneq ($(wildcard $(verfile)),)
     
    9495
    9596cfg_flags := $(if $(NOQT),--disable-qt,) \
     97             $(if $(filter _Ubuntu_hardy,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
    9698             $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
    97              $(if $(filter _Ubuntu_hardy,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
    9899             $(if $(HEADLESS),--build-headless,) \
    99100             $(if $(DEBUG),--build-debug,) \
    100101             $(if $(NOWINE),,--setup-wine) \
    101102             $(if $(NOWEBSVC),,--enable-webservice) \
     103             $(if $(VNC),--enable-vnc,) \
    102104             --disable-extpack
    103105
    104106bld_flags := AUTOCFG=$(current)/debian/AutoConfig.kmk \
    105107             LOCALCFG=$(current)/debian/LocalConfig.kmk \
    106              PATH_OUT=$(current)/debian/builddir \
     108             PATH_OUT=$(builddir) \
    107109             VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \
     110             VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \
    108111             VBOX_DO_STRIP= \
    109112             VBOX_DO_STRIP_MODULES= \
     
    113116             VBOX_PACKAGE_DIST=$(debdist) \
    114117             VBOX_SVN_REV=$(svnrev) \
    115              $(if $(NODOCS),VBOX_WITH_DOCS= ,)\
     118             $(if $(NODOCS),VBOX_WITH_DOCS= ,) \
    116119             $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \
    117120             $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) \
     
    182185        dh_testdir
    183186        dh_testroot
    184         rm -f debian/changelog debian/preinst debian/postinst debian/prerm
     187        rm -f debian/changelog
     188        rm -f debian/preinst debian/postinst debian/prerm
    185189        rm -f debian/$(package).init debian/vboxdrv.init
    186190        rm -f debian/vboxballoonctrl-service.init debian/vboxweb-service.init
     
    264268            $(if $(NOWEBSVC),,vboxwebsrv webtest); do \
    265269            mv $(archdir)/$$i $(prefix)/usr/lib/$(package); done
     270        $(if $(VNC),mv $(archdir)/ExtensionPacks/VNC $(prefix)/usr/lib/$(package)/ExtensionPacks,)
    266271        mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
    267272        $(if $(NOMODS),,for d in $(moddir)/*; do \
     
    297302endif
    298303        rmdir $(archdir)/additions
     304        $(if $(VNC),rmdir $(archdir)/ExtensionPacks)
    299305        rmdir $(archdir)
    300306        rmdir $(prefix)/opt
  • trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec

    r39333 r40390  
    44
    55#
    6 # Copyright (C) 2006-2011 Oracle Corporation
     6# Copyright (C) 2006-2012 Oracle Corporation
    77#
    88# This file is part of VirtualBox Open Source Edition (OSE), as
     
    114114for i in VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl; do
    115115  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/$i; done
     116if [ -d ExtensionPacks/VNC ]; then
     117  mv ExtensionPacks/VNC $RPM_BUILD_ROOT/usr/lib/virtualbox/ExtensionPacks
     118fi
    116119mv VBoxTunctl $RPM_BUILD_ROOT/usr/bin
    117120for d in /lib/modules/*; do
  • trunk/src/VBox/Installer/linux/rpm/rules

    r40264 r40390  
    11#!/usr/bin/make -f
    2 
    32#
    4 # Copyright (C) 2006-2011 Oracle Corporation
     3# Copyright (C) 2006-2012 Oracle Corporation
    54#
    65# This file is part of VirtualBox Open Source Edition (OSE), as
     
    1312#
    1413
     14# possible overrides:
     15#  OSE=1            force VBOX_OSE
     16#  NOPARALLEL=1     compile with -j1
     17#  LINUX=<dir>      compile vboxdrv against Linux found in <dir>
     18#  VERBOSE=1        verbose build
     19#  DEBUG=1          debug build
     20#  NOSUBVER=1       disable generation of the sub-version field (which is
     21#                   either the subversion rev [if available] or the build date)
     22#  NODOCS=1         don't build docs, use precompiled UserManual.pdf and
     23#                   VirtualBox.chm from $HOME
     24#  NOMODS=1         don't build any module
     25#  NOQT=1           don't build the Qt GUI
     26#  EFI=1            include the EFI binary from prebuild
     27#  VERSUFFIX=<suffix> set a particular package version suffix (e.g. _customer)
     28#  HEADLESS=1       build the headless version
     29#  VNC=1            build VNC code
     30#  NOWEBSVC=1       don't build the webservice API, default for OSE
     31#  STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
     32#  PKGDIR=<path>    where to store the final package(s)
     33#  BLEEDING_EDGE=xyz
     34
    1535ifeq ($(wildcard rpm/rules),)
    1636$(error call rpm/rules from src/VBox/Installer/linux)
     
    3555verpkg   := VirtualBox-4.1
    3656current  := $(shell pwd)
    37 vboxroot := $(shell cd ../../../../; pwd)
     57vboxroot := $(shell cd ../../../..; pwd)
    3858pkgdir   := $(if $(PKGDIR),$(PKGDIR),$(shell cd ../../../../..; pwd))
    3959builddir := $(current)/rpm/builddir
     
    4161arch     := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "i386"; fi)
    4262verfile  := $(builddir)/version-generated.mk
     63ose      := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
    4364-include $(vboxroot)/SVN_REVISION
    4465svnrev   :=$(if $(svn_revision),$(svn_revision),0)
     66
     67NOMODS   ?= $(ose)
     68NOQT     ?= $(HEADLESS)
     69NOWEBSVC ?= $(ose)
     70NOWINE   := $(if $(NODOCS),$(if $(STAGEDISO),1,),)$(ose)
    4571
    4672ifneq ($(MAKECMDGOALS),clean)
     
    7197  $(error failed to detect the .spec file (rpmrel=$(rpmrel)))
    7298 endif
    73 
    74  include $(verfile)
    75 $(verfile): rpm/configure-stamp
    76         . rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) $(verfile)
    77 endif
    78 
     99endif
     100
     101ifneq ($(wildcard $(verfile)),)
     102include $(verfile)
    79103ver      := $(VBOX_VERSION_STRING)
    80 rpmver   :=$(ver)$(if $(NOSUBVER),,$(if $(svn_revision),_$(svn_revision),)$(VERSUFFIX)$(if $(DEBUG),_dbg,))$(if $(BLEEDING_EDGE),_$(BLEEDING_EDGE),)
     104rpmver   :=$(ver)$(if $(NOSUBVER),,$(if $(svn_revision),_$(svn_revision),)$(VERSUFFIX)$(if $(HEADLESS),_headless,)$(if $(DEBUG),_dbg,))$(if $(BLEEDING_EDGE),_$(BLEEDING_EDGE),)
    81105archdir  := $(current)/rpm/VirtualBox-$(ver)
    82106rpmname  := $(verpkg)-$(rpmver)_$(rpmrel)
     107endif
    83108
    84109# Fedora13/14 is bleeding edge, the other jails have outdated kernel headers
     
    104129endif
    105130
    106 cfg_flags := $(if $(filter rhel4 sles10.1,$(rpmrel)),--build-libxml2,) \
     131cfg_flags := $(if $(NOQT),--disable-qt,) \
     132             $(if $(filter rhel4 sles10.1,$(rpmrel)),--build-libxml2,) \
    107133             $(if $(filter rhel4,$(rpmrel)),--build-libssl,) \
    108134             $(if $(filter rhel4 rhel5 ol4 ol5 centos4 centos5 sles10.1,$(rpmrel)),--build-libcurl,) \
     
    111137             $(if $(filter rhel4 rhel5 ol4 ol5 centos4 centos5,$(rpmrel)),--enable-pulse,) \
    112138             $(if $(filter rhel4 rhel5 ol4 ol5 centos4 centos5 sles10.1 turbolinux11,$(rpmrel)),--with-qt4-dir=/home/vbox/Qt-4.7.4-stdc++6-$(arch)) \
     139             $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
     140             $(if $(HEADLESS),--build-headless,) \
    113141             $(if $(DEBUG),--build-debug,) \
     142             $(if $(NOWINE),,--setup-wine) \
     143             $(if $(NOWEBSVC),,--enable-webservice) \
     144             $(if $(VNC),--enable-vnc,) \
    114145             --disable-extpack
    115146
     
    118149             PATH_OUT=$(builddir) \
    119150             VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \
     151             VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \
    120152             VBOX_DO_STRIP= \
     153             VBOX_DO_STRIP_MODULES= \
    121154             VBOX_WITH_MULTIVERSION_PYTHON= \
    122155             $(doc_dir) \
    123              VBOX_WITH_DOCS_CHM=1 \
     156             $(if $(ose),,VBOX_WITH_DOCS_CHM=1) \
    124157             VBOX_PACKAGE_DIST=$(rpmdist) \
    125158             VBOX_SVN_REV=$(svnrev) \
     
    132165rpm/configure-stamp:
    133166        cd $(vboxroot) && ./configure --odir=$(current)/rpm $(cfg_flags)
    134         touch $(current)/rpm/configure-stamp
    135 
    136 rpm/build-stamp: rpm/configure-stamp
    137         . rpm/env.sh && kmk -C $(vboxroot) $(if $(NOPARALLEL),-j1,) $(bld_flags) all
    138         $(if $(NODOCS),,. rpm/env.sh && kmk -C $(vboxroot)/src/VBox/Main $(bld_flags) docs)
     167        touch rpm/configure-stamp
     168
     169rpm/build-stamp $(verfile): rpm/configure-stamp
     170        . rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all
    139171        $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,)
    140172        $(if $(NODOCS),cp $(vboxroot)/prebuild/VirtualBox*.chm $(builddir)/bin,)
     
    181213           rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec
    182214        sed \
    183            -e 's|%NOLSB%|yes|g' \
    184            -e 's|%DEBIAN%||g' \
    185            -e 's|%PACKAGE%|virtualbox|g' \
    186            -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \
    187            -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
    188            vboxdrv.sh.in > $(archdir)/vboxdrv.init
    189         sed \
    190            -e 's|%NOLSB%|yes|g' \
    191            -e 's|%DEBIAN%||g' \
    192            -e 's|%PACKAGE%|virtualbox|g' \
    193            vboxballoonctrl-service.sh.in > $(archdir)/vboxballoonctrl-service.init
    194         sed \
    195            -e 's|%NOLSB%|yes|g' \
    196            -e 's|%DEBIAN%||g' \
    197            -e 's|%PACKAGE%|virtualbox|g' \
    198            vboxweb-service.sh.in > $(archdir)/vboxweb-service.init
     215            -e 's|%NOLSB%|yes|g' \
     216            -e 's|%DEBIAN%||g' \
     217            -e 's|%PACKAGE%|virtualbox|g' \
     218            -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \
     219            -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
     220            vboxdrv.sh.in > $(archdir)/vboxdrv.init
     221        sed \
     222            -e 's|%NOLSB%|yes|g' \
     223            -e 's|%DEBIAN%||g' \
     224            -e 's|%PACKAGE%|virtualbox|g' \
     225            vboxballoonctrl-service.sh.in > $(archdir)/vboxballoonctrl-service.init
     226        sed \
     227            -e 's|%NOLSB%|yes|g' \
     228            -e 's|%DEBIAN%||g' \
     229            -e 's|%PACKAGE%|virtualbox|g' \
     230            vboxweb-service.sh.in > $(archdir)/vboxweb-service.init
    199231        cp debian/VBox.sh $(archdir)
    200232        mv rpm/VirtualBox-$(ver) rpm/$(rpmname)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette