fpm has had multiple Ruby gem dependency issues, and nfpm has better support for code signing if we wanted to do that in the future. The rest of the platforms may be migrated to nfpm later.
69 lines
1.3 KiB
Shell
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. On Debian 11, R 3.x also requires PCRE2 for Pango support.
|
|
pcre_libs='- libpcre2-dev'
|
|
if [[ "${R_VERSION}" =~ ^3 ]]; then
|
|
pcre_libs='- libpcre2-dev
|
|
- libpcre3-dev'
|
|
fi
|
|
|
|
cat <<EOF > /tmp/nfpm.yml
|
|
name: r-${R_VERSION}
|
|
version: 1
|
|
version_schema: none
|
|
section: gnu-r
|
|
priority: optional
|
|
maintainer: RStudio, PBC <https://github.com/rstudio/r-builds>
|
|
description: |
|
|
GNU R statistical computation and graphics system
|
|
vendor: RStudio, PBC
|
|
homepage: https://www.r-project.org
|
|
license: GPL-2
|
|
deb:
|
|
fields:
|
|
Bugs: https://github.com/rstudio/r-builds/issues
|
|
depends:
|
|
- ca-certificates
|
|
- g++
|
|
- gcc
|
|
- gfortran
|
|
- libbz2-dev
|
|
- libc6
|
|
- libcairo2
|
|
- libcurl4-openssl-dev
|
|
- libglib2.0-0
|
|
- libgomp1
|
|
- libicu-dev
|
|
- liblzma-dev
|
|
- libopenblas-dev
|
|
- libpango-1.0-0
|
|
- libpangocairo-1.0-0
|
|
- libpaper-utils
|
|
${pcre_libs}
|
|
- libpng16-16
|
|
- libreadline8
|
|
- libtcl8.6
|
|
- libtiff5
|
|
- libtk8.6
|
|
- libx11-6
|
|
- libxt6
|
|
- make
|
|
- ucf
|
|
- unzip
|
|
- zip
|
|
- zlib1g-dev
|
|
contents:
|
|
- src: /opt/R/${R_VERSION}
|
|
dst: /opt/R/${R_VERSION}
|
|
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)
|