rules revision d63de4508a08b11f57c307a15eda3cd95485bf2c
2400N/A# available from http://www.virtualbox.org. This file is free software;
5680N/A# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
3817N/A# VirtualBox.chm from $HOME
3817N/Aifeq ($(shell if grep -q '^/usr/lib/virtualbox' /etc/permissions* 2>/dev/null; then echo yes; fi),yes)
2400N/Aifeq ($(shell if grep -q '^%disttag' /usr/lib/rpm/macros.d/mandriva 2>/dev/null; then echo yes; fi),yes)
rpmrel := $(shell cat /etc/fedora-release | sed -e 's/^Fedora *release *\([1-9][0-9]*\) .*/fedora\1/')
ifeq ($(filter-out el4 el5 el6 ol4 ol5 ol6 centos4 centos5 centos6 fedora9 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 turbolinux11,$(rpmrel)),)
ifeq ($(filter-out openSUSE110 openSUSE111 openSUSE112 openSUSE113 openSUSE114 sles10.1 sles11.0,$(rpmrel)),)
rpmver :=$(ver)$(if $(NOSUBVER),,$(if $(svn_revision),_$(svn_revision),)$(VERSUFFIX)$(if $(HEADLESS),_headless,)$(if $(DEBUG),_dbg,))$(if $(BLEEDING_EDGE),_$(BLEEDING_EDGE),)
instmod := $(if $(filter el4 el5 el6 ol4 ol5 ol6 centos4 centos5 centos6 sles10.1 sles11.0 fedora13 fedora14 fedora15 fedora16 fedora17,$(rpmrel)),,install_rpm)
$(if $(filter el4 el5 ol4 ol5 centos4 centos5 mdv2010.0 sles10.1 sles11.0 turbolinux11,$(rpmrel)),--with-qt4-dir=/home/vbox/Qt-4.7.4-stdc++6-$(arch)) \
$(doc_dir) \
$(if $(filter el4 el5 ol4 ol5 centos4 centos5 fedora9 fedora10 sles10.1 turbolinux11,$(rpmrel)),,VBOX_WITH_SYSFS_BY_DEFAULT=1)
sed \
-e 's|%MACROSPYTHON%|$(if $(wildcard /usr/lib/rpm/macros.python),%include /usr/lib/rpm/macros.python,)|g' \
-e 's|%LIBASOUND%|$(if $(filter lib64,$(rpmlib)),libasound.so.2()(64bit),libasound.so.2)|g' \
-e '/#include installer-common.sh/ {' \
sed \
sed \
sed \
sed \
(cd rpm; rpmbuild -tb --clean VirtualBox.tar.bz2)