Allows building of RPMs for CentOS 6 (#32)
* Allows building of RPMs for CentOS 6 Builds on earlier work and provides the tooling required to create Linux OS packages (deb in this case). Modifies: Dockerfile.centos-6 So that it includes the fpm package build tool and also copies in the packaging script Adds: package.centos-6 which is the packaging script which runs fpm with the required parameters and dependencies * Added additional font dependency
This commit is contained in:
parent
8966611fa6
commit
9a8d2ee4ef
1 changed files with 97 additions and 0 deletions
71
builder/package.centos-6
Normal file
71
builder/package.centos-6
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
if [[ ! -d /tmp/output/centos-6 ]]; then
|
||||
mkdir -p /tmp/output/centos-6
|
||||
fi
|
||||
|
||||
# create post-install script required for openblas
|
||||
cat <<EOF >> /post-install.sh
|
||||
mv /opt/R/${R_VERSION}/lib/R/lib/libRblas.so /opt/R/${R_VERSION}/lib/R/lib/libRblas.so.keep
|
||||
ln -s /usr/lib64/libopenblasp.so /opt/R/${R_VERSION}/lib/R/lib/libRblas.so
|
||||
EOF
|
||||
|
||||
# create after-remove script to remove internal blas
|
||||
cat <<EOF >> /before-remove.sh
|
||||
if [ -d /opt/R/${R_VERSION} ]; then
|
||||
rm -r /opt/R/${R_VERSION}
|
||||
fi
|
||||
EOF
|
||||
|
||||
# set environment for fpm
|
||||
export PATH=/usr/local/rvm/rubies/ruby-2.6.3/bin/:/.gems/bin:${PATH}
|
||||
export GEM_HOME=/.gems
|
||||
export GEM_PATH=/.gems
|
||||
|
||||
# Additional config for c++11 support
|
||||
sed -i 's/^CXX11\ =\ .*/CXX11\ =\ g++/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
|
||||
sed -i 's/^CXX11FLAGS\ =\ .*/CXX11FLAGS\ =\ -g\ -O2\ \$\(LTO\)/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
|
||||
sed -i 's/^CXX11PICFLAGS\ =\ .*/CXX11PICFLAGS\ =\ -fpic/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
|
||||
sed -i 's/^CXX11STD\ =\ .*/CXX11STD\ =\ -std=gnu++11/g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
|
||||
|
||||
fpm \
|
||||
-s dir \
|
||||
-t rpm \
|
||||
-v 1 \
|
||||
-n R-${R_VERSION} \
|
||||
--vendor "RStudio Inc." \
|
||||
--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 Inc https://github.com/rstudio/r-builds" \
|
||||
--license "GPL-2" \
|
||||
--after-install /post-install.sh \
|
||||
--after-remove /before-remove.sh \
|
||||
-p /tmp/output/centos-6/ \
|
||||
-d bzip2-devel \
|
||||
-d dejavu-sans-fonts \
|
||||
-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-devel \
|
||||
-d pango \
|
||||
-d pcre-devel \
|
||||
-d pcre2-devel \
|
||||
-d tcl \
|
||||
-d tk \
|
||||
-d unzip \
|
||||
-d which \
|
||||
-d xz-devel \
|
||||
-d zip \
|
||||
-d zlib-devel \
|
||||
/opt/R/${R_VERSION}
|
||||
|
||||
shopt -s extglob
|
||||
export PKG_FILE=$(ls /tmp/output/centos-6/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
||||
|
||||
Loading…
Reference in a new issue