diff --git a/Dockerfile b/Dockerfile index 61838f1..f6117f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,16 +51,16 @@ RUN buildDeps=" \ && export CXXFLAGS=-I/opt/local/include \ && ./configure --disable-debug --enable-encryption --prefix=/usr \ && make -j$(nproc) \ - && make install - -RUN export QBIT_VERSION=$(curl --silent "https://github.com/qbittorrent/qBittorrent/tags" 2>&1 | grep -m 1 'release-' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~' | sed -n 's/.*href="\([^"]*\).*/\1/p' | sed 's!.*/!!') \ + && make install \ + && QBIT_VERSION=$(curl --silent "https://github.com/qbittorrent/qBittorrent/tags" 2>&1 | grep -m 1 'release-' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~' | sed -n 's/.*href="\([^"]*\).*/\1/p' | sed 's!.*/!!') \ && curl -L "https://github.com/qbittorrent/qBittorrent/archive/$QBIT_VERSION.tar.gz" -o qbittorrent.tar.gz \ && mkdir -p /usr/src/qbittorrent \ && tar -xzf qbittorrent.tar.gz -C /usr/src/qbittorrent --strip-components=1 \ && rm qbittorrent.tar.gz* \ - && cd /usr/src/qbittorrent/src/app \ - && cp /tmp/patches/main.patch /usr/src/qbittorrent/src/app \ - && patch -i /usr/src/qbittorrent/src/app/main.patch \ + && EXECINFO=$(grep -rne 'include ' /usr/src/qbittorrent/src/app/main.cpp | grep -Eo '^[^:]+') \ + && sed -i "$(EXECINFO)s/.*/" /usr/src/qbittorrent/src/app/main.cpp \ + && STACKTRACE=$(grep -rne 'include "stacktrace.h"' /usr/src/qbittorrent/src/app/main.cpp | grep -Eo '^[^:]+') \ + && sed -i "$(STACKTRACE)s/.*/" /usr/src/qbittorrent/src/app/main.cpp \ && cd /usr/src/qbittorrent/ \ && ./configure --disable-gui --prefix=/usr \ && make -j$(nproc) \