Skip to content

Commit cb96074

Browse files
committed
Add misc build for cc65
0 parents  commit cb96074

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu:18.04
2+
MAINTAINER Matt Godbolt <[email protected]>
3+
4+
ARG DEBIAN_FRONTEND=noninteractive
5+
RUN apt update -y -q && apt upgrade -y -q && apt update -y -q && \
6+
apt install -y -q \
7+
curl \
8+
make \
9+
gcc \
10+
git \
11+
s3cmd \
12+
xz-utils
13+
14+
RUN mkdir -p /root
15+
COPY build /root/
16+
17+
WORKDIR /root

build/buildcc65.sh

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
VERSION=$1
6+
if echo ${VERSION} | grep 'trunk'; then
7+
VERSION=trunk-$(date +%Y%m%d)
8+
BRANCH=master
9+
else
10+
BRANCH=V${VERSION}
11+
fi
12+
13+
OUTPUT=/root/cc65-${VERSION}.tar.xz
14+
S3OUTPUT=""
15+
if echo $2 | grep s3://; then
16+
S3OUTPUT=$2
17+
else
18+
OUTPUT=${2-/root/cc65-${VERSION}.tar.xz}
19+
fi
20+
21+
PREFIX=$(pwd)/prefix
22+
DIR=$(pwd)/cc65
23+
git clone --depth 1 -b ${BRANCH} https://github.com/cc65/cc65.git ${DIR}
24+
25+
make -C ${DIR} -j$(nproc)
26+
make -C ${DIR} PREFIX=${PREFIX} install
27+
28+
export XZ_DEFAULTS="-T 0"
29+
tar Jcf ${OUTPUT} --transform "s,^./,./cc65-${VERSION}/," -C ${PREFIX} .
30+
31+
if [[ ! -z "${S3OUTPUT}" ]]; then
32+
s3cmd put --rr ${OUTPUT} ${S3OUTPUT}
33+
fi

0 commit comments

Comments
 (0)