diff --git a/packaging/deb/makedeb.sh b/packaging/deb/makedeb.sh index c5bc5953b4b260c66bfd65c626b469af34f6559a..dfcb484524e256f44294997da345a752db0183ad 100755 --- a/packaging/deb/makedeb.sh +++ b/packaging/deb/makedeb.sh @@ -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 diff --git a/packaging/rpm/tdengine.spec b/packaging/rpm/tdengine.spec index a92487d246f369ef58dd75cbb57d5d7c229ccd40..04d79b217250910eb9446e9233165c58c97f2cca 100644 --- a/packaging/rpm/tdengine.spec +++ b/packaging/rpm/tdengine.spec @@ -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 diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh index 4d2a66d6058eb0734853522b06822e24a419df2a..1883493dbcb2c5497527e9a67c6d83d8f0c66abf 100755 --- a/packaging/tools/install.sh +++ b/packaging/tools/install.sh @@ -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() { diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh index 89d5ad0177e91131a7be40f9ed741c4ed95aa115..1eb62da79f8408f4dccf7c0a5c7e752f128f8643 100755 --- a/packaging/tools/make_install.sh +++ b/packaging/tools/make_install.sh @@ -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}" } diff --git a/packaging/tools/post.sh b/packaging/tools/post.sh index 2583d74275ed11020eccddc7dd15a8d14d5c6723..94048e7b9a38d2bdea9acd5a3f3cf3a0b381806b 100755 --- a/packaging/tools/post.sh +++ b/packaging/tools/post.sh @@ -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() { diff --git a/packaging/tools/preun.sh b/packaging/tools/preun.sh index ed1ee675cbab8fac5e9147fd7331f5d71bef28d4..5fb46acda50d5ba956ae93311777cc6f12b60ef9 100755 --- a/packaging/tools/preun.sh +++ b/packaging/tools/preun.sh @@ -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} || : diff --git a/packaging/tools/remove.sh b/packaging/tools/remove.sh index c5851f46811fcb69be39f17ebb6313833596cd1a..921103c197eb15c6bff47bb5aafbd23995e2401e 100755 --- a/packaging/tools/remove.sh +++ b/packaging/tools/remove.sh @@ -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} || :