mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-27 11:52:32 +00:00
Update build scripts
This commit is contained in:
@@ -3,7 +3,7 @@ mkdir obj
|
||||
set -xe
|
||||
|
||||
apk add gcc g++ build-base linux-headers cmake make autoconf automake libtool
|
||||
apk add libressl-dev zlib-dev rapidjson-dev libevent-dev libevent-static zlib-static pcre-dev
|
||||
apk add libressl-dev zlib-dev rapidjson-dev libevent-dev libevent-static zlib-static pcre-dev bzip2-static
|
||||
|
||||
git clone https://github.com/curl/curl
|
||||
cd curl
|
||||
@@ -18,11 +18,6 @@ cmake . > /dev/null
|
||||
make install -j4 > /dev/null
|
||||
cd ..
|
||||
|
||||
git clone git://sourceware.org/git/bzip2.git
|
||||
cd bzip2
|
||||
make install -j4 > /dev/null
|
||||
cd ..
|
||||
|
||||
cmake .
|
||||
make -j4
|
||||
g++ -o base/subconverter CMakeFiles/subconverter.dir/src/*.o -static -lpcrecpp -lpcre -levent -lyaml-cpp -lcurl -lssl -lcrypto -lz -lbz2 -ldl -lpthread -O3 -s
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
mkdir obj
|
||||
set -xe
|
||||
|
||||
brew reinstall yaml-cpp rapidjson libevent zlib pcre
|
||||
brew reinstall yaml-cpp rapidjson libevent zlib pcre bzip2 pkgconfig
|
||||
|
||||
git clone https://github.com/curl/curl
|
||||
cd curl
|
||||
@@ -11,12 +11,7 @@ cd curl
|
||||
make -j8 > /dev/null
|
||||
cd ..
|
||||
|
||||
curl -L -o bzip2-1.0.6.tar.gz https://sourceforge.net/projects/bzip2/files/bzip2-1.0.6.tar.gz/download
|
||||
tar xvf bzip2-1.0.6.tar.gz
|
||||
cd bzip2-1.0.6
|
||||
make -j8 > /dev/null
|
||||
cd ..
|
||||
|
||||
cp curl/lib/.libs/libcurl.a .
|
||||
cp /usr/local/lib/libevent.a .
|
||||
cp /usr/local/opt/zlib/lib/libz.a .
|
||||
cp /usr/local/opt/openssl@1.1/lib/libssl.a .
|
||||
@@ -24,11 +19,12 @@ cp /usr/local/opt/openssl@1.1/lib/libcrypto.a .
|
||||
cp /usr/local/lib/libyaml-cpp.a .
|
||||
cp /usr/local/lib/libpcre.a .
|
||||
cp /usr/local/lib/libpcrecpp.a .
|
||||
cp /usr/local/opt/bzip2/lib/libbz2.a .
|
||||
|
||||
export CMAKE_CXX_FLAGS=-D_MACOS -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include
|
||||
cmake .
|
||||
export CMAKE_CXX_FLAGS="-I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include"
|
||||
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -DMACOS=on .
|
||||
make -j8
|
||||
c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter obj/logger.o obj/main.o obj/misc.o obj/multithread.o obj/nodemanip.o obj/rapidjson_extra.o obj/speedtestutil.o obj/subexport.o obj/webget.o obj/webserver_libevent.o libpcrecpp.a libpcre.a libevent.a curl/lib/.libs/libcurl.a libz.a libssl.a libcrypto.a libyaml-cpp.a bzip2-1.0.6/libbz2.a -ldl -lpthread -O3
|
||||
c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter CMakeFiles/subconverter.dir/src/*.o libpcrecpp.a libpcre.a libevent.a libcurl.a libz.a libssl.a libcrypto.a libyaml-cpp.a libbz2.a -ldl -lpthread -O3
|
||||
|
||||
cd base
|
||||
chmod +rx subconverter
|
||||
|
||||
Reference in New Issue
Block a user