#!/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 < /tmp/nfpm.yml name: r-${R_VERSION} version: 1 version_schema: none section: universe/math priority: optional arch: $(dpkg --print-architecture) maintainer: Posit Software, PBC 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: - g++ - gcc - gfortran - libbz2-dev - libc6 - libcairo2 - libcurl4 - libglib2.0-0 - libgomp1 - libicu-dev - libjpeg8 - libopenblas-dev - liblzma-dev - libpango-1.0-0 - libpangocairo-1.0-0 - libpaper-utils - ${pcre_lib} - libpng16-16 - libreadline8 - 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)