未验证 提交 84e47940 编写于 作者: S slguan 提交者: GitHub

Merge pull request #69 from plum-lihui/master

modify libtaos.so link
......@@ -24,6 +24,9 @@ fi
mkdir -p ${pkg_dir}
cd ${pkg_dir}
versioninfo=$(${script_dir}/../tools/get_version.sh)
libfile="libtaos.so.${versioninfo}"
# create install dir
install_home_path="/usr/local/taos"
mkdir -p ${pkg_dir}${install_home_path}
......@@ -43,7 +46,7 @@ cp ${compile_dir}/../packaging/tools/preun.sh ${pkg_dir}${install_home_pat
cp ${compile_dir}/build/bin/taosdump ${pkg_dir}${install_home_path}/bin
cp ${compile_dir}/build/bin/taosd ${pkg_dir}${install_home_path}/bin
cp ${compile_dir}/build/bin/taos ${pkg_dir}${install_home_path}/bin
cp ${compile_dir}/build/lib/libtaos.so ${pkg_dir}${install_home_path}/driver
cp ${compile_dir}/build/lib/${libfile} ${pkg_dir}${install_home_path}/driver
cp ${compile_dir}/../src/inc/taos.h ${pkg_dir}${install_home_path}/include
cp -r ${top_dir}/tests/examples/* ${pkg_dir}${install_home_path}/examples
cp -r ${top_dir}/src/connector/grafana ${pkg_dir}${install_home_path}/connector
......
......@@ -38,6 +38,9 @@ echo topdir: %{_topdir}
echo version: %{_version}
echo buildroot: %{buildroot}
versioninfo=$(%{_compiledir}/../packaging/tools/get_version.sh)
libfile="libtaos.so.${versioninfo}"
# create install path, and cp file
mkdir -p %{buildroot}%{homepath}/bin
mkdir -p %{buildroot}%{homepath}/cfg
......@@ -55,7 +58,7 @@ cp %{_compiledir}/../packaging/tools/preun.sh %{buildroot}%{homepath}/scri
cp %{_compiledir}/build/bin/taos %{buildroot}%{homepath}/bin
cp %{_compiledir}/build/bin/taosd %{buildroot}%{homepath}/bin
cp %{_compiledir}/build/bin/taosdump %{buildroot}%{homepath}/bin
cp %{_compiledir}/build/lib/libtaos.so %{buildroot}%{homepath}/driver
cp %{_compiledir}/build/lib/${libfile} %{buildroot}%{homepath}/driver
cp %{_compiledir}/../src/inc/taos.h %{buildroot}%{homepath}/include
cp -r %{_compiledir}/../src/connector/grafana %{buildroot}%{homepath}/connector
cp -r %{_compiledir}/../src/connector/python %{buildroot}%{homepath}/connector
......
......@@ -79,12 +79,12 @@ function install_bin() {
function install_lib() {
# Remove links
sudo rm -f ${lib_link_dir}/libtaos.so || :
sudo rm -f ${lib_link_dir}/libtaos.* || :
sudo cp -rf ${script_dir}/driver/* ${install_main_dir}/driver && sudo chmod 777 ${install_main_dir}/driver/*
sudo ln -s ${install_main_dir}/driver/libtaos.* ${install_main_dir}/driver/libtaos.so.1
sudo ln -s ${install_main_dir}/driver/libtaos.so.1 ${lib_link_dir}/libtaos.so
sudo ln -s ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.so.1
sudo ln -s ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so
}
function install_header() {
......
......@@ -89,8 +89,8 @@ function install_lib() {
versioninfo=$(${script_dir}/get_version.sh)
sudo cp ${binary_dir}/build/lib/libtaos.so.${versioninfo} ${install_main_dir}/driver && sudo chmod 777 ${install_main_dir}/driver/*
sudo ln -sf ${install_main_dir}/driver/libtaos.so.${versioninfo} ${install_main_dir}/driver/libtaos.so.1
sudo ln -sf ${install_main_dir}/driver/libtaos.so.1 ${lib_link_dir}/libtaos.so
sudo ln -sf ${install_main_dir}/driver/libtaos.so.${versioninfo} ${lib_link_dir}/libtaos.so.1
sudo ln -sf ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so
}
function install_header() {
......@@ -223,14 +223,14 @@ function update_TDengine() {
fi
sleep 1
fi
install_main_path
install_log
install_header
install_lib
install_bin
install_service
# install_service
install_config
install_connector
install_examples
......@@ -239,14 +239,14 @@ function update_TDengine() {
echo -e "\033[44;32;1mTDengine is updated successfully!${NC}"
echo
echo -e "${GREEN_DARK}To configure TDengine ${NC}: edit /etc/taos/taos.cfg"
if is_using_systemd; then
echo -e "${GREEN_DARK}To start TDengine ${NC}: sudo systemctl start taosd${NC}"
else
echo -e "${GREEN_DARK}To start TDengine ${NC}: sudo update-rc.d taosd default ${RED} for the first time${NC}"
echo -e " : sudo service taosd start ${RED} after${NC}"
fi
echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}"
# if is_using_systemd; then
# echo -e "${GREEN_DARK}To start TDengine ${NC}: sudo systemctl start taosd${NC}"
# else
# echo -e "${GREEN_DARK}To start TDengine ${NC}: sudo update-rc.d taosd default ${RED} for the first time${NC}"
# echo -e " : sudo service taosd start ${RED} after${NC}"
# fi
# echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}"
echo
echo -e "\033[44;32;1mTDengine is updated successfully!${NC}"
}
......@@ -255,13 +255,13 @@ function install_TDengine() {
# Start to install
echo -e "${GREEN}Start to install TDEngine...${NC}"
install_main_path
install_main_path
install_data
install_log
install_header
install_bin
install_lib
install_service
# install_service
install_config
install_connector
install_examples
......@@ -271,14 +271,14 @@ function install_TDengine() {
echo -e "\033[44;32;1mTDengine is installed successfully!${NC}"
echo
echo -e "${GREEN_DARK}To configure TDengine ${NC}: edit /etc/taos/taos.cfg"
if is_using_systemd; then
echo -e "${GREEN_DARK}To start TDengine ${NC}: sudo systemctl start taosd${NC}"
else
echo -e "${GREEN_DARK}To start TDengine ${NC}: sudo update-rc.d taosd default ${RED} for the first time${NC}"
echo -e " : sudo service taosd start ${RED} after${NC}"
fi
echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}"
# if is_using_systemd; then
# echo -e "${GREEN_DARK}To start TDengine ${NC}: sudo systemctl start taosd${NC}"
# else
# echo -e "${GREEN_DARK}To start TDengine ${NC}: sudo update-rc.d taosd default ${RED} for the first time${NC}"
# echo -e " : sudo service taosd start ${RED} after${NC}"
#3 fi
# echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}"
echo
echo -e "\033[44;32;1mTDengine is installed successfully!${NC}"
}
......
......@@ -52,8 +52,9 @@ function install_include() {
function install_lib() {
sudo rm -f ${lib_link_dir}/libtaos.so || :
sudo ln -s ${lib_dir}/libtaos.so ${lib_link_dir}/libtaos.so
#sudo ln -s ${lib_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so.1 || :
sudo ln -s ${lib_dir}/libtaos.* ${lib_link_dir}/libtaos.so.1
sudo ln -s ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so
}
function install_bin() {
......
......@@ -72,7 +72,7 @@ sudo rm -f ${bin_link_dir}/taosd || :
sudo rm -f ${bin_link_dir}/taosdump || :
sudo rm -f ${cfg_link_dir}/* || :
sudo rm -f ${inc_link_dir}/taos.h || :
sudo rm -f ${lib_link_dir}/libtaos.so || :
sudo rm -f ${lib_link_dir}/libtaos.* || :
sudo rm -f ${log_link_dir} || :
sudo rm -f ${data_link_dir} || :
......
......@@ -53,7 +53,7 @@ function clean_bin() {
}
function clean_lib() {
# Remove link
sudo rm -f ${lib_link_dir}/libtaos.so || :
sudo rm -f ${lib_link_dir}/libtaos.* || :
#sudo rm -f /usr/lib/libtaos.so || :
#sudo rm -rf ${lib_dir} || :
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册