r-builds/builder/package.ubuntu-1804
Gábor Csárdi f5a104562e Use corrent DEB packages
Need gcc, g++, gfortran for R <= 4.2.x, and
gcc-8, g++-8, gofrtran-8 for R >= 4.3.0.
2023-02-02 07:44:27 -08:00

69 lines
1.3 KiB
Shell

#!/bin/bash
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
fi
# R 3.x requires PCRE1
pcre_lib='libpcre2-dev'
if [[ "${R_VERSION}" =~ ^3 ]]; then
pcre_lib='libpcre3-dev'
fi
cat <<EOF > /tmp/nfpm.yml
name: r-${R_VERSION}
version: 1
version_schema: none
section: universe/math
arch: $(dpkg --print-architecture)
priority: optional
maintainer: Posit Software, PBC <https://github.com/rstudio/r-builds>
description: |
GNU R statistical computation and graphics system
vendor: Posit Software, PBC
homepage: https://www.r-project.org
license: GPL-2
deb:
fields:
Bugs: https://github.com/rstudio/r-builds/issues
depends:
- ${gxx_package-g++}
- ${gcc_package-gcc}
- ${gfortran_package-gfortran}
- libbz2-dev
- libc6
- libcairo2
- libcurl4
- libglib2.0-0
- libgomp1
- libicu-dev
- libjpeg8
- liblzma-dev
- libopenblas-dev
- libpango-1.0-0
- libpangocairo-1.0-0
- libpaper-utils
- ${pcre_lib}
- libpng16-16
- libreadline7
- libtcl8.6
- libtiff5
- libtk8.6
- libx11-6
- libxt6
- make
- ucf
- unzip
- zip
- zlib1g-dev
contents:
- src: ${R_INSTALL_PATH}
dst: ${R_INSTALL_PATH}
EOF
nfpm package \
-f /tmp/nfpm.yml \
-p deb \
-t "/tmp/output/${OS_IDENTIFIER}"
export PKG_FILE=$(ls /tmp/output/${OS_IDENTIFIER}/r-${R_VERSION}*.deb | head -1)