ghcup-hs/.gitlab/before_script/linux/alpine/install_deps.sh

67 lines
1.7 KiB
Bash
Raw Normal View History

2020-04-19 15:00:05 +00:00
#!/bin/sh
set -eux
2020-04-19 17:23:54 +00:00
. "$( cd "$(dirname "$0")" ; pwd -P )/../../../ghcup_env"
2020-05-01 14:27:27 +00:00
mkdir -p "${TMPDIR}"
2020-04-19 15:00:05 +00:00
apk add --no-cache \
curl \
gcc \
g++ \
gmp-dev \
ncurses-dev \
libffi-dev \
make \
xz \
tar \
2020-04-19 17:23:54 +00:00
perl
2020-07-06 20:39:16 +00:00
ln -sf libncurses.so /usr/lib/libtinfo.so
ln -sf libncursesw.so.6 /usr/lib/libtinfow.so.6
ln -sf libtinfow.so.6 /usr/lib/libtinfow.so
2020-04-19 17:23:54 +00:00
if [ "${BIT}" = "32" ] ; then
2020-07-06 20:39:16 +00:00
curl -sSfL https://downloads.haskell.org/~ghcup/0.1.5/i386-linux-ghcup-0.1.5 > ./ghcup-bin
2020-04-19 17:23:54 +00:00
else
2020-07-06 20:39:16 +00:00
curl -sSfL https://downloads.haskell.org/~ghcup/0.1.5/x86_64-linux-ghcup-0.1.5 > ./ghcup-bin
2020-04-19 17:23:54 +00:00
fi
chmod +x ghcup-bin
./ghcup-bin upgrade
./ghcup-bin install ${GHC_VERSION}
# ./ghcup-bin install-cabal ${CABAL_VERSION}
# install cabal-3.2.0.0
if [ "${BIT}" = "32" ] ; then
curl -sSfL -o cabal-install-3.2.0.0-i386-alpine-linux-musl.tar.xz 'https://hasufell.de/d/d3e215db133e4fcaa61e/files/?p=/cabal-install-3.2.0.0-i386-alpine-linux-musl.tar.xz&dl=1'
tar xf cabal-install-3.2.0.0-i386-alpine-linux-musl.tar.xz
cp cabal-install-3.2.0.0-i386-alpine-linux-musl "${GHCUP_INSTALL_BASE_PREFIX}/.ghcup/bin/cabal"
else
curl -sSfL -o cabal-install-3.2.0.0-x86_64-alpine-linux-musl.tar.xz 'https://hasufell.de/d/d3e215db133e4fcaa61e/files/?p=/cabal-install-3.2.0.0-x86_64-alpine-linux-musl.tar.xz&dl=1'
tar xf cabal-install-3.2.0.0-x86_64-alpine-linux-musl.tar.xz
cp cabal-install-3.2.0.0-x86_64-alpine-linux-musl "${GHCUP_INSTALL_BASE_PREFIX}/.ghcup/bin/cabal"
fi
chmod +x "${GHCUP_INSTALL_BASE_PREFIX}/.ghcup/bin/cabal"
2020-04-19 15:00:05 +00:00
# utils
apk add --no-cache \
2020-04-27 19:55:35 +00:00
bash \
git
2020-04-19 15:00:05 +00:00
## Package specific
apk add --no-cache \
zlib \
zlib-dev \
zlib-static \
gmp \
gmp-dev \
openssl-dev \
openssl-libs-static \
xz \
2020-07-06 20:39:16 +00:00
xz-dev \
ncurses-static
2020-04-19 15:00:05 +00:00
2020-07-06 20:39:16 +00:00
ln -sf libncursesw.a /usr/lib/libtinfow.a
2020-04-19 15:00:05 +00:00