From 19fa9ee60dea6fa308db014927013a9f3741e158 Mon Sep 17 00:00:00 2001 From: stickz Date: Fri, 29 Nov 2024 11:59:09 -0500 Subject: [PATCH] dumptorrent: Add software for ruTorrent v5.1 plugin This commit adds required software for the new dump plugin on ruTorrent v5.1. --- Dockerfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ba58ffc..db5860d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ ARG MKTORRENT_VERSION=v1.1 +ARG DUMP_TORRENT_VERSION=302ac444a20442edb4aeabef65b264a85ab88ce9 # Create src image to retreive source files FROM alpine:3.20 AS src -RUN apk --update --no-cache add curl git tar tree xz +RUN apk --update --no-cache add curl git tar sed tree xz WORKDIR /src # Retreive source files for mktorrent @@ -11,6 +12,14 @@ RUN git init . && git remote add origin "https://github.com/pobrn/mktorrent.git" ARG MKTORRENT_VERSION RUN git fetch origin "${MKTORRENT_VERSION}" && git checkout -q FETCH_HEAD +# Retreive source files for dumptorrent. Repair build for alpine Linux. +FROM src AS src-dump-torrent +RUN git init . && git remote add origin "https://github.com/TheGoblinHero/dumptorrent.git" +ARG DUMP_TORRENT_VERSION +RUN git fetch origin "${DUMP_TORRENT_VERSION}" && git checkout -q FETCH_HEAD +RUN sed -i '1i #include ' scrapec.c +RUN rm -rf .git* + FROM alpine:3.20 AS builder ENV DIST_PATH="/dist" @@ -40,6 +49,13 @@ RUN make install -j$(nproc) RUN make DESTDIR=${DIST_PATH} install -j$(nproc) RUN tree ${DIST_PATH} +# Build and install dump torrent for ruTorrent plugin +WORKDIR /usr/local/src/dump-torrent +COPY --from=src-dump-torrent /src . +RUN make dumptorrent -j$(nproc) +RUN cp dumptorrent ${DIST_PATH}/usr/local/bin +RUN tree ${DIST_PATH} + FROM alpine:3.20 LABEL description="rutorrent based on alpinelinux" \