Replace fpm with nFPM for all other platforms
This commit is contained in:
parent
92ef513670
commit
ef86564f8f
1 changed files with 350 additions and 301 deletions
|
|
@ -1,5 +1,7 @@
|
|||
if [[ ! -d /tmp/output/centos-8 ]]; then
|
||||
mkdir -p /tmp/output/centos-8
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||
fi
|
||||
|
||||
# R 3.x requires PCRE1
|
||||
|
|
@ -15,50 +17,56 @@ ln -s /usr/lib64/libopenblasp.so.0 /opt/R/${R_VERSION}/lib/R/lib/libRblas.so
|
|||
EOF
|
||||
|
||||
# create after-remove script to remove internal blas
|
||||
cat <<EOF >> /before-remove.sh
|
||||
cat <<EOF >> /after-remove.sh
|
||||
if [ -d /opt/R/${R_VERSION} ]; then
|
||||
rm -r /opt/R/${R_VERSION}
|
||||
fi
|
||||
EOF
|
||||
|
||||
fpm \
|
||||
-s dir \
|
||||
-t rpm \
|
||||
-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" \
|
||||
--after-install /post-install.sh \
|
||||
--after-remove /before-remove.sh \
|
||||
-p /tmp/output/centos-8/ \
|
||||
-d bzip2-devel \
|
||||
-d gcc \
|
||||
-d gcc-c++ \
|
||||
-d gcc-gfortran \
|
||||
-d libcurl-devel \
|
||||
-d libicu-devel \
|
||||
-d libSM \
|
||||
-d libtiff \
|
||||
-d libXmu \
|
||||
-d libXt \
|
||||
-d make \
|
||||
-d openblas-threads \
|
||||
-d pango \
|
||||
-d ${pcre_lib} \
|
||||
-d tcl \
|
||||
-d tk \
|
||||
-d unzip \
|
||||
-d which \
|
||||
-d xz-devel \
|
||||
-d zip \
|
||||
-d zlib-devel \
|
||||
/opt/R/${R_VERSION}
|
||||
cat <<EOF > /tmp/nfpm.yml
|
||||
name: R-${R_VERSION}
|
||||
version: 1
|
||||
version_schema: none
|
||||
release: 1
|
||||
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: GPLv2+
|
||||
depends:
|
||||
- bzip2-devel
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- gcc-gfortran
|
||||
- libcurl-devel
|
||||
- libicu-devel
|
||||
- libSM
|
||||
- libtiff
|
||||
- libXmu
|
||||
- libXt
|
||||
- make
|
||||
- openblas-threads
|
||||
- pango
|
||||
- ${pcre_lib}
|
||||
- tcl
|
||||
- tk
|
||||
- unzip
|
||||
- which
|
||||
- xz-devel
|
||||
- zip
|
||||
- zlib-devel
|
||||
contents:
|
||||
- src: /opt/R/${R_VERSION}
|
||||
dst: /opt/R/${R_VERSION}
|
||||
scripts:
|
||||
postinstall: /post-install.sh
|
||||
postremove: /after-remove.sh
|
||||
EOF
|
||||
|
||||
shopt -s extglob
|
||||
export PKG_FILE=$(ls /tmp/output/centos-8/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
||||
nfpm package \
|
||||
-f /tmp/nfpm.yml \
|
||||
-p rpm \
|
||||
-t "/tmp/output/${OS_IDENTIFIER}"
|
||||
|
||||
export PKG_FILE=$(ls /tmp/output/${OS_IDENTIFIER}/R-${R_VERSION}*.rpm | head -1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue