Changeset 84974 in vbox for trunk/src/VBox/Installer/linux/rpm/rules
- Timestamp:
- Jun 26, 2020 3:38:55 PM (5 years ago)
- Location:
- trunk/src/VBox/Installer/linux/rpm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/rpm
- Property svn:ignore deleted
-
trunk/src/VBox/Installer/linux/rpm/rules
r84960 r84974 56 56 vboxroot := $(shell while ! test -r configure && ! test "$PWD" = "/"; do cd ..; done; pwd) 57 57 pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd $(vboxroot)/..; pwd)) 58 builddir := $(vboxroot)/out/rpm/builddir 59 stagedir := $(vboxroot)/src/VBox/Installer/linux/rpmbuild 58 bldbase := $(vboxroot)/out/rpm 59 builddir := $(bldbase)/builddir 60 stagedir := $(bldbase)/rpmbuild 60 61 rpmlib := $(shell if [ `uname -m` = "x86_64" ]; then echo "lib64"; else echo "lib"; fi) 61 62 chrarch := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "x86"; fi) … … 121 122 # contrary to debian we need the verfile earlier to get the correct rpmname into the bld_flags 122 123 include $(verfile) 123 $(verfile): rpm/configure-stamp124 . rpm/env.sh && kmk -C $(vboxroot) $(verfile) $(bld_flags)124 $(verfile): $(bldbase)/configure-stamp 125 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(verfile) $(bld_flags) 125 126 126 127 endif … … 128 129 ver := $(VBOX_VERSION_STRING) 129 130 rpmver :=$(ver)$(if $(NOSUBVER),,$(if $(svn_revision),_$(svn_revision),)$(VERSUFFIX)$(if $(HEADLESS),_headless,)$(if $(DEBUG),_dbg,)) 130 archdir := $( current)/rpm/VirtualBox-$(ver)131 archdir := $(bldbase)/VirtualBox-$(ver) 131 132 rpmname := $(verpkg)-$(rpmver)_$(rpmrel) 132 133 … … 165 166 --disable-extpack 166 167 167 bld_flags := AUTOCFG=$( current)/rpm/AutoConfig.kmk \168 bld_flags := AUTOCFG=$(bldbase)/AutoConfig.kmk \ 168 169 LOCALCFG=$(current)/rpm/LocalConfig.kmk \ 169 170 PATH_OUT=$(builddir) \ … … 184 185 $(if $(filter el5,$(rpmrel)),,VBOX_WITH_SYSFS_BY_DEFAULT=1) 185 186 186 rpm/configure-stamp: 187 cd $(vboxroot) && ./configure --odir=$(current)/rpm $(cfg_flags) 188 touch rpm/configure-stamp 189 190 rpm/build-stamp: rpm/configure-stamp 191 . rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all 187 $(bldbase)/configure-stamp: 188 mkdir -p $(bldbase) 189 cd $(vboxroot) && ./configure --odir=$(bldbase) $(cfg_flags) 190 touch $@ 191 192 $(bldbase)/build-stamp: $(bldbase)/configure-stamp 193 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all 192 194 $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,) 193 195 $(if $(STAGEDCHM),cp $(STAGEDCHM)/VirtualBox*.chm $(builddir)/bin,) … … 196 198 mkdir -p $(builddir)/bin/additions 197 199 $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,) 198 . rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) \200 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) \ 199 201 VBOX_NO_LINUX_RUN_INSTALLER=1 \ 200 202 VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86.tar.bz2 \ … … 203 205 VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \ 204 206 packing 205 touch rpm/build-stamp207 touch $@ 206 208 207 209 clean: … … 209 211 rm -rf $(stagedir) 210 212 rm -rf $(builddir) 211 rm -rf $( vboxroot)/rpm212 rm - rf rpm/VirtualBox-*213 rm -f rpm/VirtualBox.tar rpm/VirtualBox.tar.bz2214 rm -f rpm/VirtualBox.spec215 rm -f rpm/build-stamp rpm/configure-stamp rpm/configure.log216 rm -f rpm/AutoConfig.kmk rpm/env.sh213 rm -rf $(bldbase)/VirtualBox-* 214 rm -f $(bldbase)/VirtualBox.tar $(bldbase)/VirtualBox.tar.bz2 215 rm -f $(bldbase)/VirtualBox.spec 216 rm -f $(bldbase)/build-stamp $(bldbase)/configure-stamp $(bldbase)/configure.log 217 rm -f $(bldbase)/AutoConfig.kmk $(bldbase)/env.sh 218 if [ -d $(bldbase) ]; then rmdir $(bldbase); fi 217 219 218 220 ifeq ($(VBOX_VERSION_MAJOR),) 219 binary: rpm/build-stamp $(verfile)221 binary: $(bldbase)/build-stamp $(verfile) 220 222 $(MAKE) -f rpm/rules binary 221 223 else 222 binary: rpm/build-stamp223 rm -rf rpm/VirtualBox-*224 tar -xf $(builddir)/bin/VirtualBox.tar -C rpm224 binary: $(bldbase)/build-stamp 225 rm -rf $(bldbase)/VirtualBox-* 226 tar -xf $(builddir)/bin/VirtualBox.tar -C $(bldbase) 225 227 sed \ 226 228 -e 's|%VER%|$(ver)|g' \ … … 228 230 -e 's|%BUILDVER%|$(rpmver)|g' \ 229 231 -e 's|%BUILDREL%|$(rpmrel)|g' \ 230 -e 's|%BUILDROOT%|$(current)/rpm/buildroot|g' \ 231 -e 's|%LIB%|$(rpmlib)|g' \ 232 -e 's|%BUILDROOT%|$(bldbase)/buildroot|g' \ 232 233 -e 's|%OSE%|$(if $(ose),is_ose,not_ose)|g' \ 233 234 -e 's|%SPEC%|$(rpmspec)|g' \ 234 -e 's|%PYTHON%|$(if $(filter el5,$(rpmrel)),,with_python)|g' \ 235 -e 's|%CHM%|$(if $(STAGEDCHM),with_chm,without_chm)|g' \ 236 -e 's|%PYTHON%|$(if $(filter el5,$(rpmrel)),without_python,with_python)|g' \ 235 237 -e 's|%MACROSPYTHON%|$(if $(wildcard /usr/lib/rpm/macros.d/macros.python3),,$(if $(wildcard /usr/lib/rpm/macros.python),%include /usr/lib/rpm/macros.python,))|g' \ 236 238 -e 's|%INSTMOD%|$(instmod)|g' \ 237 239 -e 's|%LIBASOUND%|$(if $(filter lib64,$(rpmlib)),libasound.so.2()(64bit),libasound.so.2)|g' \ 238 240 -e 's|%INITSCRIPTS%|$(if $(filter fedora,$(rpmspec)),initscripts,)|g' \ 239 -e 's|%WEBSVC%|$(if $(NOWEBSVC),false,true)|g' \240 241 -e 's|%NETTOOLS%|$(if $(filter fedora18 fedora19 fedora20 fedora21 el5 openSUSE110 openSUSE111 openSUSE112 openSUSE113 openSUSE114,$(rpmrel)),net-tools,iproute)|g' \ 241 rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec242 mv rpm/VirtualBox-$(ver) rpm/$(rpmname)243 cp ../../../../tools/linux.$(chrarch)/bin/chrpath rpm/$(rpmname) || true244 tar -cf rpm/VirtualBox.tar -C rpm$(rpmname)245 rm -f rpmbuild/RPMS/*/VirtualBox*rpm246 rm -f rpmbuild/SPECS/*247 mkdir -p rpmbuild/BUILD rpmbuild/RPMS/i386 rpmbuild/RPMS/x86_64 rpmbuild/SOURCES rpmbuild/SPECS rpmbuild/SRPMS248 (cd rpm; rpmbuild --define '_topdir $(current)/rpmbuild' -tb --clean VirtualBox.tar)249 mv rpmbuild/RPMS/*/$(verpkg)-debug* $(pkgdir) || true250 file=`find rpmbuild/RPMS -name $(verpkg)*rpm -print`; \242 $(current)/rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec 243 mv $(bldbase)/VirtualBox-$(ver) $(bldbase)/$(rpmname) 244 cp ../../../../tools/linux.$(chrarch)/bin/chrpath $(bldbase)/$(rpmname) || true 245 tar -cf $(bldbase)/VirtualBox.tar -C $(bldbase) $(rpmname) 246 rm -f $(stagedir)/RPMS/*/VirtualBox*rpm 247 rm -f $(stagedir)/SPECS/* 248 mkdir -p $(stagedir)/BUILD $(stagedir)/RPMS/i386 $(stagedir)/RPMS/x86_64 $(stagedir)/SOURCES $(stagedir)/SPECS $(stagedir)/SRPMS 249 (cd $(bldbase); rpmbuild --define '_topdir $(stagedir)' -tb --clean VirtualBox.tar) 250 mv $(stagedir)/RPMS/*/$(verpkg)-debug* $(pkgdir) || true 251 file=`find $(stagedir)/RPMS -name $(verpkg)*rpm -print`; \ 251 252 mv $$file $(pkgdir) 252 253 # Note! if rpmbuild fails: sudo chmod a+rw /usr/src/redhat/* /usr/src/redhat/RPMS/*
Note:
See TracChangeset
for help on using the changeset viewer.