Add ubuntu 22.04 (jammy) support

This commit is contained in:
Joshua C. Forest 2022-02-03 14:19:41 -05:00
commit debfa03414
3 changed files with 84 additions and 1 deletions

View file

@ -1,4 +1,4 @@
PLATFORMS := ubuntu-1604 ubuntu-1804 ubuntu-2004 debian-9 debian-10 centos-7 centos-8 opensuse-42 opensuse-15 opensuse-152 opensuse-153
PLATFORMS := ubuntu-1604 ubuntu-1804 ubuntu-2004 ubuntu-2204 debian-9 debian-10 centos-7 centos-8 opensuse-42 opensuse-15 opensuse-152 opensuse-153
SLS_BINARY ?= ./node_modules/serverless/bin/serverless
deps:

View file

@ -0,0 +1,24 @@
FROM ubuntu:jammy
ENV OS_IDENTIFIER ubuntu-2204
RUN set -x \
&& sed -i "s|# deb-src|deb-src|g" /etc/apt/sources.list \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y libblas-dev libcurl4-openssl-dev libicu-dev liblapack-dev libpcre2-dev wget python3-pip ruby ruby-dev \
&& apt-get build-dep -y r-base
RUN pip3 install awscli
# Pin fpm to avoid git dependency in 1.12.0
RUN gem install fpm:1.11.0
RUN chmod 0777 /opt
# Override the default pager used by R
ENV PAGER /usr/bin/pager
COPY package.ubuntu-2004 /package.sh
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -0,0 +1,59 @@
#!/bin/bash
if [[ ! -d /tmp/output/ubuntu-2204 ]]; then
mkdir -p /tmp/output/ubuntu-2204
fi
# R 3.x requires PCRE1
pcre_lib='libpcre2-dev'
if [[ "${R_VERSION}" =~ ^3 ]]; then
pcre_lib='libpcre3-dev'
fi
fpm \
-s dir \
-t deb \
-v 1 \
-n R-${R_VERSION} \
--vendor "RStudio, PBC" \
--deb-priority "optional" \
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
--url "http://www.r-project.org/" \
--description "GNU R statistical computation and graphics system" \
--maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \
--license "GPL-2" \
-p /tmp/output/ubuntu-2204/ \
-d g++ \
-d gcc \
-d gfortran \
-d libbz2-dev \
-d libblas-dev \
-d libc6 \
-d libcairo2 \
-d libcurl4 \
-d libglib2.0-0 \
-d libgomp1 \
-d libicu-dev \
-d libjpeg8 \
-d liblapack-dev \
-d liblzma-dev \
-d libpango-1.0-0 \
-d libpangocairo-1.0-0 \
-d libpaper-utils \
-d ${pcre_lib} \
-d libpng16-16 \
-d libreadline8 \
-d libtcl8.6 \
-d libtiff5 \
-d libtk8.6 \
-d libx11-6 \
-d libxt6 \
-d make \
-d ucf \
-d unzip \
-d zip \
-d zlib1g-dev \
/opt/R/${R_VERSION}
shopt -s extglob
export PKG_FILE=$(ls /tmp/output/ubuntu-2204/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)