Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cache
.DS_Store
out/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ $ docker build -t my-user/mono-builder cedar-14/.
To build and upload new Mono version:

```term
$ docker run -v ${PWD}/cache:/var/cache -v ${PWD}/out:/var/out -e VERSION=4.4.2.11 -e STACK=cedar-14 my-user/mono-builder
$ docker run -v ${PWD}/cache:/var/cache -v ${PWD}/out:/var/out -e VERSION=5.4.1.6 -e STACK=cedar-14 my-user/mono-builder
```
14 changes: 1 addition & 13 deletions cedar-14/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
FROM heroku/cedar:14
FROM fsharp:4.1.28
MAINTAINER ademar

RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

RUN echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/5.4 main" > /etc/apt/sources.list.d/mono-xamarin.list \
&& apt-get update \
&& apt-get install -y mono-devel ca-certificates-mono mono-vbnc \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get -q update
RUN apt-get -q -y install curl gcc g++ make wget unzip git autoconf pkg-config libtool automake build-essential mono-devel gettext


COPY build build
RUN chmod +x build
CMD ./build
57 changes: 2 additions & 55 deletions cedar-14/build
Original file line number Diff line number Diff line change
@@ -1,61 +1,8 @@
#!/usr/bin/env bash

set -e

CACHE_DIR="/var/cache/mono-$VERSION"

if [ ! -d "$CACHE_DIR" ]; then
git clone --recursive --depth 1 --branch mono-$VERSION https://github.com/mono/mono.git $CACHE_DIR
fi

rsync -r $CACHE_DIR . --exclude .git
cd mono-$VERSION

./autogen.sh
./configure --prefix=/app/mono \
--disable-moonlight --disable-nls --enable-minimal=aot,profiler,debug,logging \
--disable-libraries --disable-boehm --with-mcs-docs=no \
--with-profile2=no
make && make install

echo "Mono build completed"

cd ..
echo "Install fsharp"
git clone https://github.com/fsharp/fsharp
cd fsharp
export PATH=/app/mono/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/app/mono/lib/
export PKG_CONFIG_PATH=/app/mono/lib/pkgconfig/
echo "Run autogen"
./autogen.sh --prefix=/app/mono
echo "Run make"
make
echo "Run make install"
make install
echo "Fsharp installed"

cd ..
cd /app
ls -al

echo "Delete EntityFramework et al"

rm -rf mono/lib/mono/gac/EntityFramework* \
mono/lib/mono/gac/System.Data.Entity

echo "Delete *.mdb"

find . -name "*.mdb" -delete
find mono -name *Entity* -delete
find mono -name sqlmetal.exe -delete

echo "Running strip"

find mono | xargs strip || true

echo "Building archive"

mkdir mono
cp -r /usr/* mono/
MONO_ARCHIVE=mono-$VERSION.tar.gz
tar -zcf $MONO_ARCHIVE mono
rm -rf /var/out/$MONO_ARCHIVE
Expand Down