2019-02-03 17:25:21 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
apk --no-cache add --virtual .synapse-build \
|
|
|
|
build-base \
|
|
|
|
git \
|
|
|
|
libevent-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libjpeg-turbo-dev \
|
|
|
|
libressl-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
linux-headers \
|
|
|
|
python3-dev \
|
2019-02-03 23:37:40 +01:00
|
|
|
yarn \
|
2019-02-03 17:25:21 +01:00
|
|
|
zlib-dev
|
|
|
|
|
|
|
|
pip3 install --upgrade pip setuptools
|
|
|
|
pip3 install https://github.com/matrix-org/synapse/tarball/master
|
|
|
|
|
2019-02-28 17:52:10 +01:00
|
|
|
IRC_DIR=/usr/lib/matrix-appservice-irc/
|
|
|
|
mkdir ${IRC_DIR}
|
|
|
|
cd ${IRC_DIR}
|
|
|
|
yarn add matrix-appservice-irc
|
|
|
|
ln -s ${IRC_DIR}/node_modules/matrix-appservice-irc/bin/matrix-appservice-irc /usr/local/bin/matrix-appservice-irc
|
2019-02-03 17:25:21 +01:00
|
|
|
|
|
|
|
apk del .synapse-build
|
|
|
|
|
|
|
|
# Runtime packages.
|
|
|
|
apk --no-cache add \
|
|
|
|
libjpeg-turbo \
|
|
|
|
libmagic \
|
|
|
|
libressl2.7-libssl \
|
|
|
|
nodejs \
|
|
|
|
python3
|
|
|
|
|
|
|
|
find /usr -name "__pycache__" -exec rm -rf {} +
|
|
|
|
find /usr -name "*.pyc" -exec rm {} +
|
2019-02-03 23:37:40 +01:00
|
|
|
find /usr -name "*yarn*" -exec rm -rf {} +
|
|
|
|
find / -name "*node-gyp*" -exec rm -rf {} +
|
|
|
|
|
|
|
|
apk del alpine-keys
|
|
|
|
|
|
|
|
rm -rf /etc/apk \
|
|
|
|
/root/.cache \
|
2019-02-03 17:25:21 +01:00
|
|
|
/root/.config \
|
|
|
|
/root/.npm \
|
2019-02-03 23:37:40 +01:00
|
|
|
/var/cache/*
|