2021-03-13 07:53:00 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
PREFIX=$(realpath $(dirname $0))
|
|
|
|
|
2021-09-09 20:20:01 +02:00
|
|
|
mkdir -p build/mono build/mono-basic
|
2021-03-13 07:53:00 +01:00
|
|
|
cd build
|
|
|
|
|
|
|
|
curl "https://download.mono-project.com/sources/mono/mono-6.12.0.122.tar.xz" -o mono.tar.xz
|
2021-09-09 20:20:01 +02:00
|
|
|
curl -L "https://github.com/mono/mono-basic/archive/refs/tags/4.7.tar.gz" -o mono-basic.tar.gz
|
2021-03-13 07:53:00 +01:00
|
|
|
tar xf mono.tar.xz --strip-components=1 -C mono
|
2021-09-09 20:20:01 +02:00
|
|
|
tar xf mono-basic.tar.gz --strip-components=1 -C mono-basic
|
2021-03-13 07:53:00 +01:00
|
|
|
|
2021-09-09 20:20:01 +02:00
|
|
|
# Compiling Mono
|
2021-03-13 07:53:00 +01:00
|
|
|
cd mono
|
|
|
|
|
|
|
|
./configure --prefix "$PREFIX"
|
|
|
|
|
2021-09-09 20:20:01 +02:00
|
|
|
make -j$(nproc)
|
2021-03-13 07:53:00 +01:00
|
|
|
make install -j$(nproc)
|
|
|
|
|
2021-09-09 20:20:01 +02:00
|
|
|
export PATH="$PREFIX/bin:$PATH" # To be able to use mono commands
|
|
|
|
|
|
|
|
# Compiling mono-basic
|
|
|
|
cd ../mono-basic
|
|
|
|
./configure --prefix="$PREFIX"
|
|
|
|
|
|
|
|
make -j$(nproc) PLATFORM="linux" # Avoids conflict with the $PLATFORM variable we have
|
|
|
|
make install -j$(nproc) PLATFORM="linux"
|
|
|
|
|
|
|
|
# Remove redundant files
|
2021-03-13 07:53:00 +01:00
|
|
|
cd ../../
|
|
|
|
rm -rf build
|