Skip to content

Commit 7d1bb5e

Browse files
Minimal Dockerfile with latest purple-gowhatsapp and tdlib-purple (#502)
--------- Co-authored-by: vitalyster <[email protected]>
1 parent c3a93c5 commit 7d1bb5e

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,12 @@ jobs:
9292
set PATH=%PATH%;%cd%\deps32\bin
9393
cd tests\libtransport\RelWithDebInfo
9494
libtransport_test
95+
96+
linux-debian:
97+
runs-on: ubuntu-latest
98+
99+
steps:
100+
- uses: actions/checkout@v4
101+
102+
- name: Build from Dockerfile\.trixie
103+
run: docker build -f Dockerfile\.trixie -t spectrum:trixie \.

Dockerfile.trixie

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
FROM debian:trixie as base
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
ARG APT_LISTCHANGES_FRONTEND=none
5+
6+
RUN apt-get update -qq
7+
RUN apt-get install --no-install-recommends -y dpkg-dev devscripts curl git
8+
#RUN echo "deb [signed-by=/etc/apt/trusted.gpg.d/spectrumim.gpg] https://packages.spectrum.im/spectrum2/ bullseye main" | tee -a /etc/apt/sources.list
9+
#RUN echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/spectrumim.gpg] https://packages.spectrum.im/spectrum2/ bullseye main" | tee -a /etc/apt/sources.list
10+
#RUN curl https://packages.spectrum.im/packages.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/spectrumim.gpg
11+
12+
RUN apt-get update -qq
13+
RUN apt-get install --no-install-recommends -y libminiupnpc-dev libnatpmp-dev spectrum2 libpurple-dev cmake libssl-dev
14+
COPY . spectrum2/
15+
16+
FROM base as staging
17+
18+
ARG DEBIAN_FRONTEND=noninteractive
19+
ARG APT_LISTCHANGES_FRONTEND=none
20+
21+
WORKDIR /spectrum2/packaging/debian/
22+
23+
RUN apt-get install --no-install-recommends -y libjson-glib-dev \
24+
graphicsmagick-imagemagick-compat libsecret-1-dev libnss3-dev \
25+
libwebp-dev libgcrypt20-dev libpng-dev libglib2.0-dev \
26+
libprotobuf-c-dev protobuf-c-compiler libmarkdown2-dev libopusfile-dev build-essential
27+
28+
RUN echo "---> Installing purple-instagram" && \
29+
git clone https://github.com/EionRobb/purple-instagram.git && \
30+
cd purple-instagram && \
31+
make && \
32+
make DESTDIR=/tmp/out install
33+
34+
RUN echo "---> Installing icyque" && \
35+
git clone https://github.com/EionRobb/icyque.git && \
36+
cd icyque && \
37+
make && \
38+
make DESTDIR=/tmp/out install
39+
40+
RUN echo "---> Install Steam" && \
41+
git clone https://github.com/EionRobb/pidgin-opensteamworks.git && \
42+
cd pidgin-opensteamworks/steam-mobile && \
43+
make && \
44+
make DESTDIR=/tmp/out install
45+
46+
RUN echo "---> Install Teams" && \
47+
git clone https://github.com/EionRobb/purple-teams.git && \
48+
cd purple-teams && \
49+
make && \
50+
make DESTDIR=/tmp/out install
51+
RUN echo "---> Install Skypeweb" && \
52+
git clone https://github.com/EionRobb/skype4pidgin.git && \
53+
cd skype4pidgin/skypeweb && \
54+
make && \
55+
make DESTDIR=/tmp/out install
56+
57+
RUN echo "---> purple-gowhatsapp" && \
58+
apt-get -y install golang && \
59+
git clone https://github.com/hoehermann/purple-gowhatsapp.git && \
60+
cd purple-gowhatsapp && \
61+
git checkout v1.16.0 && \
62+
git submodule update --init && \
63+
cmake . && \
64+
make && \
65+
make DESTDIR=/tmp/out install
66+
67+
RUN echo "---> purple-battlenet" && \
68+
git clone --recursive https://github.com/EionRobb/purple-battlenet && \
69+
cd purple-battlenet && \
70+
make && \
71+
make DESTDIR=/tmp/out install
72+
73+
RUN echo "---> purple-hangouts" && \
74+
git clone --recursive https://github.com/EionRobb/purple-hangouts && \
75+
cd purple-hangouts && \
76+
make && \
77+
make DESTDIR=/tmp/out install
78+
79+
RUN echo "---> purple-mattermost" && \
80+
git clone --recursive https://github.com/EionRobb/purple-mattermost && \
81+
cd purple-mattermost && \
82+
make && \
83+
make DESTDIR=/tmp/out install
84+
85+
RUN echo "---> tdlib-purple" && \
86+
apt install -y gperf && \
87+
apt install -y gettext && \
88+
cd /tmp && ( git clone https://github.com/tdlib/td.git ; cd td && git checkout 8d08b34 && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd) .. && make && make install/strip ) && ( git clone -b tdlib-1.8.34 https://github.com/667bdrm/tdlib-purple.git ; mkdir -p tdlib-purple/build && cd tdlib-purple/build && cmake -DCMAKE_BUILD_TYPE=Release -DTd_DIR=/tmp/td/build/lib/cmake/Td/ -DNoVoip=1 .. && make install/strip DESTDIR=/tmp/out install)
89+
90+
FROM debian:trixie as production
91+
92+
EXPOSE 8080
93+
VOLUME ["/etc/spectrum2/transports", "/var/lib/spectrum2"]
94+
95+
RUN apt-get update -qq
96+
RUN apt-get install --no-install-recommends -y curl ca-certificates gnupg1 gpg gpg-agent
97+
98+
COPY --from=staging spectrum2/packaging/debian/*.deb /tmp/
99+
100+
101+
RUN echo "---> Installing libpurple plugins" && \
102+
DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y \
103+
purple-discord \
104+
libmarkdown2 \
105+
libogg0 libopusfile0 \
106+
nodejs \
107+
&& rm -rf /var/lib/apt/lists/*
108+
COPY --from=staging /tmp/out/* /usr/
109+
COPY --from=staging spectrum2/packaging/docker/run.sh /run.sh
110+
111+
RUN rm -rf /tmp/*.deb
112+
113+
ENTRYPOINT ["/run.sh"]

0 commit comments

Comments
 (0)