Changeset 40390 in vbox for trunk/src/VBox/Installer/linux/rpm/rules
- Timestamp:
- Mar 7, 2012 1:58:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/rpm/rules
r40264 r40390 1 1 #!/usr/bin/make -f 2 3 2 # 4 # Copyright (C) 2006-201 1Oracle Corporation3 # Copyright (C) 2006-2012 Oracle Corporation 5 4 # 6 5 # This file is part of VirtualBox Open Source Edition (OSE), as … … 13 12 # 14 13 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 15 35 ifeq ($(wildcard rpm/rules),) 16 36 $(error call rpm/rules from src/VBox/Installer/linux) … … 35 55 verpkg := VirtualBox-4.1 36 56 current := $(shell pwd) 37 vboxroot := $(shell cd ../../../.. /; pwd)57 vboxroot := $(shell cd ../../../..; pwd) 38 58 pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd ../../../../..; pwd)) 39 59 builddir := $(current)/rpm/builddir … … 41 61 arch := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "i386"; fi) 42 62 verfile := $(builddir)/version-generated.mk 63 ose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1)) 43 64 -include $(vboxroot)/SVN_REVISION 44 65 svnrev :=$(if $(svn_revision),$(svn_revision),0) 66 67 NOMODS ?= $(ose) 68 NOQT ?= $(HEADLESS) 69 NOWEBSVC ?= $(ose) 70 NOWINE := $(if $(NODOCS),$(if $(STAGEDISO),1,),)$(ose) 45 71 46 72 ifneq ($(MAKECMDGOALS),clean) … … 71 97 $(error failed to detect the .spec file (rpmrel=$(rpmrel))) 72 98 endif 73 74 include $(verfile) 75 $(verfile): rpm/configure-stamp 76 . rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) $(verfile) 77 endif 78 99 endif 100 101 ifneq ($(wildcard $(verfile)),) 102 include $(verfile) 79 103 ver := $(VBOX_VERSION_STRING) 80 rpmver :=$(ver)$(if $(NOSUBVER),,$(if $(svn_revision),_$(svn_revision),)$(VERSUFFIX)$(if $( DEBUG),_dbg,))$(if $(BLEEDING_EDGE),_$(BLEEDING_EDGE),)104 rpmver :=$(ver)$(if $(NOSUBVER),,$(if $(svn_revision),_$(svn_revision),)$(VERSUFFIX)$(if $(HEADLESS),_headless,)$(if $(DEBUG),_dbg,))$(if $(BLEEDING_EDGE),_$(BLEEDING_EDGE),) 81 105 archdir := $(current)/rpm/VirtualBox-$(ver) 82 106 rpmname := $(verpkg)-$(rpmver)_$(rpmrel) 107 endif 83 108 84 109 # Fedora13/14 is bleeding edge, the other jails have outdated kernel headers … … 104 129 endif 105 130 106 cfg_flags := $(if $(filter rhel4 sles10.1,$(rpmrel)),--build-libxml2,) \ 131 cfg_flags := $(if $(NOQT),--disable-qt,) \ 132 $(if $(filter rhel4 sles10.1,$(rpmrel)),--build-libxml2,) \ 107 133 $(if $(filter rhel4,$(rpmrel)),--build-libssl,) \ 108 134 $(if $(filter rhel4 rhel5 ol4 ol5 centos4 centos5 sles10.1,$(rpmrel)),--build-libcurl,) \ … … 111 137 $(if $(filter rhel4 rhel5 ol4 ol5 centos4 centos5,$(rpmrel)),--enable-pulse,) \ 112 138 $(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,) \ 113 141 $(if $(DEBUG),--build-debug,) \ 142 $(if $(NOWINE),,--setup-wine) \ 143 $(if $(NOWEBSVC),,--enable-webservice) \ 144 $(if $(VNC),--enable-vnc,) \ 114 145 --disable-extpack 115 146 … … 118 149 PATH_OUT=$(builddir) \ 119 150 VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \ 151 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \ 120 152 VBOX_DO_STRIP= \ 153 VBOX_DO_STRIP_MODULES= \ 121 154 VBOX_WITH_MULTIVERSION_PYTHON= \ 122 155 $(doc_dir) \ 123 VBOX_WITH_DOCS_CHM=1\156 $(if $(ose),,VBOX_WITH_DOCS_CHM=1) \ 124 157 VBOX_PACKAGE_DIST=$(rpmdist) \ 125 158 VBOX_SVN_REV=$(svnrev) \ … … 132 165 rpm/configure-stamp: 133 166 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 169 rpm/build-stamp $(verfile): rpm/configure-stamp 170 . rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all 139 171 $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,) 140 172 $(if $(NODOCS),cp $(vboxroot)/prebuild/VirtualBox*.chm $(builddir)/bin,) … … 181 213 rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec 182 214 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.init189 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.init194 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.init215 -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 199 231 cp debian/VBox.sh $(archdir) 200 232 mv rpm/VirtualBox-$(ver) rpm/$(rpmname)
Note:
See TracChangeset
for help on using the changeset viewer.