Enables building of RPMs for opensuse (#25)
* Enables OS package building on opensuse Added the tooling necessary to enable the building of RPMs for opensuse * Fixed the vendor and added additional dependency
This commit is contained in:
parent
834c4ad40a
commit
426a9a0582
4 changed files with 144 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
|||
libjpeg-devel \
|
||||
libpng-devel \
|
||||
libtiff-devel \
|
||||
make \
|
||||
pango-devel \
|
||||
pcre-devel \
|
||||
perl \
|
||||
|
|
@ -36,6 +37,8 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
|||
python-pip \
|
||||
readline-devel \
|
||||
rpm-build \
|
||||
ruby \
|
||||
ruby-devel \
|
||||
shadow \
|
||||
tcl-devel \
|
||||
texinfo \
|
||||
|
|
@ -62,6 +65,8 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
|||
|
||||
RUN pip install awscli
|
||||
|
||||
RUN gem install fpm && ln -s /usr/lib64/ruby/gems/2.5.0/gems/fpm-1.11.0/bin/fpm /bin/fpm
|
||||
|
||||
RUN chmod 0777 /opt
|
||||
|
||||
# Configure flags for SUSE that don't use the defaults in build.sh
|
||||
|
|
@ -73,5 +78,6 @@ ENV CONFIGURE_OPTIONS="\
|
|||
--with-tcl-config=/usr/lib64/tclConfig.sh \
|
||||
--with-tk-config=/usr/lib64/tkConfig.sh"
|
||||
|
||||
COPY package.opensuse-15 /package.sh
|
||||
COPY build.sh .
|
||||
ENTRYPOINT ./build.sh
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
|||
libjpeg-devel \
|
||||
libpng-devel \
|
||||
libtiff-devel \
|
||||
make \
|
||||
pango-devel \
|
||||
pcre-devel \
|
||||
perl \
|
||||
|
|
@ -36,6 +37,8 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
|||
python-pip \
|
||||
readline-devel \
|
||||
rpm-build \
|
||||
ruby \
|
||||
ruby-devel \
|
||||
shadow \
|
||||
tcl-devel \
|
||||
texinfo \
|
||||
|
|
@ -62,6 +65,8 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
|
|||
|
||||
RUN pip install awscli
|
||||
|
||||
RUN gem install fpm && ln -s /usr/lib64/ruby/gems/2.1.0/gems/fpm-1.11.0/bin/fpm /bin/fpm
|
||||
|
||||
RUN chmod 0777 /opt
|
||||
|
||||
# SUSE 12 doesn't have texi2any, so use makeinfo.
|
||||
|
|
@ -77,5 +82,6 @@ ENV CONFIGURE_OPTIONS="\
|
|||
--with-tk-config=/usr/lib64/tkConfig.sh \
|
||||
--enable-prebuilt-html"
|
||||
|
||||
COPY package.opensuse-42 /package.sh
|
||||
COPY build.sh .
|
||||
ENTRYPOINT ./build.sh
|
||||
|
|
|
|||
67
builder/package.opensuse-15
Normal file
67
builder/package.opensuse-15
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
if [[ ! -d /tmp/output/opensuse-15 ]]; then
|
||||
mkdir -p /tmp/output/opensuse-15
|
||||
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/libopenblas.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
|
||||
|
||||
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/opensuse-15/ \
|
||||
-d fontconfig \
|
||||
-d gcc \
|
||||
-d gcc-c++ \
|
||||
-d gcc-fortran \
|
||||
-d glibc-locale \
|
||||
-d gzip \
|
||||
-d libbz2-devel \
|
||||
-d libcairo2 \
|
||||
-d libcurl-devel \
|
||||
-d libfreetype6 \
|
||||
-d libgomp1 \
|
||||
-d libicu-devel \
|
||||
-d libjpeg62 \
|
||||
-d libreadline6 \
|
||||
-d libtiff5 \
|
||||
-d make \
|
||||
-d openblas-devel \
|
||||
-d pango-tools \
|
||||
-d pcre-devel \
|
||||
-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}
|
||||
|
||||
shopt -s extglob
|
||||
export PKG_FILE=$(ls /tmp/output/opensuse-15/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
||||
|
||||
65
builder/package.opensuse-42
Normal file
65
builder/package.opensuse-42
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
if [[ ! -d /tmp/output/opensuse-42 ]]; then
|
||||
mkdir -p /tmp/output/opensuse-42
|
||||
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/libopenblas.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
|
||||
|
||||
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/opensuse-42/ \
|
||||
-d fontconfig \
|
||||
-d gcc \
|
||||
-d gcc-c++ \
|
||||
-d gcc-fortran \
|
||||
-d glibc-locale \
|
||||
-d libbz2-devel \
|
||||
-d libcairo2 \
|
||||
-d libcurl-devel \
|
||||
-d libfreetype6 \
|
||||
-d libgomp1 \
|
||||
-d libicu-devel \
|
||||
-d libjpeg62 \
|
||||
-d libtiff5 \
|
||||
-d make \
|
||||
-d openblas-devel \
|
||||
-d pango-tools \
|
||||
-d pcre-devel \
|
||||
-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}
|
||||
|
||||
shopt -s extglob
|
||||
export PKG_FILE=$(ls /tmp/output/opensuse-42/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
||||
|
||||
Loading…
Reference in a new issue