This repository has been archived on 2020-04-21. You can view files and clone it, but cannot push or open issues or pull requests.
aegisub/Dockerfile
Simon Bruder 2d7c47b601
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Init
2020-04-20 22:01:17 +00:00

84 lines
3.2 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Installation instructions for ffi-experiments and DependencyControl adapted
# from FichteFolls AUR PKGBUILD:
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=aegisub-dependency-control
#
# Install DependenyControl: docker exec -it CONTAINER_ID cp -r /opt/aegisub/doc/aegisub/automation /home/aegisub/.aegisub/
FROM debian:testing as builder
RUN echo "deb-src http://deb.debian.org/debian testing main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get -y build-dep aegisub \
&& apt-get -y install \
git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth=1 https://github.com/TypesettingTools/Aegisub \
&& cd Aegisub \
&& autoreconf \
&& ./configure \
--prefix=/opt/aegisub/ \
--with-player-audio=PulseAudio \
&& make -j 4 \
&& make install
FROM debian:testing as dependency-control
RUN apt-get update \
&& apt-get -y install \
build-essential \
cmake \
git \
libcurl4-openssl-dev \
luarocks \
meson \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
RUN luarocks install moonscript
RUN git clone --depth=1 https://github.com/TypesettingTools/ffi-experiments \
&& cd ffi-experiments \
&& sed -i -e 's/\/bin\/sh/\/bin\/bash/' BuildLua.sh \
&& meson build \
&& ninja -C build all lua \
&& install -D -m644 build/bad-mutex/BadMutex.lua /usr/share/aegisub/automation/include/BM/BadMutex.lua \
&& install -D -m644 build/bad-mutex/libBadMutex.so /usr/share/aegisub/automation/include/BM/BadMutex/libBadMutex.so \
&& install -D -m644 build/download-manager/DownloadManager.lua /usr/share/aegisub/automation/include/DM/DownloadManager.lua \
&& install -D -m644 build/download-manager/libDownloadManager.so /usr/share/aegisub/automation/include/DM/DownloadManager/libDownloadManager.so \
&& install -D -m644 build/precise-timer/PreciseTimer.lua /usr/share/aegisub/automation/include/PT/PreciseTimer.lua \
&& install -D -m644 build/precise-timer/libPreciseTimer.so /usr/share/aegisub/automation/include/PT/PreciseTimer/libPreciseTimer.so \
&& install -D -m644 build/requireffi/requireffi.lua /usr/share/aegisub/automation/include/requireffi/requireffi.lua
RUN git clone https://github.com/TypesettingTools/DependencyControl \
&& cd DependencyControl \
&& git checkout $(git tag|tail -n 1) \
&& install -d /usr/share/aegisub/automation/include/l0 \
&& cp -r modules/* /usr/share/aegisub/automation/include/l0 \
&& install -D -m 644 macros/* -t /usr/share/aegisub/automation/autoload
FROM debian:testing
RUN apt-get update \
&& apt-get -y install \
aegisub \
ffmpeg \
libcurl4 \
libuchardet0 \
luarocks \
&& apt-get -y purge aegisub \
&& rm -rf /var/lib/apt/lists/*
RUN luarocks install luajson
COPY --from=builder /opt/aegisub/ /opt/aegisub/
COPY --from=dependency-control /usr/share/aegisub/automation/ /opt/aegisub/doc/aegisub/automation/
RUN adduser --disabled-password --gecos '' aegisub
USER aegisub
# Avoid permission erros by mounting font cache
RUN mkdir /home/aegisub/.cache/
ENTRYPOINT ["/opt/aegisub/bin/aegisub"]