For consistency with CentOS and SUSE, and to install packages that link against libR from source, like rJava. See `R CMD config --ldflags` and https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Compiling-against-the-R-library
59 lines
1.2 KiB
Shell
59 lines
1.2 KiB
Shell
#!/bin/bash
|
|
|
|
if [[ ! -d /tmp/output/debian-10 ]]; then
|
|
mkdir -p /tmp/output/debian-10
|
|
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/debian-10/ \
|
|
-d ca-certificates \
|
|
-d g++ \
|
|
-d gcc \
|
|
-d gfortran \
|
|
-d libbz2-dev \
|
|
-d libc6 \
|
|
-d libcairo2 \
|
|
-d libcurl4-openssl-dev \
|
|
-d libglib2.0-0 \
|
|
-d libgomp1 \
|
|
-d libicu-dev \
|
|
-d liblzma-dev \
|
|
-d libopenblas-dev \
|
|
-d libpango-1.0-0 \
|
|
-d libpangocairo-1.0-0 \
|
|
-d libpaper-utils \
|
|
-d ${pcre_lib} \
|
|
-d libpng16-16 \
|
|
-d libreadline7 \
|
|
-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/debian-10/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
|
|