Fix fpm installation on openSUSE 15.4; switch to nfpm
fpm currently fails to install because the public_suffix gem dependency requires Ruby 2.6, which openSUSE 15.4 doesn't provide. Because there have been so many Ruby dependency issues with fpm in the past, switch to the fewer- dependency nfpm, which also has better support for code signing if we want to do that in the future.
This commit is contained in:
parent
708314a1a2
commit
a245fc65d9
1 changed files with 60 additions and 51 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ ! -d /tmp/output/opensuse-154 ]]; then
|
||||
mkdir -p /tmp/output/opensuse-154
|
||||
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||
fi
|
||||
|
||||
# R 3.x requires PCRE1
|
||||
|
|
@ -39,49 +39,59 @@ if [ -d /opt/R/${R_VERSION} ]; then
|
|||
fi
|
||||
EOF
|
||||
|
||||
fpm \
|
||||
-s dir \
|
||||
-t rpm \
|
||||
-v 1 \
|
||||
-n "R-${R_VERSION}" \
|
||||
--vendor "RStudio, PBC" \
|
||||
--url "http://www.r-project.org/" \
|
||||
--description "GNU R statistical computation and graphics system" \
|
||||
--maintainer "RStudio, PBC <https://github.com/rstudio/r-builds>" \
|
||||
--license "GPLv2" \
|
||||
--after-install /post-install.sh \
|
||||
--after-remove /after-remove.sh \
|
||||
-p /tmp/output/opensuse-154/ \
|
||||
-d fontconfig \
|
||||
-d gcc \
|
||||
-d gcc-c++ \
|
||||
-d gcc-fortran \
|
||||
-d glibc-locale \
|
||||
-d gzip \
|
||||
-d icu.691-devel \
|
||||
-d libbz2-devel \
|
||||
-d libcairo2 \
|
||||
-d libcurl-devel \
|
||||
-d libfreetype6 \
|
||||
-d libgomp1 \
|
||||
-d libjpeg62 \
|
||||
-d libopenblas_pthreads-devel \
|
||||
-d libpango-1_0-0 \
|
||||
-d libreadline7 \
|
||||
-d libtiff5 \
|
||||
-d make \
|
||||
-d ${pcre_lib} \
|
||||
-d tar \
|
||||
-d tcl \
|
||||
-d tk \
|
||||
-d unzip \
|
||||
-d which \
|
||||
-d xorg-x11 \
|
||||
-d xorg-x11-fonts-100dpi \
|
||||
-d xorg-x11-fonts-75dpi \
|
||||
-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:
|
||||
- fontconfig
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- gcc-fortran
|
||||
- glibc-locale
|
||||
- gzip
|
||||
- icu.691-devel
|
||||
- libbz2-devel
|
||||
- libcairo2
|
||||
- libcurl-devel
|
||||
- libfreetype6
|
||||
- libgomp1
|
||||
- libjpeg62
|
||||
- libopenblas_pthreads-devel
|
||||
- libpango-1_0-0
|
||||
- libreadline7
|
||||
- libtiff5
|
||||
- make
|
||||
- ${pcre_lib}
|
||||
- tar
|
||||
- tcl
|
||||
- tk
|
||||
- unzip
|
||||
- which
|
||||
- xorg-x11
|
||||
- xorg-x11-fonts-100dpi
|
||||
- xorg-x11-fonts-75dpi
|
||||
- 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
|
||||
|
||||
export PKG_FILE=$(ls /tmp/output/opensuse-154/R-${R_VERSION}*.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