@@ -41,6 +41,18 @@ RUN cd /opt \
4141 && ./appimagetool-x86_64.AppImage --appimage-extract \
4242 && mv squashfs-root appimagetool
4343
44+ # bionic ships with a too old meson version
45+ FROM ubuntu:focal AS pacmanbuilder
46+ ENV DEBIAN_FRONTEND=noninteractive
47+ RUN apt-get update \
48+ && apt-get install -y \
49+ git meson python3 python3-pip python3-setuptools python3-wheel ninja-build gcc pkg-config m4 libarchive-dev libssl-dev
50+ RUN cd /tmp \
51+ && git clone https://git.archlinux.org/pacman.git --depth=1 --branch=v5.2.2 2>&1 \
52+ && cd pacman \
53+ && meson setup builddir \
54+ && meson install -C builddir
55+
4456FROM dockercore/golang-cross:1.13.15 AS hover
4557
4658# Install dependencies via apt
@@ -56,6 +68,8 @@ RUN apt-get update \
5668 cpio git \
5769 # dependencies for linux-rpm
5870 rpm \
71+ # dependencies for linux-pkg
72+ fakeroot bsdtar \
5973 # dependencies for windows-msi
6074 wixl imagemagick \
6175 && rm -rf /var/lib/apt/lists/*
@@ -75,7 +89,19 @@ COPY --from=bomutilsbuilder /usr/bin/mkbom /usr/bin/mkbom
7589COPY --from=appimagebuilder /opt/appimagetool /opt/appimagetool
7690ENV PATH=/opt/appimagetool/usr/bin:$PATH
7791
78- # TODO: Add pacman pkg packaging
92+ COPY --from=pacmanbuilder /usr/bin/makepkg /usr/bin/makepkg
93+ COPY --from=pacmanbuilder /usr/bin/pacman /usr/bin/pacman
94+ COPY --from=pacmanbuilder /etc/makepkg.conf /etc/makepkg.conf
95+ COPY --from=pacmanbuilder /etc/pacman.conf /etc/pacman.conf
96+ COPY --from=pacmanbuilder /usr/share/makepkg /usr/share/makepkg
97+ COPY --from=pacmanbuilder /usr/share/pacman /usr/share/pacman
98+ COPY --from=pacmanbuilder /var/lib/pacman /var/lib/pacman
99+ COPY --from=pacmanbuilder /usr/lib/x86_64-linux-gnu/libalpm.so.12 /usr/lib/x86_64-linux-gnu/libalpm.so.12
100+ RUN ln -sf /bin/bash /usr/bin/bash
101+ RUN sed -i "s/OPTIONS=(strip /OPTIONS=(/g" /etc/makepkg.conf
102+ RUN sed -i "s/#XferCommand/XferCommand/g" /etc/pacman.conf
103+ # This makes makepkg believe we are not root. Bypassing the root check is ok, because we are in a container
104+ ENV EUID=1
79105
80106COPY --from=flutterbuilder /opt/flutter /opt/flutter
81107RUN ln -sf /opt/flutter/bin/flutter /usr/bin/flutter
0 commit comments