enable or disable plugins with build args

This commit is contained in:
ezkrg
2019-08-28 13:28:30 +02:00
parent f0e3afa97f
commit de67477be5

View File

@@ -1,5 +1,15 @@
FROM alpine:3.10 FROM alpine:3.10
ARG FACEBOOK=1
ARG STEAM=1
ARG SKYPEWEB=1
ARG TELEGRAM=1
ARG HANGOUTS=1
ARG SLACK=1
ARG SIPE=1
ARG DISCORD=1
ARG ROCKETCHAT=1
ENV BITLBEE_VERSION 3.6 ENV BITLBEE_VERSION 3.6
ENV FACEBOOK_VERSION v1.2.0 ENV FACEBOOK_VERSION v1.2.0
ENV STEAM_VERSION a6444d2 ENV STEAM_VERSION a6444d2
@@ -56,51 +66,51 @@ RUN addgroup -g 101 -S bitlbee \
&& make \ && make \
&& make install \ && make install \
&& make install-dev \ && make install-dev \
&& cd /tmp \ && if [ ${FACEBOOK} -eq 1 ]; then cd /tmp \
&& git clone https://github.com/bitlbee/bitlbee-facebook.git \ && git clone https://github.com/bitlbee/bitlbee-facebook.git \
&& cd bitlbee-facebook \ && cd bitlbee-facebook \
&& git checkout ${FACEBOOK_VERSION} \ && git checkout ${FACEBOOK_VERSION} \
&& ./autogen.sh \ && ./autogen.sh \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/bitlbee/facebook.so \ && strip /usr/lib/bitlbee/facebook.so; fi \
&& cd /tmp \ && if [ ${STEAM} -eq 1 ]; then cd /tmp \
&& git clone https://github.com/bitlbee/bitlbee-steam.git \ && git clone https://github.com/bitlbee/bitlbee-steam.git \
&& cd bitlbee-steam \ && cd bitlbee-steam \
&& git checkout ${STEAM_VERSION} \ && git checkout ${STEAM_VERSION} \
&& ./autogen.sh --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl \ && ./autogen.sh --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/bitlbee/steam.so \ && strip /usr/lib/bitlbee/steam.so; fi \
&& cd /tmp \ && if [ ${SKYPEWEB} -eq 1 ]; then cd /tmp \
&& git clone git://github.com/EionRobb/skype4pidgin.git \ && git clone git://github.com/EionRobb/skype4pidgin.git \
&& cd skype4pidgin/skypeweb \ && cd skype4pidgin/skypeweb \
&& git checkout ${SKYPEWEB_VERSION} \ && git checkout ${SKYPEWEB_VERSION} \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/purple-2/libskypeweb.so \ && strip /usr/lib/purple-2/libskypeweb.so; fi \
&& cd /tmp \ && if [ ${TELEGRAM} -eq 1 ]; then cd /tmp \
&& git clone --recursive https://github.com/majn/telegram-purple \ && git clone --recursive https://github.com/majn/telegram-purple \
&& cd telegram-purple \ && cd telegram-purple \
&& git checkout ${TELEGRAM_VERSION} \ && git checkout ${TELEGRAM_VERSION} \
&& ./configure --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl \ && ./configure --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/purple-2/telegram-purple.so \ && strip /usr/lib/purple-2/telegram-purple.so; fi \
&& cd /tmp \ && if [ ${HANGOUTS} -eq 1 ]; then cd /tmp \
&& hg clone https://bitbucket.org/EionRobb/purple-hangouts -r ${HANGOUTS_VERSION} \ && hg clone https://bitbucket.org/EionRobb/purple-hangouts -r ${HANGOUTS_VERSION} \
&& cd purple-hangouts \ && cd purple-hangouts \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/purple-2/libhangouts.so \ && strip /usr/lib/purple-2/libhangouts.so; fi \
&& cd /tmp \ && if [ ${SLACK} -eq 1 ]; then cd /tmp \
&& git clone https://github.com/dylex/slack-libpurple.git \ && git clone https://github.com/dylex/slack-libpurple.git \
&& cd slack-libpurple \ && cd slack-libpurple \
&& git checkout ${SLACK_VERSION} \ && git checkout ${SLACK_VERSION} \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/purple-2/libslack.so \ && strip /usr/lib/purple-2/libslack.so; fi \
&& cd /tmp \ && if [ ${SIPE} -eq 1 ]; then cd /tmp \
&& git clone https://github.com/tieto/sipe.git \ && git clone https://github.com/tieto/sipe.git \
&& cd sipe \ && cd sipe \
&& git checkout ${SIPE_VERSION} \ && git checkout ${SIPE_VERSION} \
@@ -108,8 +118,8 @@ RUN addgroup -g 101 -S bitlbee \
&& ./configure --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --prefix=/usr \ && ./configure --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --prefix=/usr \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/purple-2/libsipe.so \ && strip /usr/lib/purple-2/libsipe.so; fi \
&& cd /tmp \ && if [ ${DISCORD} -eq 1 ]; then cd /tmp \
&& git clone https://github.com/sm00th/bitlbee-discord.git \ && git clone https://github.com/sm00th/bitlbee-discord.git \
&& cd bitlbee-discord \ && cd bitlbee-discord \
&& git checkout ${DISCORD_VERSION} \ && git checkout ${DISCORD_VERSION} \
@@ -117,13 +127,13 @@ RUN addgroup -g 101 -S bitlbee \
&& ./configure --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --prefix=/usr \ && ./configure --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --prefix=/usr \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/bitlbee/discord.so \ && strip /usr/lib/bitlbee/discord.so; fi \
&& cd /tmp \ && if [ ${ROCKETCHAT} -eq 1 ]; then cd /tmp \
&& hg clone https://bitbucket.org/EionRobb/purple-rocketchat -r ${ROCKETCHAT_VERSION} \ && hg clone https://bitbucket.org/EionRobb/purple-rocketchat -r ${ROCKETCHAT_VERSION} \
&& cd purple-rocketchat \ && cd purple-rocketchat \
&& make \ && make \
&& make install \ && make install \
&& strip /usr/lib/purple-2/librocketchat.so \ && strip /usr/lib/purple-2/librocketchat.so; fi \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& rm -rf /usr/include/bitlbee \ && rm -rf /usr/include/bitlbee \
&& rm -f /usr/lib/pkgconfig/bitlbee.pc \ && rm -f /usr/lib/pkgconfig/bitlbee.pc \