211 lines
6.6 KiB
RPMSpec
211 lines
6.6 KiB
RPMSpec
%global ver_major %(echo %version | cut -d. -f1)
|
|
%global ver_minor %(echo %version | cut -d. -f2)
|
|
%global ver_patch %(echo %version | cut -d. -f1 | cut -d. -f3)
|
|
%global ver_suffix %(echo %version | cut -d+ -f2)
|
|
%define _nodever 16.14.0
|
|
|
|
Name: rstudio
|
|
Version: 2022.07.1+554
|
|
Release: 1mamba
|
|
Summary: RStudio is an integrated development environment (IDE) for R
|
|
Group: Graphical Desktop/Applications/Scientific
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: https://www.rstudio.com/
|
|
Source0: https://github.com/rstudio/rstudio/tarball/v%{version}/%{name}-%{version}.tar.gz
|
|
# see: dependencies/common/install-common
|
|
# ./install-gwt
|
|
#Source1: https://s3.amazonaws.com/rstudio-buildtools/gwt-2.6.0.zip
|
|
#Source2: https://s3.amazonaws.com/rstudio-buildtools/gin-1.5.zip
|
|
Source3: https://nodejs.org/dist/v%{_nodever}/node-v%{_nodever}-linux-x64.tar.gz
|
|
# ./install-pandoc
|
|
#Source5: https://s3.amazonaws.com/rstudio-buildtools/pandoc-1.12.4.2.zip
|
|
Patch0: rstudio-0.98.1103-fix_build_with_boost_1_57.patch
|
|
Patch1: rstudio-2022.07.1+554-pandoc_version.patch
|
|
License: Affero GNU Public License
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libQt5Positioning-devel
|
|
BuildRequires: libQt5Sensors-devel
|
|
BuildRequires: libQt5Svg-devel
|
|
BuildRequires: libQt5WebChannel-devel
|
|
BuildRequires: libQt5WebEngine-devel
|
|
BuildRequires: libQt5XmlPatterns-devel
|
|
BuildRequires: libR-devel
|
|
BuildRequires: libboost-devel
|
|
BuildRequires: libfmt-devel
|
|
BuildRequires: libgcc
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: libpostgresql-devel
|
|
BuildRequires: libsqlite-devel
|
|
BuildRequires: libstdc++6-devel
|
|
BuildRequires: libuuid-devel
|
|
BuildRequires: libyaml-cpp-devel
|
|
BuildRequires: libz-devel
|
|
BuildRequires: qt5-qtbase-devel
|
|
BuildRequires: qt5-qtdeclarative-devel
|
|
## AUTOBUILDREQ-END
|
|
# see: dependencies/linux/install-dependencies-yum
|
|
# - build/development tools
|
|
BuildRequires: make
|
|
BuildRequires: gcc
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: cmake
|
|
# - core system libraries
|
|
BuildRequires: libuuid-devel
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: libbzip2-devel
|
|
BuildRequires: libz-devel
|
|
BuildRequires: libpam-devel
|
|
# - pandoc depenencies
|
|
BuildRequires: libffi-devel
|
|
# - boost
|
|
BuildRequires: libboost-devel
|
|
# - pango cairo
|
|
BuildRequires: libpango-devel
|
|
# - java prereqs
|
|
BuildRequires: yarn
|
|
BuildRequires: java-openjdk8
|
|
BuildRequires: apache-ant
|
|
#BuildRequires: xml-commons-apis
|
|
# see: dependencies/linux/install-qt-sdk
|
|
BuildRequires: R >= 2.11.1
|
|
#BuildRequires: java-junit3, java-junit48
|
|
#BuildRequires: jdk
|
|
BuildRequires: mathjax2
|
|
BuildRequires: pandoc
|
|
BuildRequires: libsoci-devel
|
|
Requires: R >= 2.11.1
|
|
|
|
%description
|
|
RStudio is an integrated development environment (IDE) for the R programming language.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q -c a0 -a3
|
|
#-D -T
|
|
#:<< _EOF
|
|
mv rstudio-rstudio-*/* .
|
|
|
|
#%patch0 -p1
|
|
%patch1 -p1 -b .pandoc_version
|
|
|
|
#install -d src/gwt/lib/gwt
|
|
#install -d src/gwt/lib/gin/1.5
|
|
#unzip -qq %{S:1} -d src/gwt/lib/gwt
|
|
#unzip -qq %{S:2} -d src/gwt/lib/gin/1.5
|
|
#mv src/gwt/lib/gwt/gwt-2.6.0 src/gwt/lib/gwt/2.6.0
|
|
|
|
#install -d dependencies/common/dictionaries
|
|
#unzip -qq %{S:3} -d dependencies/common/dictionaries
|
|
#unzip -qq %{S:4} -d dependencies/common
|
|
|
|
install -d dependencies/common/{pandoc,rmarkdown,packrat,shinyapps}
|
|
|
|
ln -sfT %{_datadir}/myspell/dicts dependencies/common/dictionaries
|
|
ln -sfT %{_datadir}/mathjax2 dependencies/common/mathjax-27
|
|
|
|
install -d dependencies/common/pandoc/current
|
|
ln -sfT %{_bindir}/pandoc dependencies/common/pandoc/current/pandoc
|
|
|
|
# Fix links for src/cpp/session/CMakeLists.txt
|
|
ln -sfT %{_datadir}/myspell/dicts dependencies/dictionaries
|
|
ln -sfT %{_datadir}/mathjax2 dependencies/mathjax-27
|
|
mkdir -p dependencies/pandoc/current
|
|
ln -sfT %{_bindir}/pandoc dependencies/pandoc/current/pandoc
|
|
|
|
# Nodejs
|
|
install -d node/%{_nodever}
|
|
cp -r node-v%{_nodever}-linux-x64/* node/%{_nodever}
|
|
cd src/gwt/panmirror/src/editor
|
|
yarn config set ignore-engines true
|
|
yarn install
|
|
cd ../../../../..
|
|
ln -sf ../../node dependencies/common/node
|
|
|
|
# Download and install R packages
|
|
export R_LIBS_USER="${PWD}/dependencies/R"
|
|
_JOBS="$(grep -oP -- "-j\s*\K[0-9]+" <<< "${MAKEFLAGS}")" || _JOBS="1"
|
|
mkdir -p "${R_LIBS_USER}"
|
|
for RPKG in rmarkdown renv testthat xml2 yaml; do
|
|
RINSTALLCMD="if("'!'"require($RPKG, quietly = TRUE)) { options(Ncpus = ${_JOBS} ); install.packages('$RPKG', lib='$R_LIBS_USER', repos='https://cran.rstudio.com/') }"
|
|
echo "> $RINSTALLCMD"
|
|
Rscript -e "$RINSTALLCMD"
|
|
done
|
|
|
|
%build
|
|
#:<< _EOF
|
|
|
|
export PATH="$PATH:%{_datadir}/ant/bin"
|
|
export RSTUDIO_VERSION_MAJOR=%{ver_major}
|
|
export RSTUDIO_VERSION_MINOR=%{ver_minor}
|
|
export RSTUDIO_VERSION_PATCH=%{ver_patch}
|
|
export RSTUDIO_VERSION_SUFFIX=%{ver_suffix}
|
|
export PACKAGE_OS=$(uname -om)
|
|
|
|
%cmake -d build \
|
|
-DRSTUDIO_TARGET=Desktop \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DRSTUDIO_USE_SYSTEM_BOOST=yes \
|
|
-DRSTUDIO_USE_SYSTEM_YAML_CPP=yes \
|
|
-DQT_QMAKE_EXECUTABLE=%{_bindir}/qmake \
|
|
-DBoost_NO_BOOST_CMAKE=ON \
|
|
-DQUARTO_ENABLED=FALSE \
|
|
-DRSTUDIO_BUNDLE_QT=FALSE \
|
|
-DRSTUDIO_USE_SYSTEM_SOCI=yes \
|
|
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name}
|
|
|
|
BOOST_SIGNALS_NO_DEPRECATION_WARNING=1; \
|
|
export BOOST_SIGNALS_NO_DEPRECATION_WARNING \
|
|
|
|
%make
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
%makeinstall -C build
|
|
#install/fast DESTDIR=%{buildroot}
|
|
|
|
install -d %{buildroot}%{_bindir}
|
|
ln -s %{_libdir}/%{name}/bin/rstudio %{buildroot}%{_bindir}
|
|
|
|
# remove unpackaged files
|
|
rm -f %{buildroot}%{_libdir}/rstudio/{COPYING,INSTALL,NOTICE,README.md,SOURCE,VERSION}
|
|
rm -f %{buildroot}%{_libdir}/rstudio/www/.gitignore
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_bindir}/%{name}
|
|
%dir %{_libdir}/rstudio
|
|
%{_libdir}/rstudio/rstudio.png
|
|
%{_libdir}/rstudio/R/
|
|
%{_libdir}/rstudio/bin/
|
|
%{_libdir}/rstudio/resources/
|
|
# %{_libdir}/rstudio/resources/dictionaries
|
|
# %{_libdir}/rstudio/resources/mathjax-23
|
|
# %{_libdir}/rstudio/resources/pdfjs
|
|
# %{_libdir}/rstudio/resources/presentation
|
|
# %{_libdir}/rstudio/resources/templates
|
|
%{_libdir}/rstudio/www/
|
|
%{_libdir}/rstudio/www-symbolmaps/
|
|
%{_datadir}/applications/rstudio.desktop
|
|
%{_datadir}/icons/hicolor/*/apps/rstudio.png
|
|
%{_datadir}/icons/hicolor/*/mimetypes/application-x-r-*.png
|
|
%{_datadir}/mime/packages/rstudio.xml
|
|
%{_datadir}/pixmaps/rstudio.png
|
|
%doc COPYING
|
|
|
|
%changelog
|
|
* Wed Aug 24 2022 Automatic Build System <autodist@mambasoft.it> 2022.07.1+554-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sun Mar 08 2015 Davide Madrisan <davide.madrisan@gmail.com> 0.98.1103-1mamba
|
|
- update to 0.98.1103
|
|
|
|
* Sun Nov 09 2014 Davide Madrisan <davide.madrisan@gmail.com> 0.98.1091-1mamba
|
|
- package created by autospec
|