Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
beertje44 committed Jan 26, 2025
1 parent 0af60c2 commit d209b74
Showing 1 changed file with 0 additions and 62 deletions.
62 changes: 0 additions & 62 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,68 +37,6 @@ RUN \
make -j ${MAKE_JOBS} && \
install -v -m755 unrar /usr/bin/

#build nzbget
ADD ./nzbget nzbget
RUN \
echo "**** build nzbget ****" && \
mkdir -p /app/nzbget && \
mkdir -p /nzbget/build && \
cd /nzbget/build && \
cmake .. -DCMAKE_INSTALL_PREFIX=/app/nzbget && \
cmake --build . -j ${MAKE_JOBS} && \
cmake --install . && \
cmake --build . --target install-conf && \
mv /app/nzbget/bin/nzbget /app/nzbget/ && \
rm -rf /app/nzbget/bin/ && \
rm -rf /app/nzbget/etc/ && \
mv /app/nzbget/share/nzbget/webui /app/nzbget/ && \
cp /app/nzbget/share/nzbget/nzbget.conf /app/nzbget/webui/nzbget.conf.template && \
cp /nzbget/pubkey.pem /app/nzbget/pubkey.pem && \
curl -o /app/nzbget/cacert.pem -L "https://curl.se/ca/cacert.pem"

#change default configvalues
RUN \
sed -i \
-e "s|^MainDir=.*|MainDir=/downloads|g" \
-e "s|^ScriptDir=.*|ScriptDir=$\{MainDir\}/scripts|g" \
-e "s|^WebDir=.*|WebDir=$\{AppDir\}/webui|g" \
-e "s|^ConfigTemplate=.*|ConfigTemplate=$\{AppDir\}/webui/nzbget.conf.template|g" \
-e "s|^UnrarCmd=.*|UnrarCmd=unrar|g" \
-e "s|^SevenZipCmd=.*|SevenZipCmd=7z|g" \
-e "s|^CertStore=.*|CertStore=$\{AppDir\}/cacert.pem|g" \
-e "s|^CertCheck=.*|CertCheck=yes|g" \
-e "s|^DestDir=.*|DestDir=$\{MainDir\}/completed|g" \
-e "s|^InterDir=.*|InterDir=$\{MainDir\}/intermediate|g" \
-e "s|^LogFile=.*|LogFile=$\{MainDir\}/nzbget.log|g" \
-e "s|^AuthorizedIP=.*|AuthorizedIP=127.0.0.1|g" \
/app/nzbget/share/nzbget/nzbget.conf && \
mv /app/nzbget/share/nzbget/webui /app/nzbget/ && \
cp /app/nzbget/share/nzbget/nzbget.conf /app/nzbget/webui/nzbget.conf.template && \
ln -s /usr/bin/7z /app/nzbget/7za && \
ln -s /usr/bin/unrar /app/nzbget/unrar && \
cp /nzbget/pubkey.pem /app/nzbget/pubkey.pem && \
curl -o /app/nzbget/cacert.pem -L "https://curl.se/ca/cacert.pem" && \
echo "**** install unrar7 from source ****" && \
mkdir /tmp/unrar7 && \
curl -o /tmp/unrar7.tar.gz -L "https://www.rarlab.com/rar/unrarsrc-${UNRAR7_VERSION}.tar.gz" && \
tar xf /tmp/unrar7.tar.gz -C /tmp/unrar7 --strip-components=1 && \
cd /tmp/unrar7 && \
if [ "${UNRAR7_NATIVE}" != "true" ] && [ "${TARGETPLATFORM}" == "linux/amd64" ]; \
then sed -i "s|CXXFLAGS=-march=native|CXXFLAGS=-march=x86-64-v2|" makefile; fi && \
if [ "${UNRAR7_NATIVE}" != "true" ] && [ "${TARGETPLATFORM}" == "linux/arm64" ]; \
then sed -i "s|CXXFLAGS=-march=native|CXXFLAGS=-march=armv8-a+crypto+crc|" makefile; fi && \
if [ "${UNRAR7_NATIVE}" != "true" ] && [ "${TARGETPLATFORM}" == "linux/arm/v7" ]; \
then sed -i "s|CXXFLAGS=-march=native|CXXFLAGS=-march=armv7-a|" makefile; fi && \
make -j ${MAKE_JOBS} && \
install -v -m755 unrar /usr/bin/unrar7 && \
echo "**** install unrar6 from source ****" && \
mkdir /tmp/unrar6 && \
curl -o /tmp/unrar6.tar.gz -L "https://www.rarlab.com/rar/unrarsrc-${UNRAR6_VERSION}.tar.gz" && \
tar xf /tmp/unrar6.tar.gz -C /tmp/unrar6 --strip-components=1 && \
cd /tmp/unrar6 && \
make -j ${MAKE_JOBS} && \
install -v -m755 unrar /usr/bin/

#build nzbget
ADD ./ nzbget
RUN \
Expand Down

0 comments on commit d209b74

Please sign in to comment.