Skip to content

Commit

Permalink
images: add lpm
Browse files Browse the repository at this point in the history
  • Loading branch information
takase1121 committed Nov 17, 2024
1 parent 5e03058 commit ea4fb03
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ It is based on manylinux_2014 with some workarounds to ensure libdecor support.
- `update-desktop-database` (in `/opt/appimagetool/bin`)
- `appstreamcli` (in `/opt/appimagetool/bin`)
- `zsyncmake` (in `/opt/appimagetool/bin`)
- `lpm` (in `/opt/lpm/bin`)

# GitHub Actions

Expand Down
28 changes: 28 additions & 0 deletions docker/Dockerfile-manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ ARG PYTHON_VERSION=cp311-cp311
# get TARGETARCH from buildx
ARG TARGETARCH

# lpm version to install
ARG LPM_VERSION=v1.3.1

# use the manylinux built-in CPython
ENV PATH="/opt/python/$PYTHON_VERSION/bin:$PATH"

Expand Down Expand Up @@ -88,6 +91,31 @@ ENV APPIMAGE_EXTRACT_AND_RUN=1
# add appimagetool to PATH
ENV PATH="/opt/appimagetool/bin:$PATH"

# install lpm
RUN set -eux; \
arch=; \
case $TARGETARCH in \
'arm64') \
arch="aarch64"; \
;; \
'amd64') \
arch="x86_64"; \
;; \
'arm') \
arch="arm"; \
;; \
*) \
echo >&2 "error: Unsupported architecture $TARGETARCH"; \
exit 1; \
;; \
esac; \
mkdir -p /opt/lpm/bin; \
wget -O /opt/lpm/bin/lpm "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/${LPM_VERSION}/lpm.$arch-linux"; \
chmod +x /opt/lpm/bin/lpm

# add lpm to PATH
ENV PATH="/opt/lpm/bin:$PATH"

# pretend to have libdecor installed
RUN rpm -i --force --nodeps --ignorearch "https://pkgs.sysadmins.ws/el8/extras/x86_64/libdecor-devel-0.1.0-3.el8.x86_64.rpm" && \
touch /usr/lib64/libdecor-0.so /usr/lib64/libdecor-0.so.0 && \
Expand Down
31 changes: 28 additions & 3 deletions docker/Dockerfile-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ FROM ubuntu:18.04

ARG TARGETARCH

# lpm version to install
ARG LPM_VERSION=v1.3.1

# copy entrypoint into image
COPY entrypoint.sh /

Expand Down Expand Up @@ -59,9 +62,6 @@ RUN set -eux; \
'arm') \
arch="armhf"; \
;; \
'386') \
arch="i686"; \
;; \
*) \
echo >&2 "error: Unsupported architecture $TARGETARCH"; \
exit 1; \
Expand All @@ -80,6 +80,31 @@ ENV APPIMAGE_EXTRACT_AND_RUN=1
# add appimagetool to PATH
ENV PATH="/opt/appimagetool/bin:$PATH"

# install lpm
RUN set -eux; \
arch=; \
case $TARGETARCH in \
'arm64') \
arch="aarch64"; \
;; \
'amd64') \
arch="x86_64"; \
;; \
'arm') \
arch="arm"; \
;; \
*) \
echo >&2 "error: Unsupported architecture $TARGETARCH"; \
exit 1; \
;; \
esac; \
mkdir -p /opt/lpm/bin; \
wget -O /opt/lpm/bin/lpm "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/${LPM_VERSION}/lpm.$arch-linux"; \
chmod +x /opt/lpm/bin/lpm

# add lpm to PATH
ENV PATH="/opt/lpm/bin:$PATH"

# pretend to have libdecor
RUN wget "http://archive.ubuntu.com/ubuntu/pool/main/libd/libdecor-0/libdecor-0-dev_0.1.0-3build1_amd64.deb" && \
dpkg --force-all -i "libdecor-0-dev_0.1.0-3build1_amd64.deb" && \
Expand Down

0 comments on commit ea4fb03

Please sign in to comment.