diff options
author | ezkrg <ezkrg@ezkrg.me> | 2019-08-28 11:28:30 +0000 |
---|---|---|
committer | ezkrg <ezkrg@ezkrg.me> | 2019-08-28 11:28:30 +0000 |
commit | de67477be53e70cf84f12127cc0a364bfc974585 (patch) | |
tree | 7237b68b6db7394732d08f57bd0b3c4520ddcb91 | |
parent | add missing versions (diff) | |
download | docker-bitlbee-libpurple-de67477be53e70cf84f12127cc0a364bfc974585.tar.gz docker-bitlbee-libpurple-de67477be53e70cf84f12127cc0a364bfc974585.zip |
enable or disable plugins with build args
-rw-r--r-- | Dockerfile | 46 |
1 files changed, 28 insertions, 18 deletions
@@ -1,5 +1,15 @@ 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 FACEBOOK_VERSION v1.2.0 ENV STEAM_VERSION a6444d2 @@ -56,51 +66,51 @@ RUN addgroup -g 101 -S bitlbee \ && make \ && make install \ && make install-dev \ - && cd /tmp \ + && if [ ${FACEBOOK} -eq 1 ]; then cd /tmp \ && git clone https://github.com/bitlbee/bitlbee-facebook.git \ && cd bitlbee-facebook \ && git checkout ${FACEBOOK_VERSION} \ && ./autogen.sh \ && make \ && make install \ - && strip /usr/lib/bitlbee/facebook.so \ - && cd /tmp \ + && strip /usr/lib/bitlbee/facebook.so; fi \ + && if [ ${STEAM} -eq 1 ]; then cd /tmp \ && git clone https://github.com/bitlbee/bitlbee-steam.git \ && cd bitlbee-steam \ && git checkout ${STEAM_VERSION} \ && ./autogen.sh --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl \ && make \ && make install \ - && strip /usr/lib/bitlbee/steam.so \ - && cd /tmp \ + && strip /usr/lib/bitlbee/steam.so; fi \ + && if [ ${SKYPEWEB} -eq 1 ]; then cd /tmp \ && git clone git://github.com/EionRobb/skype4pidgin.git \ && cd skype4pidgin/skypeweb \ && git checkout ${SKYPEWEB_VERSION} \ && make \ && make install \ - && strip /usr/lib/purple-2/libskypeweb.so \ - && cd /tmp \ + && strip /usr/lib/purple-2/libskypeweb.so; fi \ + && if [ ${TELEGRAM} -eq 1 ]; then cd /tmp \ && git clone --recursive https://github.com/majn/telegram-purple \ && cd telegram-purple \ && git checkout ${TELEGRAM_VERSION} \ && ./configure --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl \ && make \ && make install \ - && strip /usr/lib/purple-2/telegram-purple.so \ - && cd /tmp \ + && strip /usr/lib/purple-2/telegram-purple.so; fi \ + && if [ ${HANGOUTS} -eq 1 ]; then cd /tmp \ && hg clone https://bitbucket.org/EionRobb/purple-hangouts -r ${HANGOUTS_VERSION} \ && cd purple-hangouts \ && make \ && make install \ - && strip /usr/lib/purple-2/libhangouts.so \ - && cd /tmp \ + && strip /usr/lib/purple-2/libhangouts.so; fi \ + && if [ ${SLACK} -eq 1 ]; then cd /tmp \ && git clone https://github.com/dylex/slack-libpurple.git \ && cd slack-libpurple \ && git checkout ${SLACK_VERSION} \ && make \ && make install \ - && strip /usr/lib/purple-2/libslack.so \ - && cd /tmp \ + && strip /usr/lib/purple-2/libslack.so; fi \ + && if [ ${SIPE} -eq 1 ]; then cd /tmp \ && git clone https://github.com/tieto/sipe.git \ && cd sipe \ && 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 \ && make \ && make install \ - && strip /usr/lib/purple-2/libsipe.so \ - && cd /tmp \ + && strip /usr/lib/purple-2/libsipe.so; fi \ + && if [ ${DISCORD} -eq 1 ]; then cd /tmp \ && git clone https://github.com/sm00th/bitlbee-discord.git \ && cd bitlbee-discord \ && 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 \ && make \ && make install \ - && strip /usr/lib/bitlbee/discord.so \ - && cd /tmp \ + && strip /usr/lib/bitlbee/discord.so; fi \ + && if [ ${ROCKETCHAT} -eq 1 ]; then cd /tmp \ && hg clone https://bitbucket.org/EionRobb/purple-rocketchat -r ${ROCKETCHAT_VERSION} \ && cd purple-rocketchat \ && make \ && make install \ - && strip /usr/lib/purple-2/librocketchat.so \ + && strip /usr/lib/purple-2/librocketchat.so; fi \ && rm -rf /tmp/* \ && rm -rf /usr/include/bitlbee \ && rm -f /usr/lib/pkgconfig/bitlbee.pc \ |