Init
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Simon Bruder 2020-04-20 22:01:17 +00:00
commit 2d7c47b601
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
2 changed files with 96 additions and 0 deletions

13
.drone.yml Normal file
View file

@ -0,0 +1,13 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
registry: r.sbruder.de
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: r.sbruder.de/aegisub

83
Dockerfile Normal file
View file

@ -0,0 +1,83 @@
# 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"]