| 1 |
ARG BASE_IMAGE |
| 2 |
FROM ${BASE_IMAGE} |
| 3 |
MAINTAINER Cangjians (https://cangjie.pages.freedesktop.org/) |
| 4 |
|
| 5 |
# basic environment for building |
| 6 |
WORKDIR /usr/local/src/ibus-cangjie |
| 7 |
|
| 8 |
# copy source files to build |
| 9 |
COPY "." "./" |
| 10 |
|
| 11 |
# This is now needed to build the lib as distutils was removed from Python 3.12 |
| 12 |
RUN ./install_deps.py |
| 13 |
|
| 14 |
# build the library |
| 15 |
RUN ./autogen.sh --prefix=/usr && \ |
| 16 |
make && \ |
| 17 |
if grep -q ID_LIKE=debian /usr/lib/os-release; then \ |
| 18 |
make install pyexecdir=/usr/lib/python3/dist-packages; \ |
| 19 |
else \ |
| 20 |
make install; \ |
| 21 |
fi |