From 1b08ca86654a8970077dce67d4d2ffb31d289b15 Mon Sep 17 00:00:00 2001 From: YuraBeznos Date: Fri, 15 Dec 2023 10:35:21 +0300 Subject: [PATCH] fix: several fixes for prepare-20 --- src/Makefile | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/Makefile b/src/Makefile index 06feb67..023af05 100644 --- a/src/Makefile +++ b/src/Makefile @@ -46,7 +46,13 @@ prepare: rm -rf /tmp/.doxy prepare-20: - sudo apt install -y \ + sudo rm -Rf /tmp/firefighter-drone && \ + mkdir -p /tmp/firefighter-drone/gtest && \ + mkdir -p /tmp/firefighter-drone/doxy && \ + mkdir -p /tmp/firefighter-drone/civetweb && \ + mkdir -p /tmp/firefighter-drone/ && \ + sudo apt-get update && \ + sudo apt install -y \ mosquitto-clients \ libmosquittopp1 \ libmosquittopp-dev \ @@ -58,21 +64,16 @@ prepare-20: unzip \ curl \ doxygen && \ - mkdir /tmp/.build && \ - cd /tmp/.build && \ + cd /tmp/firefighter-drone/gtest && \ cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/lib -DCMAKE_BUILD_TYPE=RELEASE /usr/src/gtest/ && \ make && \ - cp /tmp/.build/lib/*.so* /usr/lib/x86_64-linux-gnu/ && \ - ldconfig && \ - rm -rf /tmp/.build && \ - mkdir /tmp/.doxy && \ - cd /tmp/.doxy && \ + sudo cp /tmp/firefighter-drone/gtest/lib/*.so* /usr/lib/x86_64-linux-gnu/ && \ + sudo ldconfig && \ + cd /tmp/firefighter-drone/doxy && \ curl -L -s -o doxybook2.zip https://github.com/matusnovak/doxybook2/releases/download/v1.5.0/doxybook2-linux-amd64-v1.5.0.zip && \ unzip *.zip && \ - mv bin/* /usr/bin/ && \ - rm -rf /tmp/.doxy && \ - mkdir /tmp/civetweb && \ - cd /tmp/civetweb && \ + sudo mv bin/* /usr/bin/ && \ + cd /tmp/firefighter-drone/civetweb && \ curl -L -s -o v1.15.tar.gz https://github.com/civetweb/civetweb/archive/refs/tags/v1.15.tar.gz && \ tar xzf v1.15.tar.gz && \ cd civetweb-1.15 && \ @@ -80,8 +81,8 @@ prepare-20: cd .build && \ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DCMAKE_BUILD_TYPE=None -DCIVETWEB_BUILD_TESTING=OFF -DCIVETWEB_SOVERSION=1 -DCIVETWEB_ENABLE_CXX=ON -DBUILD_SHARED_LIBS=ON -DCIVETWEB_ENABLE_WEBSOCKETS=ON .. && \ make -j4 "INSTALL=install --strip-program=true" VERBOSE=1 && \ - make install && \ - rm -rf /tmp/civetweb + sudo make install && \ + sudo rm -rf /tmp/firefighter-drone %.o: %.cpp %.h $(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<