rules revision 24df09922f68ca6b53d3b8052e589d3b790f7c17
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#!/usr/bin/make -f
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Copyright (C) 2006-2010 Oracle Corporation
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# This file is part of VirtualBox Open Source Edition (OSE), as
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# available from http://www.virtualbox.org. This file is free software;
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# you can redistribute it and/or modify it under the terms of the GNU
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# General Public License as published by the Free Software Foundation,
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# distribution. VirtualBox OSE is distributed in the hope that it will
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# be useful, but WITHOUT ANY WARRANTY of any kind.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userifeq ($(wildcard rpm/rules),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User$(error call rpm/rules from src/VBox/Installer/linux)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userendif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userifneq ($(wildcard /usr/lib/rpm/find-requires.ksyms),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# don't allow to check for kernel syms, otherwise we depend on specific kernel versions!
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(error /usr/lib/rpm/find-requires.ksyms must not be installed)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntendif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userifneq ($(wildcard /usr/lib/rpm/find-supplements.ksyms),)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# same for openSUSE
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt$(error /usr/lib/rpm/find-supplements.ksyms must not be installed)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userendif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userifeq ($(shell if grep -q '^/usr/lib/virtualbox' /etc/permissions* 2>/dev/null; then echo yes; fi),yes)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# make sure openSUSE permissions fixes don't interfere with us
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User$(error Fix /etc/permissions*)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userendif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userverpkg := VirtualBox-4.0
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntcurrent := $(shell pwd)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Uservboxroot := $(shell cd ../../../../; pwd)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntpkgdir := $(shell cd ../../../../..; pwd)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userbuilddir := $(current)/rpm/builddir
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userrpmlib := $(shell if [ `uname -m` = "x86_64" ]; then echo "lib64"; else echo "lib"; fi)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userarch := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "i386"; fi)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userverfile := $(builddir)/version-generated.mk
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User-include $(vboxroot)/SVN_REVISION
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usersvnrev :=$(if $(svn_revision),$(svn_revision),0)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userifneq ($(MAKECMDGOALS),clean)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rpmrel := $(shell cat /etc/distname)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User ifeq ($(rpmrel),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # look for fedora
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User rpmrel := $(shell cat /etc/fedora-release | sed -e 's/^Fedora *release *\([1-9][0-9]*\) .*/fedora\1/')
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User endif
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User ifeq ($(rpmrel),)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(error failed to detect the release type. Add /etc/distname or hack the detection.)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User endif
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User rpmdist := $(strip $(shell grep $(rpmrel) $(current)/distributions_rpm | cut -d'=' -f2))
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User ifeq ($(rpmdist),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(error Cannot detect package distribution (rpmrel=$(rpmrel)))
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User endif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User ifeq ($(filter-out rhel4 rhel5 rhel6 fedora9 fedora11 fedora12 fedora13 fedora14 pclinuxos2007 turbolinux11,$(rpmrel)),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rpmspec := rpm_redhat
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox User endif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User ifeq ($(filter-out openSUSE110 openSUSE111 openSUSE112 openSUSE113 sles10.1 sles11.0,$(rpmrel)),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rpmspec := rpm_suse
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt endif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User ifeq ($(filter-out mdv2009.1 mdv2010.0,$(rpmrel)),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rpmspec := rpm_mdv
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User endif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User ifeq ($(rpmspec),)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(error failed to detect the .spec file (rpmrel=$(rpmrel)))
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User endif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt include $(verfile)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User$(verfile): rpm/configure-stamp
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User . rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) $(verfile)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userendif
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userver := $(VBOX_VERSION_STRING)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntrpmver :=$(ver)$(if $(NOSUBVER),,$(if $(svn_revision),_$(svn_revision),)$(VERSUFFIX)$(if $(DEBUG),_dbg,))$(if $(BLEEDING_EDGE),_$(BLEEDING_EDGE),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userarchdir := $(current)/rpm/VirtualBox-$(ver)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userrpmname := $(verpkg)-$(rpmver)_$(rpmrel)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Fedora13/14 is bleeding edge, the other jails have outdated kernel headers
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userinstmod := $(if $(filter rhel4 rhel5 rhel6 sles10.1 sles11.0 pclinuxos2007 fedora13 fedora14,$(rpmrel)),,install_rpm)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userifneq ($(STAGEDISO),)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userendif
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userendif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userifeq ($(wildcard /usr/share/doc/packages/bash),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User ifeq ($(wildcard /usr/share/doc/bash),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # Mandriva 2007.1, Redhat
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User doc_dir := VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(rpmname)\""
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User else
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # Mandriva 2008.0
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User doc_dir := VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\""
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User endif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userelse
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # Novell (OpenSUSE, SLES)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User doc_dir := VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/packages/$(verpkg)\""
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userendif
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Usercfg_flags := $(if $(filter rhel4 sles10.1,$(rpmrel)),--build-libxml2,) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(filter rhel4 sles10.1,$(rpmrel)),--build-libxslt,) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(filter rhel4,$(rpmrel)),--build-libssl,) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(filter rhel4 rhel5 sles10.1,$(rpmrel)),--build-libcurl,) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(filter rhel5 sles10.1,$(rpmrel)),--disable-sdl-ttf,) \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(if $(filter sles10.1 turbolinux11,$(rpmrel)),--disable-pulse,) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(filter rhel4 rhel5,$(rpmrel)),--enable-pulse,) \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(if $(filter rhel4 rhel5 sles10.1 turbolinux11,$(rpmrel)),--with-qt4-dir=/home/vbox/Qt-4.4.3-stdc++6-$(arch)) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(DEBUG),--build-debug,)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userbld_flags := AUTOCFG=$(current)/rpm/AutoConfig.kmk \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User LOCALCFG=$(current)/rpm/LocalConfig.kmk \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User PATH_OUT=$(builddir) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User VBOX_DO_STRIP= \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User VBOX_WITH_MULTIVERSION_PYTHON= \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(doc_dir) \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt VBOX_WITH_DOCS_CHM=1 \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User VBOX_PACKAGE_DIST=$(rpmdist) \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User VBOX_SVN_REV=$(svnrev) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(NODOCS),VBOX_WITH_DOCS= ,) \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(if $(BLEEDING_EDGE),VBOX_BLEEDING_EDGE=$(BLEEDING_EDGE),) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(filter rhel4 rhel5 fedora9 fedora10 sles10.1 turbolinux11,$(rpmrel)),,VBOX_WITH_SYSFS_BY_DEFAULT=1)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userrpm/configure-stamp:
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cd $(vboxroot) && ./configure --odir=$(current)/rpm $(cfg_flags)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User touch $(current)/rpm/configure-stamp
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userrpm/build-stamp: rpm/configure-stamp
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User . rpm/env.sh && kmk -C $(vboxroot) $(if $(NOPARALLEL),-j1,) $(bld_flags) all
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(NODOCS),,. rpm/env.sh && kmk -C $(vboxroot)/src/VBox/Main $(bld_flags) docs)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(if $(NODOCS),cp $(vboxroot)/prebuild/VirtualBox*.chm $(builddir)/bin,)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User mkdir -p $(builddir)/bin/additions
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User . rpm/env.sh && kmk -C $(vboxroot) $(bld_flags) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User VBOX_NO_LINUX_RUN_INSTALLER=1 \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User packing
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox User touch rpm/build-stamp
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userclean:
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User rm -rf $(archdir)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rm -rf $(builddir) rpm/VirtualBox-*
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User rm -f rpm/VirtualBox.tar.bz2
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rm -f rpm/VirtualBox.spec
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rm -f rpm/build-stamp rpm/configure-stamp rpm/configure.log
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt rm -f rpm/AutoConfig.kmk rpm/env.sh
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userifeq ($(VBOX_VERSION_MAJOR),)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userbinary: rpm/build-stamp $(verfile)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(MAKE) -f rpm/rules binary
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userelse
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userbinary: rpm/build-stamp
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rm -rf rpm/VirtualBox-*
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User tar -xjf $(builddir)/bin/VirtualBox.tar.bz2 -C rpm
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User sed \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -e 's|%VER%|$(ver)|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%NAME%|$(verpkg)|g' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -e 's|%BUILDVER%|$(rpmver)|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%BUILDREL%|$(rpmrel)|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%BUILDROOT%|$(current)/rpm/buildroot|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%LIB%|$(rpmlib)|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%LICENSE%|$(notdir $(wildcard $(builddir)/bin/License-*.html))|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%SPEC%|$(rpmspec)|g' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -e 's|%MACROSPYTHON%|$(if $(wildcard /usr/lib/rpm/macros.python),%include /usr/lib/rpm/macros.python,)|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%INSTMOD%|$(instmod)|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%LIBASOUND%|$(if $(filter lib64,$(rpmlib)),libasound.so.2()(64bit),libasound.so.2)|g' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User sed \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%NOLSB%|yes|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%DEBIAN%||g' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -e 's|%PACKAGE%|virtualbox|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User vboxdrv.sh.in > $(archdir)/vboxdrv.init
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User sed \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%NOLSB%|yes|g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%DEBIAN%||g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -e 's|%PACKAGE%|virtualbox|g' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User vboxweb-service.sh.in > $(archdir)/vboxweb-service.init
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User cp debian/VBox.sh $(archdir)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User mv rpm/VirtualBox-$(ver) rpm/$(rpmname)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User tar -cjf rpm/VirtualBox.tar.bz2 -C rpm $(rpmname)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User rm -f /usr/src/packages/RPMS/*/VirtualBox*rpm
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rm -f /usr/src/packages/SPECS/*
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rpmbuild -tb --clean rpm/VirtualBox.tar.bz2
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User mv /usr/src/packages/RPMS/*/$(verpkg)-debug* $(vboxroot)/.. || true
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User file=`find /usr/src/packages/RPMS -name $(verpkg)*rpm -print`; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User mv $$file $(pkgdir)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Note! if rpmbuild fails: sudo chmod a+rw /usr/src/redhat/* /usr/src/redhat/RPMS/*
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Note! if find/mv fails: sudo ln -s redhat/ /usr/src/packages
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userendif
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User.PHONY: binary clean
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User