Skip to content

Commit

Permalink
Merge pull request #64 from bit-man/master
Browse files Browse the repository at this point in the history
Allows using rar other than in amd64
  • Loading branch information
zelon88 committed Mar 25, 2024
2 parents 73da016 + c50231c commit d923912
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Documentation/Build/Dockerfile
Expand Up @@ -73,9 +73,29 @@ RUN apt-get install -y libpng-dev
RUN apt-get install -y libzip-dev
RUN docker-php-ext-install gd zip
RUN apt-get install -y libreoffice-common default-jre libreoffice-java-common poppler-utils
RUN apt-get install -y clamav unoconv p7zip-full meshlab dia pandoc python3 zip unzip rar ffmpeg
RUN apt-get install -y clamav unoconv p7zip-full meshlab dia pandoc python3 zip unzip ffmpeg
RUN apt-get install -y xpdf mkisofs imagemagick meshlab tesseract-ocr tar

## arm64 rar install hack (rar CLI only available for x86/x64 from rar labs)

RUN DPKG_ARCH="$(dpkg --print-architecture)"; \
if [ "${DPKG_ARCH}" = "amd64" ]; then \
apt-get install -y rar \
else \
dpkg --add-architecture i386 && \
apt-get install qemu-user-static libc6-i386-cross libstdc++6-i386-cross wget -y && \
cp /usr/i686-linux-gnu/lib/libm.so.6 /lib && \
cp /usr/i686-linux-gnu/lib/libc.so.6 /lib && \
cp /usr/i686-linux-gnu/lib/libpthread.so.0 /lib && \
cp /usr/i686-linux-gnu/lib/ld-linux.so.2 /lib && \
cp /usr/i686-linux-gnu/lib/libstdc++.so.6 /lib && \
cp /usr/i686-linux-gnu/lib/libgcc_s.so.1 /lib && \
wget https://www.rarlab.com/rar/rarlinux-x32-700b3.tar.gz -O /tmp/rarlinux-x32-700b3.tar.gz && \
tar -zxvf /tmp/rarlinux-x32-700b3.tar.gz -C /tmp && \
cp HRConvert2/Documentation/Build/rar-arm64 /tmp/rar-arm64 && \
chmod +x /tmp/rar-arm64 && ln -s /tmp/rar-arm64 /usr/bin/rar; \
fi

# Copy required files.
RUN cp HRConvert2/Documentation/Build/php.ini /usr/local/etc/php.ini
RUN cp HRConvert2/index.html /var/www/html/index.html
Expand Down
3 changes: 3 additions & 0 deletions Documentation/Build/rar-arm64
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

qemu-i386-static /tmp/rar/rar $*

0 comments on commit d923912

Please sign in to comment.