diff options
author | Willem Jan Withagen <wjw@digiware.nl> | 2019-03-02 15:37:38 +0100 |
---|---|---|
committer | Willem Jan Withagen <wjw@digiware.nl> | 2019-03-04 11:33:38 +0100 |
commit | 46b3d671b4408a766aaed379274242ad4b38afb3 (patch) | |
tree | ce04d53eca34ef95ddb1b8dd07267d371d10a30c /do_cmake.sh | |
parent | Merge PR #26720 into master (diff) | |
download | ceph-46b3d671b4408a766aaed379274242ad4b38afb3.tar.xz ceph-46b3d671b4408a766aaed379274242ad4b38afb3.zip |
build: FreeBSD does not have /etc/os-release
So "manually" set requirements
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Diffstat (limited to 'do_cmake.sh')
-rwxr-xr-x | do_cmake.sh | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/do_cmake.sh b/do_cmake.sh index 72fdb8eb37a..26f7b7e51a4 100755 --- a/do_cmake.sh +++ b/do_cmake.sh @@ -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 |