diff options
author | ezkrg <ezkrg@ezkrg.me> | 2022-04-07 16:09:53 +0000 |
---|---|---|
committer | ezkrg <ezkrg@ezkrg.me> | 2022-04-07 16:09:53 +0000 |
commit | b77710328a2fc8808eed79109f702a3213b182dd (patch) | |
tree | 8eec21f70991fdab3d2011e06140d7d358519548 /Dockerfile | |
parent | update whatsapp to whatsmeow (diff) | |
download | docker-bitlbee-libpurple-b77710328a2fc8808eed79109f702a3213b182dd.tar.gz docker-bitlbee-libpurple-b77710328a2fc8808eed79109f702a3213b182dd.zip |
update telegram to tdlib
Diffstat (limited to '')
-rw-r--r-- | Dockerfile | 34 | ||||
-rw-r--r-- | Dockerfile.debian | 35 |
2 files changed, 48 insertions, 21 deletions
@@ -110,17 +110,31 @@ ARG TELEGRAM_VERSION RUN echo TELEGRAM=${TELEGRAM} > /tmp/status \ && if [ ${TELEGRAM} -eq 1 ]; \ then cd /tmp \ - && git clone -n https://github.com/majn/telegram-purple \ - && cd telegram-purple \ + && apk add --update --no-cache cmake gperf \ + && git clone -n https://github.com/ars3niy/tdlib-purple.git \ + && cd tdlib-purple \ && git checkout ${TELEGRAM_VERSION} \ - && git submodule update --init --recursive \ - && ./configure \ + && TDLIB_REQ_VERSION=$(grep -o "tdlib version.*" CMakeLists.txt| tail -1 | awk '{print $3}') \ + && cd /tmp \ + && git clone -n https://github.com/tdlib/td.git tdlib \ + && cd tdlib \ + && TDLIB_VERSION=$(git log --pretty=format:"%h%x09%s" | grep "Update version to ${TDLIB_REQ_VERSION}" | awk '{print $1}') \ + && git checkout ${TDLIB_VERSION} \ + && mkdir build \ + && cd build \ + && cmake -DCMAKE_BUILD_TYPE=Release .. \ + && make \ + && make install \ + && cd /tmp/tdlib-purple \ + && mkdir build \ + && cd build \ + && cmake -DTd_DIR=/usr/local/lib/cmake/Td -DNoLottie=True -DNoVoip=True .. \ && make \ && make install \ - && strip /usr/lib/purple-2/telegram-purple.so; \ + && strip /usr/lib/purple-2/libtelegram-tdlib.so; \ else mkdir -p /usr/lib/purple-2 \ - && ln -sf /nowhere /usr/lib/purple-2/telegram-purple.so \ - && ln -sf /nowhere /etc/telegram-purple \ + && ln -sf /nowhere /usr/lib/purple-2/libtelegram-tdlib.so \ + && ln -sf /nowhere /usr/local/share/metainfo/tdlib-purple.metainfo.xml \ && ln -sf /nowhere /usr/local/share/locale; \ fi @@ -347,8 +361,8 @@ COPY --from=steam-build /tmp/status /tmp/plugin/steam COPY --from=skypeweb-build /usr/lib/purple-2/libskypeweb.so /tmp/usr/lib/purple-2/libskypeweb.so COPY --from=skypeweb-build /tmp/status /tmp/plugin/skypeweb -COPY --from=telegram-build /usr/lib/purple-2/telegram-purple.so /tmp/usr/lib/purple-2/telegram-purple.so -COPY --from=telegram-build /etc/telegram-purple /tmp/etc/telegram-purple +COPY --from=telegram-build /usr/lib/purple-2/libtelegram-tdlib.so /tmp/usr/lib/purple-2/libtelegram-tdlib.so +COPY --from=telegram-build /usr/local/share/metainfo/tdlib-purple.metainfo.xml /tmp/usr/local/share/metainfo/tdlib-purple.metainfo.xml COPY --from=telegram-build /usr/local/share/locale /tmp/usr/local/share/locale COPY --from=telegram-build /tmp/status /tmp/plugin/telegram @@ -409,7 +423,7 @@ RUN addgroup -g 101 -S bitlbee \ || [ ${ROCKETCHAT} -eq 1 ] || [ ${MATRIX} -eq 1 ] || [ ${SIGNAL} -eq 1 ] \ || [ ${ICYQUE} -eq 1 ]; then PKGS="${PKGS} json-glib"; fi \ && if [ ${STEAM} -eq 1 ] || [ ${TELEGRAM} -eq 1 ] || [ ${MATRIX} -eq 1 ]; then PKGS="${PKGS} libgcrypt"; fi \ - && if [ ${TELEGRAM} -eq 1 ]; then PKGS="${PKGS} zlib libwebp libpng"; fi \ + && if [ ${TELEGRAM} -eq 1 ]; then PKGS="${PKGS} zlib libwebp libpng libstdc++ libgcc"; fi \ && if [ ${HANGOUTS} -eq 1 ] || [ ${SIGNAL} -eq 1 ]; then PKGS="${PKGS} protobuf-c"; fi \ && if [ ${SIGNAL} -eq 1 ]; then PKGS="${PKGS} libmagic"; fi \ && if [ ${SIPE} -eq 1 ]; then PKGS="${PKGS} libxml2"; fi \ diff --git a/Dockerfile.debian b/Dockerfile.debian index f6e2a33..950d7f5 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -111,18 +111,31 @@ RUN echo TELEGRAM=${TELEGRAM} > /tmp/status \ && if [ ${TELEGRAM} -eq 1 ]; \ then cd /tmp \ && apt-get update \ - && apt-get install -y --no-install-recommends zlib1g-dev libwebp-dev libpng-dev \ - && git clone -n https://github.com/majn/telegram-purple \ - && cd telegram-purple \ + && apt-get install -y --no-install-recommends cmake gperf libwebp-dev libpng-dev \ + && git clone -n https://github.com/ars3niy/tdlib-purple.git \ + && cd tdlib-purple \ && git checkout ${TELEGRAM_VERSION} \ - && git submodule update --init --recursive \ - && ./configure \ + && TDLIB_REQ_VERSION=$(grep -o "tdlib version.*" CMakeLists.txt| tail -1 | awk '{print $3}') \ + && cd /tmp \ + && git clone -n https://github.com/tdlib/td.git tdlib \ + && cd tdlib \ + && TDLIB_VERSION=$(git log --pretty=format:"%h%x09%s" | grep "Update version to ${TDLIB_REQ_VERSION}" | awk '{print $1}') \ + && git checkout ${TDLIB_VERSION} \ + && mkdir build \ + && cd build \ + && cmake -DCMAKE_BUILD_TYPE=Release .. \ + && make \ + && make install \ + && cd /tmp/tdlib-purple \ + && mkdir build \ + && cd build \ + && cmake -DTd_DIR=/usr/local/lib/cmake/Td -DNoLottie=True -DNoVoip=True .. \ && make \ && make install \ - && strip /usr/lib/purple-2/telegram-purple.so; \ + && strip /usr/lib/purple-2/libtelegram-tdlib.so; \ else mkdir -p /usr/lib/purple-2 \ - && ln -sf /nowhere /usr/lib/purple-2/telegram-purple.so \ - && ln -sf /nowhere /etc/telegram-purple \ + && ln -sf /nowhere /usr/lib/purple-2/libtelegram-tdlib.so \ + && ln -sf /nowhere /usr/local/share/metainfo/tdlib-purple.metainfo.xml \ && ln -sf /nowhere /usr/local/share/locale; \ fi @@ -390,8 +403,8 @@ COPY --from=steam-build /tmp/status /tmp/plugin/steam COPY --from=skypeweb-build /usr/lib/purple-2/libskypeweb.so /tmp/usr/lib/purple-2/libskypeweb.so COPY --from=skypeweb-build /tmp/status /tmp/plugin/skypeweb -COPY --from=telegram-build /usr/lib/purple-2/telegram-purple.so /tmp/usr/lib/purple-2/telegram-purple.so -COPY --from=telegram-build /etc/telegram-purple /tmp/etc/telegram-purple +COPY --from=telegram-build /usr/lib/purple-2/libtelegram-tdlib.so /tmp/usr/lib/purple-2/libtelegram-tdlib.so +COPY --from=telegram-build /usr/local/share/metainfo/tdlib-purple.metainfo.xml /tmp/usr/local/share/metainfo/tdlib-purple.metainfo.xml COPY --from=telegram-build /usr/local/share/locale /tmp/usr/local/share/locale COPY --from=telegram-build /tmp/status /tmp/plugin/telegram @@ -457,7 +470,7 @@ RUN groupadd -g 101 -r bitlbee \ || [ ${ROCKETCHAT} -eq 1 ] || [ ${MATRIX} -eq 1 ] || [ ${SIGNAL} -eq 1 ] \ || [ ${ICYQUE} -eq 1 ]; then PKGS="${PKGS} libjson-glib-1.0-0"; fi \ && if [ ${STEAM} -eq 1 ] || [ ${TELEGRAM} -eq 1 ] || [ ${MATRIX} -eq 1 ]; then PKGS="${PKGS} libgcrypt20"; fi \ - && if [ ${TELEGRAM} -eq 1 ]; then PKGS="${PKGS} zlib1g libwebp6 libpng16-16"; fi \ + && if [ ${TELEGRAM} -eq 1 ]; then PKGS="${PKGS} zlib1g libwebp6 libpng16-16 libstdc++6"; fi \ && if [ ${HANGOUTS} -eq 1 ] || [ ${SIGNAL} -eq 1 ]; then PKGS="${PKGS} libprotobuf-c1"; fi \ && if [ ${SIGNAL} -eq 1 ]; then PKGS="${PKGS} libmagic1"; fi \ && if [ ${SIPE} -eq 1 ]; then PKGS="${PKGS} libxml2"; fi \ |