Skip to content

Commit

Permalink
Merge pull request #296 from stickz/build-improvements
Browse files Browse the repository at this point in the history
Build fixes & improvements
  • Loading branch information
crazy-max committed Dec 22, 2023
2 parents 88ecf82 + 08e96e0 commit bbb3fbe
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,9 @@ RUN tree ${DIST_PATH}

WORKDIR /usr/local/src/xmlrpc
COPY --from=src-xmlrpc /src .
RUN ./configure \
--disable-wininet-client \
--disable-libwww-client
RUN make -j$(nproc)
RUN make install -j$(nproc) CXXFLAGS="-flto"
RUN ./configure --disable-wininet-client --disable-libwww-client --disable-cplusplus
RUN make -j$(nproc) CFLAGS="-w -O3 -flto" CXXFLAGS="-w -O3 -flto"
RUN make install -j$(nproc)
RUN make DESTDIR=${DIST_PATH} install -j$(nproc)
RUN tree ${DIST_PATH}

Expand All @@ -140,10 +138,9 @@ COPY --from=src-libtorrent /src .
COPY /patches/libtorrent .
RUN patch -p1 < throttle-fix-0.13.8.patch
RUN ./autogen.sh
RUN ./configure \
--with-posix-fallocate
RUN make -j$(nproc)
RUN make install -j$(nproc) CXXFLAGS="-O2 -flto"
RUN ./configure --with-posix-fallocate
RUN make -j$(nproc) CXXFLAGS="-w -O3 -flto"
RUN make install -j$(nproc)
RUN make DESTDIR=${DIST_PATH} install -j$(nproc)
RUN tree ${DIST_PATH}

Expand All @@ -157,17 +154,15 @@ RUN patch -p1 < lockfile-fix.patch \
&& patch -p1 < xmlrpc-fix.patch \
&& patch -p1 < xmlrpc-logic-fix.patch
RUN ./autogen.sh
RUN ./configure \
--with-xmlrpc-c \
--with-ncurses
RUN make -j$(nproc) CXXFLAGS="-O2 -flto"
RUN ./configure --with-xmlrpc-c --with-ncurses
RUN make -j$(nproc) CXXFLAGS="-w -O3 -flto"
RUN make install -j$(nproc)
RUN make DESTDIR=${DIST_PATH} install -j$(nproc)
RUN tree ${DIST_PATH}

WORKDIR /usr/local/src/mktorrent
COPY --from=src-mktorrent /src .
RUN make -j$(nproc)
RUN make -j$(nproc) CC=gcc CFLAGS="-w -O3 -flto"
RUN make install -j$(nproc)
RUN make DESTDIR=${DIST_PATH} install -j$(nproc)
RUN tree ${DIST_PATH}
Expand Down

0 comments on commit bbb3fbe

Please sign in to comment.