%define gitversion c097d85 Name: rstudio Version: 0.98.501 Release: %mkrel 1 Summary: RStudio IDE is a powerful and productive user interface for R Group: Sciences/Mathematics License: GPLv3 URL: http://www.rstudio.com/ Source: %{name}-v%{version}.tgz Source1: https://s3.amazonaws.com/rstudio-buildtools/core-dictionaries.zip Source2: https://s3.amazonaws.com/rstudio-buildtools/mathjax-20.zip Source3: https://s3.amazonaws.com/rstudio-buildtools/gin-1.5.zip BuildRequires: cmake BuildRequires: boost-devel BuildRequires: icu-devel BuildRequires: java-devel BuildRequires: pam-devel BuildRequires: qt4-devel BuildRequires: R-base BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libpcre) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(uuid) BuildRequires: gwt Requires: R-base Requires: rstudio-common %description RStudio is a free and open source integrated development environment for R. %package server Summary: RStudio IDE is a powerful and productive user interface for R Group: Sciences/Mathematics License: GPLv3 URL: http://www.rstudio.com/ Requires: R-base Requires: rstudio-common %description server RStudio is a free and open source integrated development environment for R. %package common Summary: RStudio IDE is a powerful and productive user interface for R Group: Sciences/Mathematics License: GPLv3 URL: http://www.rstudio.com/ Requires: R-base %description common RStudio is a free and open source integrated development environment for R. %prep %setup -q -n rstudio-rstudio-%{gitversion} mkdir -p dependencies/common/dictionaries unzip -qd dependencies/common/dictionaries %{SOURCE1} mkdir -p dependencies/common/mathjax unzip -qd dependencies/common/mathjax %{SOURCE2} mkdir -p src/gwt/lib/gwt pushd src/gwt/lib/gwt ln -s /usr/share/java/gwt/ 2.5.1 popd mkdir -p src/gwt/lib/gin/1.5 unzip -qd src/gwt/lib/gin/1.5 %{SOURCE3} %build pushd . %cmake \ -DRSTUDIO_TARGET=Desktop \ -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} # Too hungry for resources make %{?_smp_mflags} popd pushd . %cmake \ -DRSTUDIO_TARGET=Server \ -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name}-server make %{?_smp_mflags} popd %install pushd . %cmake \ -DRSTUDIO_TARGET=Desktop \ -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} %makeinstall_std mkdir -p %{buildroot}%{_bindir} ln -s %{_libdir}/%{name}/bin/%{name} %{buildroot}%{_bindir}/%{name} # The default one is too ugly rm -f %{buildroot}%{_datadir}/applications/%{name}.desktop cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop << EOF [Desktop Entry] Name=RStudio Comment=IDE for R Exec=%{_bindir}/rstudio Icon=rstudio Type=Application Terminal=false Categories=Science;Math;X-MandrivaLinux-MoreApplications-Sciences-Mathematics; MimeType=text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/html;text/css;text/javascript; EOF popd %cmake \ -DRSTUDIO_TARGET=Server \ -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name}-server %makeinstall_std ln -s %{_libdir}/%{name}-server/bin/%{name}-server %{buildroot}%{_bindir}/%{name}-server %files %doc README.md COPYING %{_bindir}/%{name} %{_libdir}/%{name} %{_datadir}/applications/mandriva-%{name}.desktop %files server %{_bindir}/%{name}-server %{_libdir}/%{name}-server %files common %{_datadir}/mime/packages/%{name}.xml %{_datadir}/pixmaps/%{name}.png %{_iconsdir}/hicolor/*/apps/%{name}.png %{_iconsdir}/hicolor/*/mimetypes/application-x-r-*.png