Replace fpm with nFPM for all other platforms
This commit is contained in:
parent
92ef513670
commit
ef86564f8f
13 changed files with 350 additions and 301 deletions
|
|
@ -33,8 +33,6 @@ RUN yum -y update \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
readline-devel \
|
readline-devel \
|
||||||
rpm-build \
|
rpm-build \
|
||||||
ruby \
|
|
||||||
ruby-devel \
|
|
||||||
tcl-devel \
|
tcl-devel \
|
||||||
tex \
|
tex \
|
||||||
texinfo-tex \
|
texinfo-tex \
|
||||||
|
|
@ -51,8 +49,9 @@ RUN yum -y update \
|
||||||
RUN pip3 install awscli --upgrade --user && \
|
RUN pip3 install awscli --upgrade --user && \
|
||||||
ln -s /root/.local/bin/aws /usr/bin/aws
|
ln -s /root/.local/bin/aws /usr/bin/aws
|
||||||
|
|
||||||
# Pin fpm for compatibility with Ruby < 2.3
|
RUN curl -LO https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_amd64.rpm && \
|
||||||
RUN gem install ffi:1.12.2 fpm:1.11.0
|
yum install -y nfpm_amd64.rpm && \
|
||||||
|
rm nfpm_amd64.rpm
|
||||||
|
|
||||||
RUN chmod 0777 /opt
|
RUN chmod 0777 /opt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,6 @@ RUN dnf -y upgrade \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
readline-devel \
|
readline-devel \
|
||||||
rpm-build \
|
rpm-build \
|
||||||
ruby \
|
|
||||||
ruby-devel \
|
|
||||||
tcl-devel \
|
tcl-devel \
|
||||||
tex \
|
tex \
|
||||||
texinfo-tex \
|
texinfo-tex \
|
||||||
|
|
@ -52,8 +50,9 @@ RUN dnf -y upgrade \
|
||||||
RUN pip3 install awscli --upgrade --user \
|
RUN pip3 install awscli --upgrade --user \
|
||||||
&& ln -s /root/.local/bin/aws /usr/bin/aws
|
&& ln -s /root/.local/bin/aws /usr/bin/aws
|
||||||
|
|
||||||
# Pin fpm to avoid git dependency in 1.12.0
|
RUN curl -LO https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_amd64.rpm && \
|
||||||
RUN gem install fpm:1.11.0
|
dnf install -y nfpm_amd64.rpm && \
|
||||||
|
rm nfpm_amd64.rpm
|
||||||
|
|
||||||
RUN chmod 0777 /opt
|
RUN chmod 0777 /opt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,17 @@ RUN set -x \
|
||||||
&& export DEBIAN_FRONTEND=noninteractive \
|
&& export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& echo 'deb-src http://deb.debian.org/debian buster main' >> /etc/apt/sources.list \
|
&& echo 'deb-src http://deb.debian.org/debian buster main' >> /etc/apt/sources.list \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y gcc libcurl4-openssl-dev libicu-dev \
|
&& apt-get install -y curl gcc libcurl4-openssl-dev libicu-dev \
|
||||||
libopenblas-base libpcre2-dev make python3-pip ruby ruby-dev wget \
|
libopenblas-base libpcre2-dev make python3-pip wget \
|
||||||
&& apt-get build-dep -y r-base
|
&& apt-get build-dep -y r-base
|
||||||
|
|
||||||
RUN pip3 install awscli
|
RUN pip3 install awscli
|
||||||
|
|
||||||
RUN chmod 0777 /opt
|
RUN chmod 0777 /opt
|
||||||
|
|
||||||
# Pin fpm to avoid git dependency in 1.12.0
|
RUN curl -LO https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_amd64.deb && \
|
||||||
RUN gem install fpm:1.11.0
|
apt install -y ./nfpm_amd64.deb && \
|
||||||
|
rm nfpm_amd64.deb
|
||||||
|
|
||||||
# Override the default pager used by R
|
# Override the default pager used by R
|
||||||
ENV PAGER /usr/bin/pager
|
ENV PAGER /usr/bin/pager
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ RUN zypper --non-interactive update
|
||||||
RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
cairo-devel \
|
cairo-devel \
|
||||||
|
curl \
|
||||||
fdupes \
|
fdupes \
|
||||||
gcc \
|
gcc \
|
||||||
gcc-c++ \
|
gcc-c++ \
|
||||||
|
|
@ -41,8 +42,6 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
||||||
python-pip \
|
python-pip \
|
||||||
readline-devel \
|
readline-devel \
|
||||||
rpm-build \
|
rpm-build \
|
||||||
ruby \
|
|
||||||
ruby-devel \
|
|
||||||
shadow \
|
shadow \
|
||||||
tcl-devel \
|
tcl-devel \
|
||||||
texinfo \
|
texinfo \
|
||||||
|
|
@ -71,9 +70,9 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
||||||
|
|
||||||
RUN pip install awscli
|
RUN pip install awscli
|
||||||
|
|
||||||
# Pin fpm to avoid git dependency in 1.12.0
|
RUN curl -LO https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_amd64.rpm && \
|
||||||
RUN gem install fpm:1.11.0 && \
|
zypper --non-interactive --no-gpg-checks install nfpm_amd64.rpm && \
|
||||||
ln -s /usr/bin/fpm.ruby2.5 /usr/local/bin/fpm
|
rm nfpm_amd64.rpm
|
||||||
|
|
||||||
RUN chmod 0777 /opt
|
RUN chmod 0777 /opt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,14 @@ RUN set -x \
|
||||||
&& sed -i "s|# deb-src|deb-src|g" /etc/apt/sources.list \
|
&& sed -i "s|# deb-src|deb-src|g" /etc/apt/sources.list \
|
||||||
&& export DEBIAN_FRONTEND=noninteractive \
|
&& export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y libcurl4-openssl-dev libicu-dev libopenblas-base libpcre2-dev wget python-pip ruby ruby-dev \
|
&& apt-get install -y curl libcurl4-openssl-dev libicu-dev libopenblas-base libpcre2-dev wget python-pip \
|
||||||
&& apt-get build-dep -y r-base
|
&& apt-get build-dep -y r-base
|
||||||
|
|
||||||
RUN pip install awscli
|
RUN pip install awscli
|
||||||
|
|
||||||
# Pin fpm to avoid git dependency in 1.12.0
|
RUN curl -LO https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_amd64.deb && \
|
||||||
RUN gem install fpm:1.11.0
|
apt install -y ./nfpm_amd64.deb && \
|
||||||
|
rm nfpm_amd64.deb
|
||||||
|
|
||||||
RUN chmod 0777 /opt
|
RUN chmod 0777 /opt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,14 @@ RUN set -x \
|
||||||
&& sed -i "s|# deb-src|deb-src|g" /etc/apt/sources.list \
|
&& sed -i "s|# deb-src|deb-src|g" /etc/apt/sources.list \
|
||||||
&& export DEBIAN_FRONTEND=noninteractive \
|
&& export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y libblas-dev libcurl4-openssl-dev libicu-dev liblapack-dev libpcre2-dev wget python3-pip ruby ruby-dev \
|
&& apt-get install -y curl libblas-dev libcurl4-openssl-dev libicu-dev liblapack-dev libpcre2-dev wget python3-pip \
|
||||||
&& apt-get build-dep -y r-base
|
&& apt-get build-dep -y r-base
|
||||||
|
|
||||||
RUN pip3 install awscli
|
RUN pip3 install awscli
|
||||||
|
|
||||||
# Pin fpm to avoid git dependency in 1.12.0
|
RUN curl -LO https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_amd64.deb && \
|
||||||
RUN gem install fpm:1.11.0
|
apt install -y ./nfpm_amd64.deb && \
|
||||||
|
rm nfpm_amd64.deb
|
||||||
|
|
||||||
RUN chmod 0777 /opt
|
RUN chmod 0777 /opt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for packager script
|
# check for packager script
|
||||||
## If it exists this build is ready for packaging with fpm, so run the script
|
## If it exists this build is ready for packaging with nFPM, so run the script
|
||||||
## else do nothing
|
## else do nothing
|
||||||
package_r() {
|
package_r() {
|
||||||
if [[ -f /package.sh ]]; then
|
if [[ -f /package.sh ]]; then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ ! -d /tmp/output/centos-7 ]]; then
|
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||||
mkdir -p /tmp/output/centos-7
|
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# R 3.x requires PCRE1
|
# R 3.x requires PCRE1
|
||||||
|
|
@ -17,50 +17,56 @@ ln -s /usr/lib64/libopenblasp.so /opt/R/${R_VERSION}/lib/R/lib/libRblas.so
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# create after-remove script to remove internal blas
|
# 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
|
if [ -d /opt/R/${R_VERSION} ]; then
|
||||||
rm -r /opt/R/${R_VERSION}
|
rm -r /opt/R/${R_VERSION}
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fpm \
|
cat <<EOF > /tmp/nfpm.yml
|
||||||
-s dir \
|
name: R-${R_VERSION}
|
||||||
-t rpm \
|
version: 1
|
||||||
-v 1 \
|
version_schema: none
|
||||||
-n R-${R_VERSION} \
|
release: 1
|
||||||
--vendor "RStudio, PBC" \
|
maintainer: RStudio, PBC <https://github.com/rstudio/r-builds>
|
||||||
--deb-priority "optional" \
|
description: |
|
||||||
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
GNU R statistical computation and graphics system
|
||||||
--url "http://www.r-project.org/" \
|
vendor: RStudio, PBC
|
||||||
--description "GNU R statistical computation and graphics system" \
|
homepage: https://www.r-project.org
|
||||||
--maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \
|
license: GPLv2+
|
||||||
--license "GPL-2" \
|
depends:
|
||||||
--after-install /post-install.sh \
|
- bzip2-devel
|
||||||
--after-remove /before-remove.sh \
|
- gcc
|
||||||
-p /tmp/output/centos-7/ \
|
- gcc-c++
|
||||||
-d bzip2-devel \
|
- gcc-gfortran
|
||||||
-d gcc \
|
- libcurl-devel
|
||||||
-d gcc-c++ \
|
- libicu-devel
|
||||||
-d gcc-gfortran \
|
- libSM
|
||||||
-d libcurl-devel \
|
- libtiff
|
||||||
-d libicu-devel \
|
- libXmu
|
||||||
-d libSM \
|
- libXt
|
||||||
-d libtiff \
|
- make
|
||||||
-d libXmu \
|
- openblas-devel
|
||||||
-d libXt \
|
- pango
|
||||||
-d make \
|
- ${pcre_lib}
|
||||||
-d openblas-devel \
|
- tcl
|
||||||
-d pango \
|
- tk
|
||||||
-d ${pcre_lib} \
|
- unzip
|
||||||
-d tcl \
|
- which
|
||||||
-d tk \
|
- xz-devel
|
||||||
-d unzip \
|
- zip
|
||||||
-d which \
|
- zlib-devel
|
||||||
-d xz-devel \
|
contents:
|
||||||
-d zip \
|
- src: /opt/R/${R_VERSION}
|
||||||
-d zlib-devel \
|
dst: /opt/R/${R_VERSION}
|
||||||
/opt/R/${R_VERSION}
|
scripts:
|
||||||
|
postinstall: /post-install.sh
|
||||||
|
postremove: /after-remove.sh
|
||||||
|
EOF
|
||||||
|
|
||||||
shopt -s extglob
|
nfpm package \
|
||||||
export PKG_FILE=$(ls /tmp/output/centos-7/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
-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)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
if [[ ! -d /tmp/output/centos-8 ]]; then
|
#!/bin/bash
|
||||||
mkdir -p /tmp/output/centos-8
|
|
||||||
|
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||||
|
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# R 3.x requires PCRE1
|
# 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
|
EOF
|
||||||
|
|
||||||
# create after-remove script to remove internal blas
|
# 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
|
if [ -d /opt/R/${R_VERSION} ]; then
|
||||||
rm -r /opt/R/${R_VERSION}
|
rm -r /opt/R/${R_VERSION}
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fpm \
|
cat <<EOF > /tmp/nfpm.yml
|
||||||
-s dir \
|
name: R-${R_VERSION}
|
||||||
-t rpm \
|
version: 1
|
||||||
-v 1 \
|
version_schema: none
|
||||||
-n R-${R_VERSION} \
|
release: 1
|
||||||
--vendor "RStudio, PBC" \
|
maintainer: RStudio, PBC <https://github.com/rstudio/r-builds>
|
||||||
--deb-priority "optional" \
|
description: |
|
||||||
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
GNU R statistical computation and graphics system
|
||||||
--url "http://www.r-project.org/" \
|
vendor: RStudio, PBC
|
||||||
--description "GNU R statistical computation and graphics system" \
|
homepage: https://www.r-project.org
|
||||||
--maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \
|
license: GPLv2+
|
||||||
--license "GPL-2" \
|
depends:
|
||||||
--after-install /post-install.sh \
|
- bzip2-devel
|
||||||
--after-remove /before-remove.sh \
|
- gcc
|
||||||
-p /tmp/output/centos-8/ \
|
- gcc-c++
|
||||||
-d bzip2-devel \
|
- gcc-gfortran
|
||||||
-d gcc \
|
- libcurl-devel
|
||||||
-d gcc-c++ \
|
- libicu-devel
|
||||||
-d gcc-gfortran \
|
- libSM
|
||||||
-d libcurl-devel \
|
- libtiff
|
||||||
-d libicu-devel \
|
- libXmu
|
||||||
-d libSM \
|
- libXt
|
||||||
-d libtiff \
|
- make
|
||||||
-d libXmu \
|
- openblas-threads
|
||||||
-d libXt \
|
- pango
|
||||||
-d make \
|
- ${pcre_lib}
|
||||||
-d openblas-threads \
|
- tcl
|
||||||
-d pango \
|
- tk
|
||||||
-d ${pcre_lib} \
|
- unzip
|
||||||
-d tcl \
|
- which
|
||||||
-d tk \
|
- xz-devel
|
||||||
-d unzip \
|
- zip
|
||||||
-d which \
|
- zlib-devel
|
||||||
-d xz-devel \
|
contents:
|
||||||
-d zip \
|
- src: /opt/R/${R_VERSION}
|
||||||
-d zlib-devel \
|
dst: /opt/R/${R_VERSION}
|
||||||
/opt/R/${R_VERSION}
|
scripts:
|
||||||
|
postinstall: /post-install.sh
|
||||||
|
postremove: /after-remove.sh
|
||||||
|
EOF
|
||||||
|
|
||||||
shopt -s extglob
|
nfpm package \
|
||||||
export PKG_FILE=$(ls /tmp/output/centos-8/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
-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)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ ! -d /tmp/output/debian-10 ]]; then
|
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||||
mkdir -p /tmp/output/debian-10
|
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# R 3.x requires PCRE1
|
# R 3.x requires PCRE1
|
||||||
|
|
@ -10,50 +10,59 @@ if [[ "${R_VERSION}" =~ ^3 ]]; then
|
||||||
pcre_lib='libpcre3-dev'
|
pcre_lib='libpcre3-dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fpm \
|
cat <<EOF > /tmp/nfpm.yml
|
||||||
-s dir \
|
name: r-${R_VERSION}
|
||||||
-t deb \
|
version: 1
|
||||||
-v 1 \
|
version_schema: none
|
||||||
-n R-${R_VERSION} \
|
section: gnu-r
|
||||||
--vendor "RStudio, PBC" \
|
priority: optional
|
||||||
--deb-priority "optional" \
|
maintainer: RStudio, PBC <https://github.com/rstudio/r-builds>
|
||||||
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
description: |
|
||||||
--url "http://www.r-project.org/" \
|
GNU R statistical computation and graphics system
|
||||||
--description "GNU R statistical computation and graphics system" \
|
vendor: RStudio, PBC
|
||||||
--maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \
|
homepage: https://www.r-project.org
|
||||||
--license "GPL-2" \
|
license: GPL-2
|
||||||
-p /tmp/output/debian-10/ \
|
deb:
|
||||||
-d ca-certificates \
|
fields:
|
||||||
-d g++ \
|
Bugs: https://github.com/rstudio/r-builds/issues
|
||||||
-d gcc \
|
depends:
|
||||||
-d gfortran \
|
- ca-certificates
|
||||||
-d libbz2-dev \
|
- g++
|
||||||
-d libc6 \
|
- gcc
|
||||||
-d libcairo2 \
|
- gfortran
|
||||||
-d libcurl4-openssl-dev \
|
- libbz2-dev
|
||||||
-d libglib2.0-0 \
|
- libc6
|
||||||
-d libgomp1 \
|
- libcairo2
|
||||||
-d libicu-dev \
|
- libcurl4-openssl-dev
|
||||||
-d liblzma-dev \
|
- libglib2.0-0
|
||||||
-d libopenblas-dev \
|
- libgomp1
|
||||||
-d libpango-1.0-0 \
|
- libicu-dev
|
||||||
-d libpangocairo-1.0-0 \
|
- liblzma-dev
|
||||||
-d libpaper-utils \
|
- libopenblas-dev
|
||||||
-d ${pcre_lib} \
|
- libpango-1.0-0
|
||||||
-d libpng16-16 \
|
- libpangocairo-1.0-0
|
||||||
-d libreadline7 \
|
- libpaper-utils
|
||||||
-d libtcl8.6 \
|
- ${pcre_lib}
|
||||||
-d libtiff5 \
|
- libpng16-16
|
||||||
-d libtk8.6 \
|
- libreadline7
|
||||||
-d libx11-6 \
|
- libtcl8.6
|
||||||
-d libxt6 \
|
- libtiff5
|
||||||
-d make \
|
- libtk8.6
|
||||||
-d ucf \
|
- libx11-6
|
||||||
-d unzip \
|
- libxt6
|
||||||
-d zip \
|
- make
|
||||||
-d zlib1g-dev \
|
- ucf
|
||||||
/opt/R/${R_VERSION}
|
- unzip
|
||||||
|
- zip
|
||||||
|
- zlib1g-dev
|
||||||
|
contents:
|
||||||
|
- src: /opt/R/${R_VERSION}
|
||||||
|
dst: /opt/R/${R_VERSION}
|
||||||
|
EOF
|
||||||
|
|
||||||
shopt -s extglob
|
nfpm package \
|
||||||
export PKG_FILE=$(ls /tmp/output/debian-10/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
-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)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ ! -d /tmp/output/opensuse-153 ]]; then
|
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||||
mkdir -p /tmp/output/opensuse-153
|
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# R 3.x requires PCRE1
|
# R 3.x requires PCRE1
|
||||||
|
|
@ -17,58 +17,65 @@ ln -s /usr/lib64/libopenblas.so /opt/R/${R_VERSION}/lib/R/lib/libRblas.so
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# create after-remove script to remove internal blas
|
# 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
|
if [ -d /opt/R/${R_VERSION} ]; then
|
||||||
rm -r /opt/R/${R_VERSION}
|
rm -r /opt/R/${R_VERSION}
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fpm \
|
cat <<EOF > /tmp/nfpm.yml
|
||||||
-s dir \
|
name: R-${R_VERSION}
|
||||||
-t rpm \
|
version: 1
|
||||||
-v 1 \
|
version_schema: none
|
||||||
-n R-${R_VERSION} \
|
release: 1
|
||||||
--vendor "RStudio, PBC" \
|
maintainer: RStudio, PBC <https://github.com/rstudio/r-builds>
|
||||||
--deb-priority "optional" \
|
description: |
|
||||||
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
GNU R statistical computation and graphics system
|
||||||
--url "http://www.r-project.org/" \
|
vendor: RStudio, PBC
|
||||||
--description "GNU R statistical computation and graphics system" \
|
homepage: https://www.r-project.org
|
||||||
--maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \
|
license: GPLv2+
|
||||||
--license "GPL-2" \
|
depends:
|
||||||
--after-install /post-install.sh \
|
- fontconfig
|
||||||
--after-remove /before-remove.sh \
|
- gcc
|
||||||
-p /tmp/output/opensuse-153/ \
|
- gcc-c++
|
||||||
-d fontconfig \
|
- gcc-fortran
|
||||||
-d gcc \
|
- glibc-locale
|
||||||
-d gcc-c++ \
|
- gzip
|
||||||
-d gcc-fortran \
|
- icu.691-devel
|
||||||
-d glibc-locale \
|
- libbz2-devel
|
||||||
-d gzip \
|
- libcairo2
|
||||||
-d icu.691-devel \
|
- libcurl-devel
|
||||||
-d libbz2-devel \
|
- libfreetype6
|
||||||
-d libcairo2 \
|
- libgomp1
|
||||||
-d libcurl-devel \
|
- libjpeg62
|
||||||
-d libfreetype6 \
|
- libpango-1_0-0
|
||||||
-d libgomp1 \
|
- libreadline7
|
||||||
-d libjpeg62 \
|
- libtiff5
|
||||||
-d libpango-1_0-0 \
|
- make
|
||||||
-d libreadline7 \
|
- openblas-devel
|
||||||
-d libtiff5 \
|
- ${pcre_lib}
|
||||||
-d make \
|
- tar
|
||||||
-d openblas-devel \
|
- tcl
|
||||||
-d ${pcre_lib} \
|
- tk
|
||||||
-d tar \
|
- unzip
|
||||||
-d tcl \
|
- which
|
||||||
-d tk \
|
- xorg-x11
|
||||||
-d unzip \
|
- xorg-x11-fonts-100dpi
|
||||||
-d which \
|
- xorg-x11-fonts-75dpi
|
||||||
-d xorg-x11 \
|
- xz-devel
|
||||||
-d xorg-x11-fonts-100dpi \
|
- zip
|
||||||
-d xorg-x11-fonts-75dpi \
|
- zlib-devel
|
||||||
-d xz-devel \
|
contents:
|
||||||
-d zip \
|
- src: /opt/R/${R_VERSION}
|
||||||
-d zlib-devel \
|
dst: /opt/R/${R_VERSION}
|
||||||
/opt/R/${R_VERSION}
|
scripts:
|
||||||
|
postinstall: /post-install.sh
|
||||||
|
postremove: /after-remove.sh
|
||||||
|
EOF
|
||||||
|
|
||||||
shopt -s extglob
|
nfpm package \
|
||||||
export PKG_FILE=$(ls /tmp/output/opensuse-153/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
-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)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ ! -d /tmp/output/ubuntu-1804 ]]; then
|
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||||
mkdir -p /tmp/output/ubuntu-1804
|
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# R 3.x requires PCRE1
|
# R 3.x requires PCRE1
|
||||||
|
|
@ -10,50 +10,59 @@ if [[ "${R_VERSION}" =~ ^3 ]]; then
|
||||||
pcre_lib='libpcre3-dev'
|
pcre_lib='libpcre3-dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fpm \
|
cat <<EOF > /tmp/nfpm.yml
|
||||||
-s dir \
|
name: r-${R_VERSION}
|
||||||
-t deb \
|
version: 1
|
||||||
-v 1 \
|
version_schema: none
|
||||||
-n R-${R_VERSION} \
|
section: universe/math
|
||||||
--vendor "RStudio, PBC" \
|
priority: optional
|
||||||
--deb-priority "optional" \
|
maintainer: RStudio, PBC <https://github.com/rstudio/r-builds>
|
||||||
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
description: |
|
||||||
--url "http://www.r-project.org/" \
|
GNU R statistical computation and graphics system
|
||||||
--description "GNU R statistical computation and graphics system" \
|
vendor: RStudio, PBC
|
||||||
--maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \
|
homepage: https://www.r-project.org
|
||||||
--license "GPL-2" \
|
license: GPL-2
|
||||||
-p /tmp/output/ubuntu-1804/ \
|
deb:
|
||||||
-d g++ \
|
fields:
|
||||||
-d gcc \
|
Bugs: https://github.com/rstudio/r-builds/issues
|
||||||
-d gfortran \
|
depends:
|
||||||
-d libbz2-dev \
|
- g++
|
||||||
-d libc6 \
|
- gcc
|
||||||
-d libcairo2 \
|
- gfortran
|
||||||
-d libcurl4 \
|
- libbz2-dev
|
||||||
-d libglib2.0-0 \
|
- libc6
|
||||||
-d libgomp1 \
|
- libcairo2
|
||||||
-d libicu-dev \
|
- libcurl4
|
||||||
-d libjpeg8 \
|
- libglib2.0-0
|
||||||
-d liblzma-dev \
|
- libgomp1
|
||||||
-d libopenblas-dev \
|
- libicu-dev
|
||||||
-d libpango-1.0-0 \
|
- libjpeg8
|
||||||
-d libpangocairo-1.0-0 \
|
- liblzma-dev
|
||||||
-d libpaper-utils \
|
- libopenblas-dev
|
||||||
-d ${pcre_lib} \
|
- libpango-1.0-0
|
||||||
-d libpng16-16 \
|
- libpangocairo-1.0-0
|
||||||
-d libreadline7 \
|
- libpaper-utils
|
||||||
-d libtcl8.6 \
|
- ${pcre_lib}
|
||||||
-d libtiff5 \
|
- libpng16-16
|
||||||
-d libtk8.6 \
|
- libreadline7
|
||||||
-d libx11-6 \
|
- libtcl8.6
|
||||||
-d libxt6 \
|
- libtiff5
|
||||||
-d make \
|
- libtk8.6
|
||||||
-d ucf \
|
- libx11-6
|
||||||
-d unzip \
|
- libxt6
|
||||||
-d zip \
|
- make
|
||||||
-d zlib1g-dev \
|
- ucf
|
||||||
/opt/R/${R_VERSION}
|
- unzip
|
||||||
|
- zip
|
||||||
|
- zlib1g-dev
|
||||||
|
contents:
|
||||||
|
- src: /opt/R/${R_VERSION}
|
||||||
|
dst: /opt/R/${R_VERSION}
|
||||||
|
EOF
|
||||||
|
|
||||||
shopt -s extglob
|
nfpm package \
|
||||||
export PKG_FILE=$(ls /tmp/output/ubuntu-1804/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
-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)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ ! -d /tmp/output/ubuntu-2004 ]]; then
|
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||||
mkdir -p /tmp/output/ubuntu-2004
|
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# R 3.x requires PCRE1
|
# R 3.x requires PCRE1
|
||||||
|
|
@ -10,50 +10,60 @@ if [[ "${R_VERSION}" =~ ^3 ]]; then
|
||||||
pcre_lib='libpcre3-dev'
|
pcre_lib='libpcre3-dev'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fpm \
|
cat <<EOF > /tmp/nfpm.yml
|
||||||
-s dir \
|
name: r-${R_VERSION}
|
||||||
-t deb \
|
version: 1
|
||||||
-v 1 \
|
version_schema: none
|
||||||
-n R-${R_VERSION} \
|
section: universe/math
|
||||||
--vendor "RStudio, PBC" \
|
priority: optional
|
||||||
--deb-priority "optional" \
|
maintainer: RStudio, PBC <https://github.com/rstudio/r-builds>
|
||||||
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
description: |
|
||||||
--url "http://www.r-project.org/" \
|
GNU R statistical computation and graphics system
|
||||||
--description "GNU R statistical computation and graphics system" \
|
vendor: RStudio, PBC
|
||||||
--maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \
|
homepage: https://www.r-project.org
|
||||||
--license "GPL-2" \
|
license: GPL-2
|
||||||
-p /tmp/output/ubuntu-2004/ \
|
deb:
|
||||||
-d g++ \
|
fields:
|
||||||
-d gcc \
|
Bugs: https://github.com/rstudio/r-builds/issues
|
||||||
-d gfortran \
|
depends:
|
||||||
-d libbz2-dev \
|
- g++
|
||||||
-d libblas-dev \
|
- gcc
|
||||||
-d libc6 \
|
- gfortran
|
||||||
-d libcairo2 \
|
- libbz2-dev
|
||||||
-d libcurl4 \
|
- libblas-dev
|
||||||
-d libglib2.0-0 \
|
- libc6
|
||||||
-d libgomp1 \
|
- libcairo2
|
||||||
-d libicu-dev \
|
- libcurl4
|
||||||
-d libjpeg8 \
|
- libglib2.0-0
|
||||||
-d liblapack-dev \
|
- libgomp1
|
||||||
-d liblzma-dev \
|
- libicu-dev
|
||||||
-d libpango-1.0-0 \
|
- libjpeg8
|
||||||
-d libpangocairo-1.0-0 \
|
- liblapack-dev
|
||||||
-d libpaper-utils \
|
- liblzma-dev
|
||||||
-d ${pcre_lib} \
|
- libpango-1.0-0
|
||||||
-d libpng16-16 \
|
- libpangocairo-1.0-0
|
||||||
-d libreadline8 \
|
- libpaper-utils
|
||||||
-d libtcl8.6 \
|
- ${pcre_lib}
|
||||||
-d libtiff5 \
|
- libpng16-16
|
||||||
-d libtk8.6 \
|
- libreadline8
|
||||||
-d libx11-6 \
|
- libtcl8.6
|
||||||
-d libxt6 \
|
- libtiff5
|
||||||
-d make \
|
- libtk8.6
|
||||||
-d ucf \
|
- libx11-6
|
||||||
-d unzip \
|
- libxt6
|
||||||
-d zip \
|
- make
|
||||||
-d zlib1g-dev \
|
- ucf
|
||||||
/opt/R/${R_VERSION}
|
- unzip
|
||||||
|
- zip
|
||||||
|
- zlib1g-dev
|
||||||
|
contents:
|
||||||
|
- src: /opt/R/${R_VERSION}
|
||||||
|
dst: /opt/R/${R_VERSION}
|
||||||
|
EOF
|
||||||
|
|
||||||
shopt -s extglob
|
nfpm package \
|
||||||
export PKG_FILE=$(ls /tmp/output/ubuntu-2004/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
-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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue