Skip to content

Commit

Permalink
build: FreeBSD does not have /etc/os-release
Browse files Browse the repository at this point in the history
So "manually" set requirements

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
  • Loading branch information
wjwithagen committed Mar 4, 2019
1 parent 5de1329 commit 46b3d67
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions do_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,33 @@ if test -e build; then
fi

PYBUILD="2"
source /etc/os-release
case "$ID" in
fedora)
if [ "$VERSION_ID" -ge "29" ] ; then
PYBUILD="3"
fi
;;
rhel|centos)
MAJOR_VER=$(echo "$VERSION_ID" | sed -e 's/\..*$//')
if [ "$MAJOR_VER" -ge "8" ] ; then
PYBUILD="3"
fi
;;
opensuse*|suse|sles)
PYBUILD="3"
WITH_RADOSGW_AMQP_ENDPOINT="OFF"
;;
esac
if [ -r /etc/os-release ]; then
source /etc/os-release
case "$ID" in
fedora)
if [ "$VERSION_ID" -ge "29" ] ; then
PYBUILD="3"
fi
;;
rhel|centos)
MAJOR_VER=$(echo "$VERSION_ID" | sed -e 's/\..*$//')
if [ "$MAJOR_VER" -ge "8" ] ; then
PYBUILD="3"
fi
;;
opensuse*|suse|sles)
PYBUILD="3"
WITH_RADOSGW_AMQP_ENDPOINT="OFF"
;;
esac
elif [ "$(uname)" == FreeBSD ] ; then
PYBUILD="3"
WITH_RADOSGW_AMQP_ENDPOINT="OFF"
else
echo Unknown release
exit 1
fi

if [ "$PYBUILD" = "3" ] ; then
ARGS="$ARGS -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3"
fi
Expand Down

0 comments on commit 46b3d67

Please sign in to comment.