Changeset 90354 in vbox
- Timestamp:
- Jul 27, 2021 11:57:54 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
configure (modified) (5 diffs)
-
debian (modified) (1 prop)
-
debian/changelog (modified) (2 diffs)
-
debian/compat (modified) (1 diff)
-
debian/rules (modified) (14 diffs)
-
src/VBox/Installer/linux/debian (modified) (1 prop)
-
src/VBox/Installer/linux/debian/compat (modified) (1 diff)
-
src/VBox/Installer/linux/debian/rules (modified) (15 diffs)
-
src/VBox/Installer/linux/rpm/rules (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure
r90172 r90354 82 82 WITH_VMMRAW=1 83 83 WITH_LIBIDL=1 84 WITH_GSOAP=085 84 WITH_QT5=1 86 85 WITH_SDL=1 … … 2375 2374 [ $WITH_OPENGL -eq 1 ] && echo " --disable-opengl disable OpenGL support (2D & 3D)" 2376 2375 [ $WITH_QT5 -eq 0 ] && echo " --enable-qt5 enable Qt5 detection" 2377 [ $WITH_GSOAP -eq 0 ] && echo " --enable-webservice enable the webservice stuff"2378 2376 [ $OSE -eq 1 ] && echo " --enable-vnc enable the VNC server" 2379 2377 [ $OSE -eq 0 ] && echo " --disable-extpack don't build the extpack" … … 2410 2408 [ "$OS" = "linux" ] && echo " --with-linux=DIR Linux kernel source directory [$LINUX]" 2411 2409 [ $WITH_QT5 -eq 1 ] && echo " --with-qt-dir=DIR directory for Qt headers/libraries [pkgconfig]" 2412 [ $WITH_GSOAP -eq 1 ] && echo " --with-gsoap-dir=PATH directory for gSOAP compiler/headers/libraries"2413 [ $WITH_GSOAP -eq 1 ] && echo " (soapcpp2 and wsdl2h, soapstd2.h, libgsoap++.a/so)"2414 [ $WITH_GSOAP -eq 1 ] && echo " --with-gsoap-import=PATH directory for gSOAP import files (stlvector.h)"2415 2410 cat << EOF 2411 --with-gsoap-dir=PATH directory for gSOAP compiler/headers/libraries 2412 (soapcpp2 and wsdl2h, soapstd2.h, libgsoap++.a/so) 2413 --with-gsoap-import=PATH directory for gSOAP import files (stlvector.h) 2416 2414 --with-openssl-dir=DIR directory for OpenSSL headers/libraries 2417 2415 --with-ow-dir=DIR directory where Open Watcom can be found [$WATCOM] … … 2592 2590 ;; 2593 2591 --enable-webservice) 2594 [ $WITH_GSOAP -eq 0 ] && WITH_GSOAP=12595 2592 ;; 2596 2593 --enable-vnc) … … 2909 2906 [ -n "$SETUP_WINE" ] && setup_wine 2910 2907 2911 if [ $ONLY_ADDITIONS -eq 0 -a $WITH_GSOAP -eq 1]; then2908 if [ $ONLY_ADDITIONS -eq 0 ]; then 2912 2909 check_gsoap 2913 2910 else 2914 if [ $OSE -ge 1 ]; then 2915 cnf_append "VBOX_WITH_WEBSERVICES" "" 2916 fi 2911 cnf_append "VBOX_WITH_WEBSERVICES" "" 2917 2912 fi 2918 2913 -
trunk/debian
- Property svn:ignore deleted
-
trunk/debian/changelog
r83113 r90354 1 virtualbox-ose (6.1.97) unstable; urgency=low 2 3 * rebuild Debian package. 4 5 -- Oracle Corporation <info@virtualbox.org> Tue, 21 Jul 2021 12:00:00 +0200 6 1 7 virtualbox-ose (6.1.4) unstable; urgency=low 2 8 … … 11 17 -- Oracle Corporation <info@virtualbox.org> Tue, 14 Jan 2020 12:00:00 +0200 12 18 13 14 19 virtualbox-ose (6.1.0) unstable; urgency=low 15 20 -
trunk/debian/compat
r82441 r90354 1 5 1 9 -
trunk/debian/rules
r90118 r90354 18 18 19 19 #export DH_VERBOSE=1 20 export DH_COMPAT=521 20 22 21 # possible overrides: … … 28 27 # NOSUBVER=1 disable generation of the sub-version field (which is 29 28 # either the subversion rev [if available] or the build date) 30 # NODOCS=1 don't build docs, use precompiled UserManual .pdf and31 # maybe VirtualBox.qch and VirtualBox.qhc from $(vboxroot)/prebuild29 # NODOCS=1 don't build docs, use precompiled UserManual*.pdf and 30 # maybe UserManual*.qch and UserManual*.qhc from $(vboxroot)/prebuild 32 31 # NOMODS=1 don't build any module 33 32 # NOQT=1 don't build the Qt GUI … … 36 35 # HEADLESS=1 build the headless version 37 36 # VNC=1 build VNC code 38 # NOWEBSVC=1 don't build the webservice API , default for OSE37 # NOWEBSVC=1 don't build the webservice API 39 38 # STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso 40 # STAGEDQHELP=<path> use VirtualBox*.qch and VirtualBox*.qhc from this directory41 39 # PKGDIR=<path> where to store the final package(s) 42 # 43 # NODOCS will be set if UserManual*.pdf is placed in $(vboxroot)/prebuild. 40 # svn_revision=xxx do not depend on subversion being available, but use this 41 # hard-coded revision number instead 42 # 43 # NODOCS will be set if UserManual*.pdf, UserManual*.qch and UserManual*.qhc are 44 # placed in $(vboxroot)/prebuild. 44 45 # STAGEDISO will be set if VBoxGuestAdditions.iso is placed there. 45 # STAGEDQHELP will be set if VirtualBox*.qch and VirtualBox*.qhc is placed there. 46 # VirtualBox*.qch and VirtualBox*.qhc are used if they are provided, but never 47 # attempted to be built. 48 # 49 # Wine will not be required if either NODOCS or STAGEDISO are set. 46 # 47 # Wine will not be required if STAGEDISO is set. 50 48 51 49 package := virtualbox 52 50 verpkg := virtualbox-ose 53 current := $(shell pwd) 54 vboxroot := $(shell pwd) 55 pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd ..; pwd)) 56 bldbase := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot))/out/debian 51 vboxroot := $(shell while ! test -r configure && ! test "$$PWD" = "/"; do cd ..; done; pwd) 52 debroot := $(vboxroot) 53 instlin := $(vboxroot)/src/VBox/Installer/linux 54 pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd $(vboxroot)/..; pwd)) 55 outdir := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot))/out 56 bldbase := $(outdir)/debian 57 57 builddir := $(bldbase)/builddir 58 58 moddir := $(bldbase)/modules 59 prefix := $( current)/debian/$(verpkg)59 prefix := $(bldbase)/$(verpkg) 60 60 arch := $(shell dpkg --print-architecture) 61 61 verfile := $(builddir)/version-generated.mk … … 65 65 NOQT ?= $(HEADLESS) 66 66 NOSDL ?= $(HEADLESS) 67 NOWEBSVC ?= $(ose) 68 NODOCS ?= $(if $(wildcard $(vboxroot)/prebuild/UserManual*.pdf),1,) 67 NOWEBSVC ?= 68 EFI ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxEFI32.fd $(vboxroot)/prebuild/VBoxEFI64.fd),1,) 69 NODOCS ?= $(if $(wildcard $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual.qhc)),1,) 69 70 STAGEDISO ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxGuestAdditions.iso),$(vboxroot)/prebuild,) 70 STAGEDQHELP ?= $(if $(and $(wildcard $(vboxroot)/prebuild/VirtualBox*.qch),$(wildcard $(vboxroot)/prebuild/VirtualBox*.qhc)),$(vboxroot)/prebuild,) 71 NOWINE := $(if $(NODOCS),1,$(if $(STAGEDISO),1,$(ose))) 72 PYTHON := $(firstword $(shell which python) $(shell which python3)) 73 74 ifneq ($(wildcard $(verfile)),) 75 include $(verfile) 76 ver := $(VBOX_VERSION_STRING) 77 archdir := $(prefix)/opt/VirtualBox-$(ver) 78 endif 71 NOWINE := $(if $(STAGEDISO),1,$(ose)) 72 PYTHON := $(firstword $(shell which python3) $(shell which python)) 73 74 DEBPKGFILES := changelog compat control dirs postinst postrm preinst prerm rules templates 79 75 80 76 ifneq ($(STAGEDISO),) … … 84 80 endif 85 81 86 debrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown) 82 # Replicate debian package buildfiles to $(bldbase) 83 ifneq ($(shell pwd),$(outdir)) 84 cmd := $(filter-out all Makefile,$(MAKECMDGOALS)) 85 all: 86 mkdir -p $(bldbase) 87 ln -sf $(addprefix $(debroot)/debian/,$(DEBPKGFILES)) $(bldbase) 88 +$(MAKE) -C $(outdir) -f debian/rules $(cmd) 89 90 Makefile: 91 92 $(cmd): all 93 94 .PHONY: all $(MAKECMDGOALS) 95 96 else 97 ifneq ($(wildcard $(verfile)),) 98 include $(verfile) 99 ver := $(VBOX_VERSION_STRING) 100 archdir := $(prefix)/opt/VirtualBox-$(ver) 101 endif 87 102 88 103 cfg_flags := $(if $(NOQT),--disable-qt,) \ 89 $(if $(NOSDL),--disable-vboxsdl,) \ 90 $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \ 91 $(if $(HEADLESS),--build-headless,) \ 92 $(if $(DEBUG),--build-debug,) \ 93 $(if $(NOWINE),,--setup-wine) \ 94 $(if $(NOWEBSVC),,$(if $(ose),--enable-webservice,)) \ 95 $(if $(VNC),--enable-vnc,) \ 96 $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \ 97 --disable-extpack 98 99 bld_flags := AUTOCFG=$(current)/debian/AutoConfig.kmk \ 100 LOCALCFG=$(current)/debian/LocalConfig.kmk \ 101 PATH_OUT=$(builddir) \ 102 VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \ 103 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \ 104 VBOX_WITH_VMSVGA3D=1 \ 105 VBOX_DO_STRIP= \ 106 VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \ 107 $(if $(STAGEDQHELP),VBOX_WITH_DOCS_QHELP=1,) \ 108 $(if $(svnrev),VBOX_SVN_REV=$(svnrev),) \ 109 $(if $(NODOCS),VBOX_WITH_DOCS= ,) \ 110 $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \ 111 $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) 112 113 configure: debian/configure-stamp 114 debian/configure-stamp: 104 $(if $(NOSDL),--disable-vboxsdl,) \ 105 $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \ 106 $(if $(HEADLESS),--build-headless,) \ 107 $(if $(DEBUG),--build-debug,) \ 108 $(if $(NOWINE),,--setup-wine) \ 109 $(if $(VNC),--enable-vnc,) \ 110 $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \ 111 --disable-extpack 112 113 bld_flags := AUTOCFG=$(bldbase)/AutoConfig.kmk \ 114 LOCALCFG=$(debroot)/debian/LocalConfig.kmk \ 115 PATH_OUT=$(builddir) \ 116 VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \ 117 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \ 118 VBOX_WITH_VMSVGA3D=1 \ 119 VBOX_DO_STRIP= \ 120 VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \ 121 $(if $(svnrev),VBOX_SVN_REV=$(svnrev),) \ 122 $(if $(NODOCS),VBOX_WITH_DOCS= ,) \ 123 $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \ 124 $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) 125 126 configure: $(bldbase)/configure-stamp 127 $(bldbase)/configure-stamp: 115 128 dh_testdir 129 mkdir -p $(bldbase) 116 130 cd $(vboxroot) && ./configure --odir=$(bldbase) $(cfg_flags) 117 touch debian/configure-stamp118 119 build: debian/configure-stamp debian/build-stamp120 debian/build-stamp $(verfile): 131 touch $@ 132 133 build: $(bldbase)/configure-stamp $(bldbase)/build-stamp 134 $(bldbase)/build-stamp $(verfile): $(bldbase)/configure-stamp 121 135 dh_testdir 122 . debian/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all 123 $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,) 124 $(if $(STAGEDQHELP),cp $(STAGEDQHELP)/VirtualBox*.qch $(STAGEDQHELP)/VirtualBox*.qhc $(builddir)/bin,) 136 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all 137 # Files from prebuild go to (builddir)/bin to be used during the 138 # packing stage, overriding what the build did/would produce. 139 $(if $(NODOCS),cp $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual.qhc) $(builddir)/bin,) 125 140 $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,) 126 141 $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,) 127 142 mkdir -p $(builddir)/bin/additions 128 143 $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,) 129 . debian/env.sh && kmk -C $(vboxroot) $(bld_flags) \144 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) \ 130 145 VBOX_NO_LINUX_RUN_INSTALLER=1 \ 131 146 VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86.tar.bz2 \ … … 134 149 VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \ 135 150 packing 136 touch debian/build-stamp151 touch $(bldbase)/build-stamp 137 152 138 153 # Build modules for every kernel we find in /lib/modules/* 139 modules: debian/build-stamp debian/modules-stamp 140 debian/modules-stamp: debian/build-stamp 154 $(bldbase)/modules-stamp: $(bldbase)/build-stamp 141 155 rm -rf $(moddir) 142 156 mkdir $(moddir) … … 157 171 fi; \ 158 172 done 159 touch debian/modules-stamp173 touch $@ 160 174 161 175 clean: 162 176 dh_testdir 163 177 dh_testroot 164 rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh165 rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp166 rm -f debian/virtualbox-*.substvars debian/virtualbox*.debhelper167 rm -f debian/$(verpkg).mime168 rm -rf $(builddir) $(moddir)169 rm -rf debian/wine.*170 178 dh_clean 171 172 ifeq ($(VBOX_VERSION_MAJOR),) 173 binary binary-arch binary-indep: build $(verfile) 174 $(MAKE) -f debian/rules binary 175 else 179 rm -rf $(archdir) 180 rm -rf $(builddir) 181 rm -rf $(moddir) 182 rm -rf $(bldbase)/wine.* 183 rm -rf $(bldbase)/VirtualBox-* 184 rm -f $(bldbase)/VirtualBox.tar $(bldbase)/VirtualBox.tar.bz2 185 rm -f $(bldbase)/virtualbox-*.substvars $(bldbase)/virtualbox*.debhelper 186 rm -f $(bldbase)/$(verpkg).mime $(bldbase)/$(verpkg).sharedmimeinfo 187 rm -f $(bldbase)/modules-stamp $(bldbase)/build-stamp $(bldbase)/configure-stamp 188 rm -f $(bldbase)/AutoConfig.kmk $(bldbase)/configure.log $(bldbase)/env.sh 189 rm -f $(addprefix $(bldbase)/,$(DEBPKGFILES)) 190 if [ -d $(bldbase) ]; then rmdir $(bldbase); fi 191 192 ifeq ($(VBOX_VERSION_MAJOR),) 193 binary: build $(verfile) 194 +$(MAKE) -f debian/rules binary 195 196 else 176 197 # Build architecture-dependent files here. 177 binary binary-arch binary-indep: build $(if $(NOMODS),,modules)198 binary: build $(if $(NOMODS),,$(bldbase)/modules-stamp) 178 199 dh_testdir 179 200 dh_testroot 180 dh_ clean -k201 dh_prep 181 202 dh_installdirs 182 203 tar -xC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar … … 207 228 done) 208 229 $(if $(NOQT),,rmdir $(archdir)/icons) 209 $(if $(NOQT),,mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo)230 $(if $(NOQT),,mv $(archdir)/virtualbox.xml $(bldbase)/$(verpkg).sharedmimeinfo) 210 231 install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides 211 232 sed \ 212 233 -e 's|%VERPKG%|$(verpkg)|g' \ 213 debian/lintian-override.in > \234 $(vboxroot)/debian/lintian-override.in > \ 214 235 $(prefix)/usr/share/lintian/overrides/$(verpkg) 215 236 mv $(archdir)/VBox.png \ … … 217 238 mv $(archdir)/src $(prefix)/usr/share/$(package) 218 239 rm $(archdir)/VBox.sh 219 install -D -g 0 -o 0 -m 644 $( vboxroot)/src/VBox/Installer/linux/VBox.sh $(prefix)/usr/bin/VBox240 install -D -g 0 -o 0 -m 644 $(instlin)/VBox.sh $(prefix)/usr/bin/VBox 220 241 mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package) 221 242 if [ -r $(archdir)/VBoxDTrace ]; then \ … … 237 258 fi \ 238 259 done) 239 ifeq ($(ose),) 240 dh_installdocs \ 241 $(addprefix $(archdir)/,UserManual*.pdf VirtualBox*.qch VirtualBox*.qhc \ 242 LICENSE) 243 rm $(addprefix $(archdir)/,UserManual*.pdf VirtualBox*.qch VirtualBox*.qhc \ 244 LICENSE) 245 for i in rdesktop-vrdp.tar.gz additions/VBoxGuestAdditions.iso; do \ 246 mv $(archdir)/$$i $(prefix)/usr/share/$(package); done 260 dh_installdocs $(addprefix $(archdir)/,UserManual*.pdf LICENSE) 261 mv $(addprefix $(archdir)/,$(if $(HEADLESS),,rdesktop-vrdp.tar.gz) additions/VBoxGuestAdditions.iso) $(prefix)/usr/share/$(package) 247 262 $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp $(prefix)/usr/bin) 248 263 $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp-keymaps $(prefix)/usr/share/$(package)) 249 else250 dh_installdocs \251 $(archdir)/UserManual*.pdf252 rm $(addprefix $(archdir)/,UserManual*.pdf)253 for i in additions/VBoxGuestAdditions.iso; do \254 mv $(archdir)/$$i $(prefix)/usr/share/$(package); done255 endif256 264 mv $(archdir) $(prefix)/usr/lib/$(package) 257 265 if [ -f $(prefix)/usr/lib/$(package)/libQt5CoreVBox.so.5 ]; then \ … … 260 268 $(prefix)/usr/lib/$(package)/*.so.5 \ 261 269 $(prefix)/usr/lib/$(package)/plugins/platforms/*.so; \ 270 $(prefix)/usr/lib/$(package)/plugins/platformthemes/*.so; \ 271 $(prefix)/usr/lib/$(package)/plugins/sqldrivers/*.so; \ 272 $(prefix)/usr/lib/$(package)/plugins/styles/*.so; \ 262 273 $(prefix)/usr/lib/$(package)/plugins/xcbglintegrations/*.so; \ 263 274 echo "[Paths]" > $(prefix)/usr/lib/$(package)/qt.conf; \ … … 279 290 $(if $(NOSDL),,usr/bin/VBox usr/bin/VBoxSDL) \ 280 291 $(if $(NOSDL),,usr/bin/VBox usr/bin/vboxsdl) \ 281 $(if $(ose),,usr/bin/VBox usr/bin/VBoxVRDP) \282 292 usr/bin/VBox usr/bin/VBoxHeadless \ 283 293 usr/bin/VBox usr/bin/vboxheadless \ … … 298 308 dh_installmime 299 309 dh_link 300 ifeq ($(DEBUG),)310 ifeq ($(DEBUG),) 301 311 dh_strip --keep-debug \ 302 312 $(addprefix --exclude=lib,$(addsuffix VBox.so.5,\ 303 Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5OpenGL Qt5DBus Qt5XcbQpa Qt5X11Extras)) \ 304 --exclude=libqxcb.so --exclude=libqxcb-glx-integration.so 305 endif 306 mkdir -p $(current)/debian/$(verpkg)-dbg/usr/lib/$(package) 307 mv $(prefix)/usr/lib/$(package)/*.debug $(current)/debian/$(verpkg)-dbg/usr/lib/$(package) 308 ifeq ($(DEBUG),) 309 mv $(prefix)/usr/lib/debug $(current)/debian/$(verpkg)-dbg/usr/lib 310 endif 311 $(firstword $(shell which dh_python2) $(shell which dh_python3)) 312 dh_compress -X.pdf -X LICENSE -X.py 313 Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5OpenGL Qt5DBus Qt5XcbQpa Qt5X11Extras)) 314 endif 315 mkdir -p $(bldbase)/$(verpkg)-dbg/usr/lib/$(package) 316 mv $(prefix)/usr/lib/$(package)/*.debug $(bldbase)/$(verpkg)-dbg/usr/lib/$(package) 317 ifeq ($(DEBUG),) 318 mv $(prefix)/usr/lib/debug $(bldbase)/$(verpkg)-dbg/usr/lib 319 endif 320 $(firstword $(shell which dh_python3) $(shell which dh_python2)) 321 dh_compress -X.pdf -X.qch -X.qhc -X LICENSE -X.py 313 322 dh_fixperms 314 323 dh_makeshlibs … … 323 332 dh_md5sums 324 333 dh_builddeb --destdir $(pkgdir) -- -Zxz 334 endif 335 336 .PHONY: binary configure build clean 325 337 endif 326 327 .PHONY: binary modules binary-arch binary-indep clean checkroot -
trunk/src/VBox/Installer/linux/debian
- Property svn:ignore deleted
-
trunk/src/VBox/Installer/linux/debian/compat
r32008 r90354 1 5 1 9 -
trunk/src/VBox/Installer/linux/debian/rules
r90118 r90354 23 23 24 24 #export DH_VERBOSE=1 25 export DH_COMPAT=526 25 27 26 # possible overrides: … … 33 32 # NOSUBVER=1 disable generation of the sub-version field (which is 34 33 # either the subversion rev [if available] or the build date) 35 # NODOCS=1 don't build docs, use precompiled UserManual .pdf and36 # maybe VirtualBox.qch and VirtualBox.qhc from $(vboxroot)/prebuild34 # NODOCS=1 don't build docs, use precompiled UserManual*.pdf and 35 # maybe UserManual*.qch and UserManual*.qhc from $(vboxroot)/prebuild 37 36 # NOMODS=1 don't build any module 38 37 # NOQT=1 don't build the Qt GUI … … 42 41 # HEADLESS=1 build the headless version 43 42 # VNC=1 build VNC code 44 # NOWEBSVC=1 don't build the webservice API , default for OSE43 # NOWEBSVC=1 don't build the webservice API 45 44 # STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso 46 # STAGEDQHELP=<path> use VirtualBox*.qch and VirtualBox*.qhc from this directory47 45 # PKGDIR=<path> where to store the final package(s) 48 # 49 # NODOCS will be set if UserManual*.pdf is placed in $(vboxroot)/prebuild. 46 # svn_revision=xxx do not depend on subversion being available, but use this 47 # hard-coded revision number instead 48 # 49 # NODOCS will be set if UserManual*.pdf, UserManual*.qch and UserManual*.qhc are 50 # placed in $(vboxroot)/prebuild. 50 51 # STAGEDISO will be set if VBoxGuestAdditions.iso is placed there. 51 # STAGEDQHELP will be set if VirtualBox*.qch and VirtualBox*.qhc is placed there. 52 # VirtualBox*.qch and VirtualBox*.qhc are used if they are provided, but never 53 # attempted to be built. 54 # 55 # Wine will not be required if either NODOCS or STAGEDISO are set. 52 # 53 # Wine will not be required if STAGEDISO is set. 56 54 57 55 package := virtualbox 58 56 verpkg := virtualbox-6.1 59 current := $(shell pwd) 60 vboxroot := $(shell while ! test -r configure && ! test "$PWD" = "/"; do cd ..; done; pwd) 57 vboxroot := $(shell while ! test -r configure && ! test "$$PWD" = "/"; do cd ..; done; pwd) 58 debroot := $(vboxroot)/src/VBox/Installer/linux 59 instlin := $(vboxroot)/src/VBox/Installer/linux 61 60 pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd $(vboxroot)/..; pwd)) 62 bldbase := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot))/out/debian 61 outdir := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot))/out 62 bldbase := $(outdir)/debian 63 63 builddir := $(bldbase)/builddir 64 64 moddir := $(bldbase)/modules 65 prefix := $( current)/debian/$(verpkg)65 prefix := $(bldbase)/$(verpkg) 66 66 arch := $(shell dpkg --print-architecture) 67 67 verfile := $(builddir)/version-generated.mk … … 69 69 chrarch := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "x86"; fi) 70 70 -include $(vboxroot)/SVN_REVISION 71 svnrev := $(if $(svn_revision),$(svn_revision),)71 svnrev := $(if $(svn_revision),$(svn_revision),) 72 72 73 73 NOMODS ?= $(ose) 74 74 NOQT ?= $(HEADLESS) 75 75 NOSDL ?= $(HEADLESS) 76 NOWEBSVC ?= $(ose) 77 NODOCS ?= $(if $(wildcard $(vboxroot)/prebuild/UserManual*.pdf),1,) 76 NOWEBSVC ?= 77 EFI ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxEFI32.fd $(vboxroot)/prebuild/VBoxEFI64.fd),1,) 78 NODOCS ?= $(if $(wildcard $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual.qhc)),1,) 78 79 STAGEDISO ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxGuestAdditions.iso),$(vboxroot)/prebuild,) 79 STAGEDQHELP ?= $(if $(and $(wildcard $(vboxroot)/prebuild/VirtualBox*.qch),$(wildcard $(vboxroot)/prebuild/VirtualBox*.qhc)),$(vboxroot)/prebuild,) 80 NOWINE := $(if $(NODOCS),1,$(if $(STAGEDISO),1,$(ose))) 81 PYTHON := $(firstword $(shell which python) $(shell which python3)) 82 83 ifneq ($(wildcard $(verfile)),) 84 include $(verfile) 85 ver := $(VBOX_VERSION_STRING) 86 svnver := $(if $(NOSUBVER),,$(if $(svn_revision),-$(svn_revision),$(shell if \ 87 svn info > /dev/null 2>&1; then \ 88 svn info|sed -e "s/^Revision: \(.*\)/-\1/;t;d"; else \ 89 date +"-%Y%m%d"; fi))) 90 debver :=$(subst _ALPHA,~alpha,$(subst _BETA,~beta,$(subst _RC,~rc,$(subst _OSE,~ose,$(ver)))))$(svnver)$(VERSUFFIX)$(if $(HEADLESS),~headless,)$(if $(DEBUG),~dbg,) 91 archdir := $(prefix)/opt/VirtualBox-$(ver) 92 endif 80 NOWINE := $(if $(STAGEDISO),1,$(ose)) 81 PYTHON := $(firstword $(shell which python3) $(shell which python)) 82 83 DEBPKGFILES := changelog compat control dirs postinst postrm preinst prerm rules templates 93 84 94 85 ifneq ($(STAGEDISO),) … … 98 89 endif 99 90 100 debrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown) 91 # Replicate debian package buildfiles to $(bldbase) 92 ifneq ($(shell pwd),$(outdir)) 93 cmd := $(filter-out all Makefile,$(MAKECMDGOALS)) 94 all: 95 mkdir -p $(bldbase) 96 ln -sf $(addprefix $(debroot)/debian/,$(DEBPKGFILES)) $(bldbase) 97 +$(MAKE) -C $(outdir) -f debian/rules $(cmd) 98 99 Makefile: 100 101 $(cmd): all 102 103 .PHONY: all $(MAKECMDGOALS) 104 105 else 106 ifneq ($(wildcard $(verfile)),) 107 include $(verfile) 108 ver := $(VBOX_VERSION_STRING) 109 svnver := $(if $(NOSUBVER),,$(if $(svn_revision),-$(svn_revision),$(shell if \ 110 svn info $(vboxroot) > /dev/null 2>&1; then \ 111 svn info $(vboxroot)|sed -e "s/^Revision: \(.*\)/-\1/;t;d"; else \ 112 date +"-%Y%m%d"; fi))) 113 debver := $(subst _ALPHA,~alpha,$(subst _BETA,~beta,$(subst _RC,~rc,$(subst _OSE,~ose,$(ver)))))$(svnver)$(VERSUFFIX)$(if $(HEADLESS),~headless,)$(if $(DEBUG),~dbg,) 114 archdir := $(prefix)/opt/VirtualBox-$(ver) 115 endif 116 101 117 102 118 ifneq ($(MAKECMDGOALS),clean) 103 debdist := $(strip $(shell grep $(debrel) $(current)/distributions_deb | cut -d'=' -f2)) 119 debrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown) 120 debdist := $(strip $(shell grep $(debrel) $(debroot)/distributions_deb | cut -d'=' -f2)) 104 121 ifeq ($(debdist),) 105 122 debdist := $(if $(shell which lsb_release),_$(shell lsb_release -si | tr a-z A-Z)_$(shell lsb_release -sr | sed -e 's/\./_/g' -e 's/\([^_]*\)\(_[^_]*\).*/\1\2/'),unknown) … … 109 126 110 127 cfg_flags := $(if $(NOQT),--disable-qt,) \ 111 $(if $(NOSDL),--disable-vboxsdl,) \ 112 $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \ 113 $(if $(HEADLESS),--build-headless,) \ 114 $(if $(DEBUG),--build-debug,) \ 115 $(if $(NOWINE),,--setup-wine) \ 116 $(if $(NOWEBSVC),,$(if $(ose),--enable-webservice,)) \ 117 $(if $(VNC),--enable-vnc,) \ 118 $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \ 119 --disable-extpack 120 121 bld_flags := AUTOCFG=$(current)/debian/AutoConfig.kmk \ 122 LOCALCFG=$(current)/debian/LocalConfig.kmk \ 123 PATH_OUT=$(builddir) \ 124 VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \ 125 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \ 126 VBOX_WITH_VMSVGA3D=1 \ 127 VBOX_DO_STRIP= \ 128 VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \ 129 $(if $(STAGEDQHELP),VBOX_WITH_DOCS_QHELP=1,) \ 130 VBOX_PACKAGE_DIST=$(debdist) \ 131 $(if $(svnrev),VBOX_SVN_REV=$(svnrev),) \ 132 $(if $(NODOCS),VBOX_WITH_DOCS= ,) \ 133 $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \ 134 $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) 135 136 configure: debian/configure-stamp 137 debian/configure-stamp: 128 $(if $(NOSDL),--disable-vboxsdl,) \ 129 $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \ 130 $(if $(HEADLESS),--build-headless,) \ 131 $(if $(DEBUG),--build-debug,) \ 132 $(if $(NOWINE),,--setup-wine) \ 133 $(if $(VNC),--enable-vnc,) \ 134 $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \ 135 --disable-extpack 136 137 bld_flags := AUTOCFG=$(bldbase)/AutoConfig.kmk \ 138 LOCALCFG=$(debroot)/debian/LocalConfig.kmk \ 139 PATH_OUT=$(builddir) \ 140 VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \ 141 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \ 142 VBOX_WITH_VMSVGA3D=1 \ 143 VBOX_DO_STRIP= \ 144 VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \ 145 VBOX_PACKAGE_DIST=$(debdist) \ 146 $(if $(svnrev),VBOX_SVN_REV=$(svnrev),) \ 147 $(if $(NODOCS),VBOX_WITH_DOCS= ,) \ 148 $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \ 149 $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) 150 151 configure: $(bldbase)/configure-stamp 152 $(bldbase)/configure-stamp: 138 153 dh_testdir 154 mkdir -p $(bldbase) 139 155 cd $(vboxroot) && ./configure --odir=$(bldbase) $(cfg_flags) 140 touch debian/configure-stamp141 142 build: debian/configure-stamp debian/build-stamp143 debian/build-stamp $(verfile): 156 touch $@ 157 158 build: $(bldbase)/configure-stamp $(bldbase)/build-stamp 159 $(bldbase)/build-stamp $(verfile): $(bldbase)/configure-stamp 144 160 dh_testdir 145 . debian/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all 146 $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,) 147 $(if $(STAGEDQHELP),cp $(STAGEDQHELP)/VirtualBox*.qch $(STAGEDQHELP)/VirtualBox*.qhc $(builddir)/bin,) 161 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all 162 # Files from prebuild go to (builddir)/bin to be used during the 163 # packing stage, overriding what the build did/would produce. 164 $(if $(NODOCS),cp $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual.qhc) $(builddir)/bin,) 148 165 $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,) 149 166 $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,) 150 167 mkdir -p $(builddir)/bin/additions 151 168 $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,) 152 . debian/env.sh && kmk -C $(vboxroot) $(bld_flags) \169 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) \ 153 170 VBOX_NO_LINUX_RUN_INSTALLER=1 \ 154 171 VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86.tar.bz2 \ … … 157 174 VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \ 158 175 packing 159 touch debian/build-stamp176 touch $(bldbase)/build-stamp 160 177 161 178 # Build modules for every kernel we find in /lib/modules/* 162 modules: debian/build-stamp debian/modules-stamp 163 debian/modules-stamp: debian/build-stamp 179 $(bldbase)/modules-stamp: $(bldbase)/build-stamp 164 180 rm -rf $(moddir) 165 181 mkdir $(moddir) … … 180 196 fi; \ 181 197 done 182 touch debian/modules-stamp198 touch $@ 183 199 184 200 clean: 185 201 dh_testdir 186 202 dh_testroot 187 rm -f debian/changelog188 rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh189 rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp190 rm -f debian/virtualbox-*.substvars debian/virtualbox*.debhelper191 rm -f debian/$(verpkg).mime192 rm -rf $(builddir) $(moddir)193 rm -rf debian/wine.*194 203 dh_clean 195 196 ifeq ($(VBOX_VERSION_MAJOR),) 197 binary binary-arch binary-indep: build $(verfile) 198 $(MAKE) -f debian/rules binary 199 else 204 rm -rf $(archdir) 205 rm -rf $(builddir) 206 rm -rf $(moddir) 207 rm -rf $(bldbase)/wine.* 208 rm -rf $(bldbase)/VirtualBox-* 209 rm -f $(bldbase)/VirtualBox.tar $(bldbase)/VirtualBox.tar.bz2 210 rm -f $(bldbase)/virtualbox-*.substvars $(bldbase)/virtualbox*.debhelper 211 rm -f $(bldbase)/$(verpkg).mime $(bldbase)/$(verpkg).sharedmimeinfo 212 rm -f $(bldbase)/modules-stamp $(bldbase)/build-stamp $(bldbase)/configure-stamp 213 rm -f $(bldbase)/AutoConfig.kmk $(bldbase)/configure.log $(bldbase)/env.sh 214 rm -f $(addprefix $(bldbase)/,$(DEBPKGFILES)) 215 if [ -d $(bldbase) ]; then rmdir $(bldbase); fi 216 217 ifeq ($(VBOX_VERSION_MAJOR),) 218 binary: build $(verfile) 219 +$(MAKE) -f debian/rules binary 220 221 else 200 222 # Build architecture-dependent files here. 201 binary binary-arch binary-indep: build $(if $(NOMODS),,modules)223 binary: build $(if $(NOMODS),,$(bldbase)/modules-stamp) 202 224 dh_testdir 203 225 dh_testroot 204 dh_ clean -k226 dh_prep 205 227 dh_installdirs 206 228 tar -xC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar … … 231 253 done) 232 254 $(if $(NOQT),,rmdir $(archdir)/icons) 233 $(if $(NOQT),,mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo)255 $(if $(NOQT),,mv $(archdir)/virtualbox.xml $(bldbase)/$(verpkg).sharedmimeinfo) 234 256 install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides 235 257 sed \ 236 258 -e 's|%VERPKG%|$(verpkg)|g' \ 237 debian/lintian-override.in > \259 $(vboxroot)/debian/lintian-override.in > \ 238 260 $(prefix)/usr/share/lintian/overrides/$(verpkg) 239 261 mv $(archdir)/VBox.png \ … … 241 263 mv $(archdir)/src $(prefix)/usr/share/$(package) 242 264 rm $(archdir)/VBox.sh 243 install -D -g 0 -o 0 -m 644 $( vboxroot)/src/VBox/Installer/linux/VBox.sh $(prefix)/usr/bin/VBox265 install -D -g 0 -o 0 -m 644 $(instlin)/VBox.sh $(prefix)/usr/bin/VBox 244 266 mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package) 245 267 if [ -r $(archdir)/VBoxDTrace ]; then \ … … 261 283 fi \ 262 284 done) 263 ifeq ($(ose),) 264 dh_installdocs \ 265 $(addprefix $(archdir)/,UserManual*.pdf VirtualBox*.qch VirtualBox*.qhc \ 266 LICENSE) 267 rm $(addprefix $(archdir)/,UserManual*.pdf VirtualBox*.qch VirtualBox*.qhc \ 268 LICENSE) 269 for i in rdesktop-vrdp.tar.gz additions/VBoxGuestAdditions.iso; do \ 270 mv $(archdir)/$$i $(prefix)/usr/share/$(package); done 285 dh_installdocs $(addprefix $(archdir)/,UserManual*.pdf LICENSE) 286 mv $(addprefix $(archdir)/,$(if $(HEADLESS),,rdesktop-vrdp.tar.gz) additions/VBoxGuestAdditions.iso) $(prefix)/usr/share/$(package) 271 287 $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp $(prefix)/usr/bin) 272 288 $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp-keymaps $(prefix)/usr/share/$(package)) 273 else274 dh_installdocs \275 $(archdir)/UserManual*.pdf276 rm $(addprefix $(archdir)/,UserManual*.pdf)277 for i in additions/VBoxGuestAdditions.iso; do \278 mv $(archdir)/$$i $(prefix)/usr/share/$(package); done279 endif280 289 mv $(archdir) $(prefix)/usr/lib/$(package) 281 290 if [ -f $(prefix)/usr/lib/$(package)/libQt5CoreVBox.so.5 ]; then \ … … 306 315 $(if $(NOSDL),,usr/bin/VBox usr/bin/VBoxSDL) \ 307 316 $(if $(NOSDL),,usr/bin/VBox usr/bin/vboxsdl) \ 308 $(if $(ose),,usr/bin/VBox usr/bin/VBoxVRDP) \309 317 usr/bin/VBox usr/bin/VBoxHeadless \ 310 318 usr/bin/VBox usr/bin/vboxheadless \ … … 320 328 usr/share/virtualbox/src/vboxhost usr/src/vboxhost-$(ver) 321 329 $(if $(NOMODS),,dh_installmodules) 330 rm -f $(bldbase)/changelog 322 331 sed -e 's|%VER%|$(debver)|g' \ 323 332 -e 's|%DATE%|$(shell date -R)|g' \ 324 333 -e 's|%DEBREL%|$(subst _,~,$(debrel))|g' \ 325 334 -e 's|%VERPKG%|$(verpkg)|g' \ 326 debian/changelog.in > debian/changelog335 $(debroot)/debian/changelog.in > $(bldbase)/changelog 327 336 dh_installdebconf 328 337 dh_installchangelogs … … 330 339 dh_installmime 331 340 dh_link 332 ifeq ($(DEBUG),)341 ifeq ($(DEBUG),) 333 342 dh_strip --keep-debug \ 334 343 $(addprefix --exclude=lib,$(addsuffix VBox.so.5,\ 335 Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5OpenGL Qt5DBus Qt5XcbQpa Qt5X11Extras)) \ 336 --exclude=libqxcb.so --exclude=libqsqlite.so --exclude=libqxcb-glx-integration.so 337 endif 338 mkdir -p $(current)/debian/$(verpkg)-dbg/usr/lib/$(package) 339 mv $(prefix)/usr/lib/$(package)/*.debug $(current)/debian/$(verpkg)-dbg/usr/lib/$(package) 340 ifeq ($(DEBUG),) 341 mv $(prefix)/usr/lib/debug $(current)/debian/$(verpkg)-dbg/usr/lib 342 endif 343 $(firstword $(shell which dh_python2) $(shell which dh_python3)) 344 dh_compress -X.pdf -X LICENSE -X.py 344 Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5OpenGL Qt5DBus Qt5XcbQpa Qt5X11Extras)) 345 endif 346 mkdir -p $(bldbase)/$(verpkg)-dbg/usr/lib/$(package) 347 mv $(prefix)/usr/lib/$(package)/*.debug $(bldbase)/$(verpkg)-dbg/usr/lib/$(package) 348 ifeq ($(DEBUG),) 349 mv $(prefix)/usr/lib/debug $(bldbase)/$(verpkg)-dbg/usr/lib 350 endif 351 $(firstword $(shell which dh_python3) $(shell which dh_python2)) 352 dh_compress -X.pdf -X.qch -X.qhc -X LICENSE -X.py 345 353 dh_fixperms 346 354 dh_makeshlibs … … 355 363 dh_md5sums 356 364 dh_builddeb --destdir $(pkgdir) -- -Zxz 365 endif 366 367 .PHONY: binary configure build clean 357 368 endif 358 359 .PHONY: binary modules binary-arch binary-indep clean checkroot -
trunk/src/VBox/Installer/linux/rpm/rules
r90118 r90354 25 25 # NOSUBVER=1 disable generation of the sub-version field (which is 26 26 # either the subversion rev [if available] or the build date) 27 # NODOCS=1 don't build docs, use precompiled UserManual .pdf and28 # maybe VirtualBox.qch and VirtualBox.qhc from $(vboxroot)/prebuild27 # NODOCS=1 don't build docs, use precompiled UserManual*.pdf and 28 # maybe UserManual*.qch and UserManual*.qhc from $(vboxroot)/prebuild 29 29 # NOMODS=1 don't build any module 30 30 # NOQT=1 don't build the Qt GUI … … 34 34 # HEADLESS=1 build the headless version 35 35 # VNC=1 build VNC code 36 # NOWEBSVC=1 don't build the webservice API , default for OSE36 # NOWEBSVC=1 don't build the webservice API 37 37 # STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso 38 # STAGEDQHELP=<path> use VirtualBox*.qch and VirtualBox*.qhc from this directory39 38 # PKGDIR=<path> where to store the final package(s) 40 39 # svn_revision=xxx do not depend on subversion being available, but use this 41 40 # hard-coded revision number instead 42 41 # 43 # NODOCS will be set if UserManual*.pdf is placed in $(vboxroot)/prebuild. 42 # NODOCS will be set if UserManual*.pdf, UserManual*.qch and UserManual*.qhc are 43 # placed in $(vboxroot)/prebuild. 44 44 # STAGEDISO will be set if VBoxGuestAdditions.iso is placed there. 45 # STAGEDQHELP will be set if VirtualBox*.qch and VirtualBox*.qhc is placed there. 46 # VirtualBox*.qch and VirtualBox*.qhc are used if they are provided, but never 47 # attempted to be built. 48 # 49 # Wine will not be required if either NODOCS or STAGEDISO are set. 50 51 ifeq ($(wildcard rpm/rules),) 52 $(error call rpm/rules from src/VBox/Installer/linux) 53 endif 45 # 46 # Wine will not be required if STAGEDISO is set. 54 47 55 48 verpkg := VirtualBox-6.1 56 current := $(shellpwd)57 vboxroot := $(shell while ! test -r configure && ! test "$PWD" = "/"; do cd ..; done; pwd) 49 vboxroot := $(shell while ! test -r configure && ! test "$$PWD" = "/"; do cd ..; done; pwd) 50 instlin := $(vboxroot)/src/VBox/Installer/linux 58 51 pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd $(vboxroot)/..; pwd)) 59 bldbase := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot))/out/rpm 52 outdir := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot))/out 53 bldbase := $(outdir)/rpm 60 54 builddir := $(bldbase)/builddir 61 55 stagedir := $(bldbase)/rpmbuild 62 56 rpmlib := $(shell if [ `uname -m` = "x86_64" ]; then echo "lib64"; else echo "lib"; fi) 63 chrarch := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "x86"; fi)64 57 verfile := $(builddir)/version-generated.mk 65 58 ose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1)) 59 chrarch := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "x86"; fi) 66 60 -include $(vboxroot)/SVN_REVISION 67 svnrev := $(if $(svn_revision),$(svn_revision),)61 svnrev := $(if $(svn_revision),$(svn_revision),) 68 62 69 63 NOMODS ?= $(ose) 70 64 NOQT ?= $(HEADLESS) 71 NOWEBSVC ?= $(ose) 72 NODOCS ?= $(if $(wildcard $(vboxroot)/prebuild/UserManual*.pdf),1,) 65 NOSDL ?= $(HEADLESS) 66 NOWEBSVC ?= 67 EFI ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxEFI32.fd $(vboxroot)/prebuild/VBoxEFI64.fd),1,) 68 NODOCS ?= $(if $(wildcard $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual.qhc)),1,) 73 69 STAGEDISO ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxGuestAdditions.iso),$(vboxroot)/prebuild,) 74 STAGEDQHELP ?= $(if $(and $(wildcard $(vboxroot)/prebuild/VirtualBox*.qch),$(wildcard $(vboxroot)/prebuild/VirtualBox*.qhc)),$(vboxroot)/prebuild,) 75 NOWINE := $(if $(NODOCS),1,$(if $(STAGEDISO),1,$(ose))) 70 NOWINE := $(if $(STAGEDISO),1,$(ose)) 71 72 ifneq ($(STAGEDISO),) 73 ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),) 74 $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found) 75 endif 76 endif 77 78 ifeq ($(wildcard rpm/rules),) 79 $(error call rpm/rules from src/VBox/Installer/linux) 80 endif 76 81 77 82 ifneq ($(MAKECMDGOALS),clean) … … 106 111 endif 107 112 108 rpmdist := $(strip $(shell grep $(rpmrel) $( current)/distributions_rpm | cut -d'=' -f2))113 rpmdist := $(strip $(shell grep $(rpmrel) $(instlin)/distributions_rpm | cut -d'=' -f2)) 109 114 ifeq ($(rpmdist),) 110 115 $(error Cannot detect package distribution (rpmrel=$(rpmrel))) … … 120 125 $(error failed to detect the .spec file (rpmrel=$(rpmrel))) 121 126 endif 122 123 # contrary to debian we need the verfile earlier to get the correct rpmname into the bld_flags 124 include $(verfile) 125 $(verfile): $(bldbase)/configure-stamp 126 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(verfile) $(bld_flags) 127 128 endif 129 127 endif 128 129 ifneq ($(wildcard $(verfile)),) 130 include $(verfile) 130 131 ver := $(VBOX_VERSION_STRING) 131 rpmver :=$(ver)$(if $(NOSUBVER),,$(if $(svn_revision),_$(svn_revision),)$(VERSUFFIX)$(if $(HEADLESS),_headless,)$(if $(DEBUG),_dbg,)) 132 svnver := $(if $(NOSUBVER),,$(if $(svn_revision),-$(svn_revision),$(shell if \ 133 svn info $(vboxroot) > /dev/null 2>&1; then \ 134 svn info $(vboxroot)|sed -e "s/^Revision: \(.*\)/-\1/;t;d"; else \ 135 date +"-%Y%m%d"; fi))) 136 rpmver := $(ver)$(subst -,_,$(svnver))$(VERSUFFIX)$(if $(HEADLESS),_headless,)$(if $(DEBUG),_dbg,) 132 137 archdir := $(bldbase)/VirtualBox-$(ver) 133 138 rpmname := $(verpkg)-$(rpmver)_$(rpmrel) 139 endif 134 140 135 141 # never ship any modules 136 142 instmod := 137 138 ifneq ($(STAGEDISO),)139 ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)140 $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)141 endif142 endif143 143 144 144 ifeq ($(wildcard /usr/share/doc/packages/bash),) … … 157 157 # EL5 ships Python 2.4 while our Python support requires Python 2.6 or later 158 158 cfg_flags := $(if $(NOQT),--disable-qt,) \ 159 $(if $(NOSDL),--disable-vboxsdl,) \ 160 $(if $(filter el5 el6,$(rpmrel)),--build-libvpx,) \ 161 $(if $(filter el5 el6,$(rpmrel)),--build-libopus,) \ 162 $(if $(filter el5 el6,$(rpmrel)),--build-libssl,) \ 163 $(if $(filter el5,$(rpmrel)),--build-libcurl,) \ 164 $(if $(filter el5,$(rpmrel)),--disable-sdl-ttf,) \ 165 $(if $(filter el5,$(rpmrel)),--disable-pulse,) \ 166 $(if $(filter el5,$(rpmrel)),--disable-python,) \ 167 $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \ 168 $(if $(HEADLESS),--build-headless,) \ 169 $(if $(DEBUG),--build-debug,) \ 170 $(if $(NOWINE),,--setup-wine) \ 171 $(if $(NOWEBSVC),,$(if $(ose),--enable-webservice,)) \ 172 $(if $(VNC),--enable-vnc,) \ 173 $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \ 174 --disable-extpack 159 $(if $(NOSDL),--disable-vboxsdl,) \ 160 $(if $(filter el5 el6,$(rpmrel)),--build-libvpx,) \ 161 $(if $(filter el5 el6,$(rpmrel)),--build-libopus,) \ 162 $(if $(filter el5 el6,$(rpmrel)),--build-libssl,) \ 163 $(if $(filter el5,$(rpmrel)),--build-libcurl,) \ 164 $(if $(filter el5,$(rpmrel)),--disable-sdl-ttf,) \ 165 $(if $(filter el5,$(rpmrel)),--disable-pulse,) \ 166 $(if $(filter el5,$(rpmrel)),--disable-python,) \ 167 $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \ 168 $(if $(HEADLESS),--build-headless,) \ 169 $(if $(DEBUG),--build-debug,) \ 170 $(if $(NOWINE),,--setup-wine) \ 171 $(if $(VNC),--enable-vnc,) \ 172 $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \ 173 --disable-extpack 175 174 176 175 bld_flags := AUTOCFG=$(bldbase)/AutoConfig.kmk \ 177 LOCALCFG=$(current)/rpm/LocalConfig.kmk \ 178 PATH_OUT=$(builddir) \ 179 VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \ 180 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \ 181 $(if $(filter el5 el6,$(rpmrel)),,VBOX_WITH_VMSVGA3D=1) \ 182 VBOX_DO_STRIP= \ 183 $(if $(filter el5,$(rpmrel)),VBOX_BLD_PYTHON=$(strip \ 184 $(firstword $(wildcard /usr/local/bin/python2.7) $(wildcard /usr/bin/python2.7) \ 185 $(wildcard /usr/bin/python2.6) $(wildcard /usr/bin/python2) $(wildcard /usr/bin/python))),) \ 186 $(doc_dir) \ 187 $(if $(STAGEDQHELP),VBOX_WITH_DOCS_QHELP=1,) \ 188 VBOX_PACKAGE_DIST=$(rpmdist) \ 189 $(if $(svnrev),VBOX_SVN_REV=$(svnrev),) \ 190 $(if $(NODOCS),VBOX_WITH_DOCS= ,) \ 191 $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \ 192 $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) \ 193 $(if $(filter el5,$(rpmrel)),,VBOX_WITH_SYSFS_BY_DEFAULT=1) 194 176 LOCALCFG=$(instlin)/rpm/LocalConfig.kmk \ 177 PATH_OUT=$(builddir) \ 178 VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \ 179 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \ 180 $(if $(filter el5 el6,$(rpmrel)),,VBOX_WITH_VMSVGA3D=1) \ 181 VBOX_DO_STRIP= \ 182 $(if $(filter el5,$(rpmrel)),VBOX_BLD_PYTHON=$(firstword $(wildcard \ 183 /usr/local/bin/python2.7 /usr/bin/python2.7 /usr/bin/python2.6 /usr/bin/python2 /usr/bin/python)),) \ 184 $(if $(filter el5,$(rpmrel)),,VBOX_WITH_SYSFS_BY_DEFAULT=1) \ 185 $(doc_dir) \ 186 VBOX_PACKAGE_DIST=$(rpmdist) \ 187 $(if $(svnrev),VBOX_SVN_REV=$(svnrev),) \ 188 $(if $(NODOCS),VBOX_WITH_DOCS= ,) \ 189 $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \ 190 $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) 191 192 configure: $(bldbase)/configure-stamp 195 193 $(bldbase)/configure-stamp: 196 194 mkdir -p $(bldbase) … … 198 196 touch $@ 199 197 200 $(bldbase)/build-stamp: $(bldbase)/configure-stamp 198 build: $(bldbase)/configure-stamp $(bldbase)/build-stamp 199 $(bldbase)/build-stamp $(verfile): $(bldbase)/configure-stamp 201 200 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all 202 $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,) 203 $(if $(STAGEDQHELP),cp $(STAGEDQHELP)/VirtualBox*.qch $(STAGEDQHELP)/VirtualBox*.qhc $(builddir)/bin,) 201 # Files from prebuild go to (builddir)/bin to be used during the 202 # packing stage, overriding what the build did/would produce. 203 $(if $(NODOCS),cp $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual.qhc) $(builddir)/bin,) 204 204 $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,) 205 205 $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,) … … 213 213 VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \ 214 214 packing 215 touch $ @215 touch $(bldbase)/build-stamp 216 216 217 217 clean: … … 219 219 rm -rf $(stagedir) 220 220 rm -rf $(builddir) 221 rm -rf $(bldbase)/wine.* 221 222 rm -rf $(bldbase)/VirtualBox-* 222 223 rm -f $(bldbase)/VirtualBox.tar $(bldbase)/VirtualBox.tar.bz2 224 rm -f $(bldbase)/build-stamp $(bldbase)/configure-stamp 225 rm -f $(bldbase)/AutoConfig.kmk $(bldbase)/configure.log $(bldbase)/env.sh 223 226 rm -f $(bldbase)/VirtualBox.spec 224 rm -f $(bldbase)/build-stamp $(bldbase)/configure-stamp $(bldbase)/configure.log225 rm -f $(bldbase)/AutoConfig.kmk $(bldbase)/env.sh226 227 if [ -d $(bldbase) ]; then rmdir $(bldbase); fi 227 228 228 229 ifeq ($(VBOX_VERSION_MAJOR),) 229 binary: $(bldbase)/build-stamp $(verfile) 230 $(MAKE) -f rpm/rules binary 230 binary: build $(verfile) 231 +$(MAKE) -f rpm/rules binary 232 231 233 else 232 binary: $(bldbase)/build-stamp234 binary: build 233 235 rm -rf $(bldbase)/VirtualBox-* 234 236 tar -xf $(builddir)/bin/VirtualBox.tar -C $(bldbase) … … 248 250 -e 's|%INITSCRIPTS%|$(if $(filter fedora,$(rpmspec)),initscripts,)|g' \ 249 251 -e 's|%NETTOOLS%|$(if $(filter fedora18 fedora19 fedora20 fedora21 el5 openSUSE110 openSUSE111 openSUSE112 openSUSE113 openSUSE114,$(rpmrel)),net-tools,iproute)|g' \ 250 $( current)/rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec252 $(instlin)/rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec 251 253 mv $(bldbase)/VirtualBox-$(ver) $(bldbase)/$(rpmname) 252 254 cp ../../../../tools/linux.$(chrarch)/bin/chrpath $(bldbase)/$(rpmname) || true … … 263 265 endif 264 266 265 .PHONY: binary c lean267 .PHONY: binary configure build clean
Note:
See TracChangeset
for help on using the changeset viewer.

