10 if [[ "$COMMAND" == "" ]]; then
11 echo "Error: You did not give me a command to run!"
22 --untar|untar
) irtrans_untar
"${ARGS[@]:1}";;
23 --make|
make) irtrans_make
"${ARGS[@]:1}";;
24 --install|
install|inst
) irtrans_install
"${ARGS[@]:1}";;
25 --clean|clean
) irtrans_clean
"${ARGS[@]:1}";;
26 --test|
test) irtrans_test
"${ARGS[@]:1}";;
27 *) echo "Error: Unknown command \"$COMMAND\"";
35 echo "Usage: $SCRIPT_NAME COMMAND"
38 echo " --untar | untar"
39 echo " Untar irtrans package"
40 echo " Create untar for irserver-src.tar.gz and IRTransDLL_N800.tar.gz"
41 echo " Use this when you are compiling irtrans first time "
44 echo " Run make for irtrans"
46 echo " --install | install | inst"
47 echo " Run make for irtrans if needed"
48 echo " copy libIRTrans.so to $INSTALL_DIR/lib"
49 echo " copy irserver to $INSTALL_DIR/bin"
50 echo " Run autogen.sh for irreco-backend-irtrans if needed"
51 echo " Run configure.sh for irreco-backend-irtrans if needed"
52 echo " Run make for irreco-backend-irtrans"
53 echo " Run make install for irreco-backend-irtrans"
56 echo " Run \"make clean\" for irtrans"
57 echo " Run \"make clean\" and autoclean.sh for irreco-backend-irtrans"
63 echo $IRTRANS_SHLIB_DIR
69 rm "$SCRIPT_TMP_DIR/irtrans_sb_target"
70 if [ -d "$IRTRANS_DIR" ]; then
71 if [ ! -d "$IRTRANS_SHLIB_DIR" ] \
72 ||
[ ! -d "$IRTRANS_IRSERVER_DIR" ] \
73 ||
[[ "$1" == '--force' ]] \
74 ||
[[ "$1" == 'force' ]]; then
75 irtrans_print_title
"UNTAR"
88 match_sb_target
"$SCRIPT_TMP_DIR/irtrans_sb_target"
89 if [[ "$?" != "0" ]]; then
90 irtrans_print_title
"MAKE"
110 irtrans_backend_conf
()
114 if [ -e './autogen.sh' ]; then
115 irtrans_print_title
"BACKEND AUTOGEN"
120 irtrans_print_title
"BACKEND CONFIGURE"
122 PKG_CONFIG_PATH
=$PKG_CONFIG_PATH:$INSTALL_DIR/lib
/pkgconfig .
/configure \
123 --with-irtrans=$IRTRANS_DIR/irtransdll
--prefix=$INSTALL_DIR --enable-debug=yes "$@"
129 if [ ! -e "$IRTRANS_SHLIB_DIR/libIRTrans.so" ] || \
130 [ ! -e "$IRTRANS_IRSERVER_DIR/irserver" ]; then
133 cp -v "$IRTRANS_SHLIB_DIR/libIRTrans.so" "$INSTALL_DIR/lib"
134 cp -v "$IRTRANS_IRSERVER_DIR/irserver" "$INSTALL_DIR/bin"
136 cd "$BACKEND_DIR/irtrans"
139 if [ ! -e "Makefile" ]; then
143 irtrans_print_title
"BACKEND MAKE"
145 irtrans_print_title
"BACKEND MAKE INSTALL"
152 irtrans_print_title
"CLEAN"
153 rm "$SCRIPT_TMP_DIR/irtrans_sb_target"
158 irtrans_print_title
"BACKEND CLEAN"
159 cd "$BACKEND_DIR/irtrans"
165 irtrans_print_title
()
167 print_title
"IRTRANS $1"