Skip to content

Commit

Permalink
INTERNAL: Move a libevent dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ing-eoking committed Oct 20, 2023
1 parent 4b5e3b8 commit 73ebda3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions deps/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

trap "stop_build" ERR

stop_build() {
printf "\nError has occurred. $0 has failed\n"
printf "Check ./build.log\n"
exit -1
}

libevent_file=$(find . -name "libevent*.tar.gz")
libevent_version=$(sed -e 's/..libevent-\(.*\)\.tar\.gz/\1/' <<< $libevent_file)
install_path=$1

echo "[BUILD LOG FILE]" > build.log

echo "---------------------------------------"
echo "ARCUS MEMCACHED DEPENDENCY BUILD: START"
echo "---------------------------------------"
echo "LOG PATH : $PWD"
echo "INSTALL PATH : $install_path"
echo "LIBEVENT VERSION : $libevent_version"
echo "---------------------------------------"
if test -d ./libevent-$libevent_version ; then
rm -rf libevent-$libevent_version
fi
printf "[libevent decompression] .. START"
tar -xvf libevent-$libevent_version.tar.gz >> ./build.log 2>&1
printf "\r[libevent decompression] .. SUCCEED\n"
pushd libevent-$libevent_version >> ./build.log
printf "[libevent configure] .. START"
./configure --prefix=$install_path --disable-openssl >> ../build.log 2>&1
printf "\r[libevent configure] .. SUCCEED\n"
printf "[libevent make] .. START"
make >> ../build.log 2>&1
printf "\r[libevent make] .. SUCCEED\n"
printf "[libevent make install] .. START"
make install >> ../build.log 2>&1
printf "\r[libevent make install] .. SUCCEED\n"
popd >> ./build.log
rm -rf libevent-$libevent_version >> ./build.log 2>&1

echo "---------------------------------------"
echo "ARCUS MEMCACHED DEPENDENCY BUILD: END"
echo "---------------------------------------"

Binary file added deps/libevent-2.1.12-stable.tar.gz
Binary file not shown.

0 comments on commit 73ebda3

Please sign in to comment.