2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

This corrects a couple of build issues on openSUSE, as the version

of rpm there no longer defines %{_host_vendor}.
This commit is contained in:
Steve Beattie
2010-10-07 15:38:31 -07:00
parent c90b199488
commit 875a06b9d7

View File

@@ -48,16 +48,21 @@ BUILDDIR=$(shell if [ -d "${TESTBUILDDIR}" ] ; then \
echo "/tmp/${NAME}" ; \
fi ;)
endif
RPMHOSTVENDOR=$(shell which rpm && rpm --eval "%{_host_vendor}")
ifndef DISTRO
DISTRO=$(shell if [ -f /etc/slackware-version ] ; then \
echo slackware ; \
elif [ -f /etc/debian_version ] ; then \
echo debian ;\
elif [ ${RPMHOSTVENDOR} = "suse" ] ; then \
echo suse ;\
elif [ ${RPMHOSTVENDOR} = "redhat" ] ; then \
echo rhel4 ;\
elif which rpm > /dev/null ; then \
if [ "$(rpm --eval '0%{?suse_version}')" != "0" ] ; then \
echo suse ;\
elif [ "$(rpm --eval '%{_host_vendor}')" = redhat ] ; then \
echo rhel4 ;\
elif [ "$(rpm --eval '0%{?fedora}')" != "0" ] ; then \
echo rhel4 ;\
else \
echo unknown ;\
fi ;\
else \
echo unknown ;\
fi)