scripts/pkgdep.sh: Add flag for building docs dependencies

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If2c64eaa688fdc067479a357cbfd407570937419
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/602
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Maciej Wawryk 2020-01-17 10:39:19 +01:00 committed by Tomasz Zawadzki
parent fe5954c67f
commit e5a5eaa660

View File

@ -16,6 +16,7 @@ function usage()
echo " -p --pmem Additional dependencies for reduce and pmdk"
echo " -f --fuse Additional dependencies for FUSE and NVMe-CUSE"
echo " -r --rdma Additional dependencies for RDMA transport in NVMe over Fabrics"
echo " -b --docs Additional dependencies for building docs"
echo ""
exit 0
}
@ -26,6 +27,7 @@ function install_all_dependencies ()
INSTALL_PMEM=true
INSTALL_FUSE=true
INSTALL_RDMA=true
INSTALL_DOCS=true
}
INSTALL_CRYPTO=false
@ -33,8 +35,9 @@ INSTALL_DEV_TOOLS=false
INSTALL_PMEM=false
INSTALL_FUSE=false
INSTALL_RDMA=false
INSTALL_DOCS=false
while getopts 'adfhipr-:' optchar; do
while getopts 'abdfhipr-:' optchar; do
case "$optchar" in
-)
case "$OPTARG" in
@ -44,6 +47,7 @@ while getopts 'adfhipr-:' optchar; do
pmem) INSTALL_PMEM=true;;
fuse) INSTALL_FUSE=true;;
rdma) INSTALL_RDMA=true;;
docs) INSTALL_DOCS=true;;
*) echo "Invalid argument '$OPTARG'"
usage;;
esac
@ -54,6 +58,7 @@ while getopts 'adfhipr-:' optchar; do
p) INSTALL_PMEM=true;;
f) INSTALL_FUSE=true;;
r) INSTALL_RDMA=true;;
b) INSTALL_DOCS=true;;
*) echo "Invalid argument '$OPTARG'"
usage;;
esac
@ -105,12 +110,14 @@ if [ -s /etc/redhat-release ]; then
# Additional dependencies for FUSE and NVMe-CUSE
yum install -y fuse3-devel
fi
# Additional dependencies for building docs
yum install -y doxygen mscgen graphviz
if [[ $INSTALL_RDMA == "true" ]]; then
# Additional dependencies for RDMA transport in NVMe over Fabrics
yum install -y libibverbs-devel librdmacm-devel
fi
if [[ $INSTALL_DOCS == "true" ]]; then
# Additional dependencies for building docs
yum install -y doxygen mscgen graphviz
fi
elif [ -f /etc/debian_version ]; then
. /etc/os-release
VERSION_ID_NUM=$(sed 's/\.//g' <<< $VERSION_ID)
@ -157,12 +164,14 @@ elif [ -f /etc/debian_version ]; then
apt-get install -y libfuse3-dev
fi
fi
# Additional dependencies for building docs
apt-get install -y doxygen mscgen graphviz
if [[ $INSTALL_RDMA == "true" ]]; then
# Additional dependencies for RDMA transport in NVMe over Fabrics
apt-get install -y libibverbs-dev librdmacm-dev
fi
if [[ $INSTALL_DOCS == "true" ]]; then
# Additional dependencies for building docs
apt-get install -y doxygen mscgen graphviz
fi
elif [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]; then
# Minimal install
zypper install -y gcc gcc-c++ make cunit-devel libaio-devel libopenssl-devel \
@ -186,12 +195,14 @@ elif [ -f /etc/SuSE-release ] || [ -f /etc/SUSE-brand ]; then
# Additional dependencies for FUSE and NVMe-CUSE
zypper install -y fuse3-devel
fi
# Additional dependencies for building docs
zypper install -y doxygen mscgen graphviz
if [[ $INSTALL_RDMA == "true" ]]; then
# Additional dependencies for RDMA transport in NVMe over Fabrics
zypper install -y rdma-core-devel
fi
if [[ $INSTALL_DOCS == "true" ]]; then
# Additional dependencies for building docs
zypper install -y doxygen mscgen graphviz
fi
elif [ $(uname -s) = "FreeBSD" ] ; then
# Minimal install
pkg install -y gmake cunit openssl git bash misc/e2fsprogs-libuuid python
@ -202,8 +213,10 @@ elif [ $(uname -s) = "FreeBSD" ] ; then
pkg install -y devel/astyle bash py27-pycodestyle \
misc/e2fsprogs-libuuid sysutils/sg3_utils nasm
fi
# Additional dependencies for building docs
pkg install -y doxygen mscgen graphviz
if [[ $INSTALL_DOCS == "true" ]]; then
# Additional dependencies for building docs
pkg install -y doxygen mscgen graphviz
fi
elif [ -f /etc/arch-release ]; then
# Install main dependencies
pacman -Sy --needed --noconfirm gcc make cunit libaio openssl \
@ -250,16 +263,6 @@ elif [ -f /etc/arch-release ]; then
ldconfig
rm -rf /tmp/pmdk
fi
# Additional dependencies for building docs
pacman -Sy --needed --noconfirm doxygen graphviz
# Additional dependency for building docs
pacman -S --noconfirm --needed gd ttf-font
su - $SUDO_USER -c "pushd /tmp;
git clone https://aur.archlinux.org/mscgen.git;
cd mscgen;
makepkg -si --needed --noconfirm;
cd .. && rm -rf mscgen;
popd"
if [[ $INSTALL_FUSE == "true" ]]; then
# Additional dependencies for FUSE and NVMe-CUSE
pacman -Sy --needed --noconfirm fuse3
@ -277,6 +280,17 @@ elif [ -f /etc/arch-release ]; then
cd .. && rm -rf rdma-core;
popd"
fi
if [[ $INSTALL_DOCS == "true" ]]; then
# Additional dependencies for building docs
pacman -Sy --needed --noconfirm doxygen graphviz
pacman -S --noconfirm --needed gd ttf-font
su - $SUDO_USER -c "pushd /tmp;
git clone https://aur.archlinux.org/mscgen.git;
cd mscgen;
makepkg -si --needed --noconfirm;
cd .. && rm -rf mscgen;
popd"
fi
else
echo "pkgdep: unknown system type."
exit 1