Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates-src > by-pkgid > 20749488f9556e1f1ac8557ae0e315d4 > files > 10

rstudio-1.2.1335-1.4.mga7.src.rpm

%define date 0
%define gitversion 0
%define _clangver 5.0.1
%define _mathjaxver 26
%define _ginver 2.1.2
%define _rmarkdownver 1.8
%define _packratver 0.4.2
%define _gwtver 2.8.1

%define rserver %{_builddir}/%{name}-server-%{version}-%{release}

%define rel 1.4

%if 0%{gitversion}
%define bdir %{name}-master
%else
%define bdir %{name}-%{version}
%endif

Name: rstudio
Version: 1.2.1335
%if 0%{gitversion}
Release: %%mkrel -c %{?date:%date}%{?gitversion:_git%{gitversion}} %{rel}
%else
Release: %mkrel %{rel}
%endif
Summary: RStudio IDE is a powerful and productive user interface for R
Group: Sciences/Mathematics
License: AGPLv3
URL: http://www.rstudio.com/
%if 0%{gitversion}
Source0: https://github.com/rstudio/rstudio/archive/master/%{name}-%{version}%{?date:-%date}%{?gitversion:-git%gitversion}.tar.gz
%else
Source0: https://github.com/rstudio/rstudio/archive/v%{version}/%{name}-%{version}.tar.gz
%endif
Source1: https://s3.amazonaws.com/rstudio-buildtools/gin-%{_ginver}.zip
Source2: https://github.com/rstudio/rmarkdown/archive/v%{_rmarkdownver}/rmarkdown-%{_rmarkdownver}.tar.gz
Source3: https://github.com/rstudio/packrat/archive/v%{_packratver}/packrat-%{_packratver}.tar.gz
Source4: https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
Source5: https://s3.amazonaws.com/rstudio-buildtools/gwt-%{_gwtver}.zip
Source6: rstudio-server.tmpfiles.d

ExcludeArch:	%{arm} aarch64

Patch0: rstudio-1.1.412-cmakelists-remove-pandoc.patch
# switch tmpfiles from /var/run to /run/rstudio-server
Patch1: rstudio-1.2.5033-var_run-to-run.patch

BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: extra-cmake-modules
BuildRequires: java
BuildRequires: java-devel
BuildRequires: pam-devel
BuildRequires: R-base
BuildRequires: ant
BuildRequires: xml-commons-apis
BuildRequires: mathjax
BuildRequires: patchelf
BuildRequires: pkgconfig(libpq) >= 9.6
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5Positioning)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5QuickWidgets)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
BuildRequires: pkgconfig(Qt5Sensors)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5WebChannel)
BuildRequires: pkgconfig(Qt5WebEngine)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5XmlPatterns)
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires: pkgconfig(libffi)
BuildRequires: pkgconfig(pango)
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: pkgconfig(libxslt)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(dri)
BuildRequires: pkgconfig(xscrnsaver)

Requires: R-base
Requires: rstudio-common

Recommends: git
Recommends: openssh-askpass
Recommends: subversion

%description
RStudio is an integrated development environment (IDE) for the R programming
language. Some of its features include:

- Customizable workbench with all of the tools required to work with R in one
  place (console, source, plots, workspace, help, history, etc.).
- Syntax highlighting editor with code completion.
- Execute code directly from the source editor (line, selection, or file).
- Full support for authoring Sweave and TeX documents.
- Runs on all major platforms (Windows, Mac, and Linux) and can also be run
  as a server, enabling multiple users to access the RStudio IDE using a web
  browser.

%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
Requires(post): rpm-helper >= %{rpmhelper_required_version}
Requires(preun): rpm-helper >= %{rpmhelper_required_version}

%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
Requires(post): systemd >= %{systemd_required_version}

%description common
RStudio is a free and open source integrated development environment for R.

%prep
%setup -q -n %{bdir}
%autopatch -p1

ln -sfT %{_datadir}/javascript/mathjax dependencies/common/mathjax-%{_mathjaxver}
%__unzip -qd dependencies/common/dictionaries %{SOURCE4}
%__mkdir -p src/gwt/lib/gwt
%__unzip -qd src/gwt/lib/gwt %{SOURCE5}
%__mv src/gwt/lib/gwt/gwt-%{_gwtver} src/gwt/lib/gwt/%{_gwtver}
%__mkdir -p src/gwt/lib/gin/%{_ginver}
%__unzip -qd src/gwt/lib/gin/%{_ginver} %{SOURCE1}
pushd dependencies/common
%__mkdir rmarkdown
%__tar xzf %{SOURCE2} --strip-components=1 -C rmarkdown
%__mkdir packrat
%__tar xzf %{SOURCE3} --strip-components=1 -C packrat
%__mkdir -p libclang/3.5
ln -sfT %{_libdir}/libclang.so libclang/3.5/libclang.so
%__mkdir -p libclang/builtin-headers
ln -sfT %{_libdir}/clang/%{_clangver}/include libclang/builtin-headers/3.5
popd

%__cp -a . %{rserver}

%build
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
%cmake_qt5 \
-DRSTUDIO_TARGET=Desktop \
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
-DCMAKE_BUILD_TYPE=Release \
-DQT_QMAKE_EXECUTABLE=%{_qt5_bindir}/qmake
%make_build

pushd %{rserver}
%cmake_qt5 \
-DRSTUDIO_TARGET=Server \
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name}-server \
-DCMAKE_BUILD_TYPE=Release \
-DQT_QMAKE_EXECUTABLE=%{_qt5_bindir}/qmake
%make_build
popd

%install
%make_install -C build

mkdir -p %{buildroot}%{_bindir}
ln -s %{_libdir}/%{name}-server/bin/%{name}-server %{buildroot}%{_bindir}/%{name}-server
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/%{name}.desktop << EOF
[Desktop Entry]
Name=RStudio
Comment=IDE for R
Exec=%{_bindir}/rstudio
Icon=rstudio
Type=Application
Terminal=false
Categories=Science;Math;X-MageiaLinux-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

pushd %{rserver}
%make_install -C build
ln -s %{_libdir}/%{name}-server/bin/rserver %{buildroot}%{_bindir}/rserver
%__install -Dm 644 %{buildroot}%{_libdir}/%{name}-server/extras/pam/%{name} \
	%{buildroot}%{_sysconfdir}/pam/%{name}
%__install -Dm 644 %{buildroot}%{_libdir}/%{name}-server/extras/systemd/rstudio-server.redhat.service \
	%{buildroot}%{_unitdir}/rstudio-server.service
%__install -Dm 755 %{buildroot}%{_libdir}/%{name}-server/extras/init.d/redhat/rstudio-server \
	%{buildroot}%{_initddir}/rstudio-server

install -Dpm 0644 %{SOURCE6} %{buildroot}%{_tmpfilesdir}/%{name}-server.conf
popd

%pre server
%_pre_useradd %{name}-server %{_localstatedir}/lib/%{name}-server /bin/false

%post server
%_tmpfilescreate %{_tmpfilesdir}/%{name}-server
%_post_service %{name}-server

%preun server
%_preun_service %{name}-server

%postun server
%_postun_userdel %{name}-server

%files
%doc README.md COPYING
%{_bindir}/%{name}
%{_libdir}/%{name}
%{_datadir}/applications/%{name}.desktop

%files server
%{_bindir}/%{name}-server
%{_bindir}/rserver
%{_libdir}/%{name}-server
%{_sysconfdir}/pam/%{name}
%{_unitdir}/rstudio-server.service
%{_initddir}/rstudio-server
%{_tmpfilesdir}/%{name}-server.conf
%dir %ghost %attr(0644, rstudio-server, rstudio-server) %{_rundir}/%{name}-server
%ghost %attr(0660, -, -) %{_rundir}/%{name}-server/%{name}-server.pid

%files common
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/pixmaps/%{name}.png
%{_iconsdir}/hicolor/*/apps/%{name}.png
%{_iconsdir}/hicolor/*/mimetypes/application-x-r-*.png


%changelog
* Tue Jan 07 2020 daviddavid <daviddavid> 1.2.1335-1.4.mga7
+ Revision: 1477079
- use our post/preun systemd macros
- move post/preun dependencies also in the server sub-pkg
- switch temporary dir from /var/run to /run/rstudio-server (mga#26017#c9)
- fix unknown group 'studio-server' from tmpfiles.d (mga#26017#c9)
- make sure pid files and /run/rstudio-server folder are removed when uninstalled
+ luigiwalser <luigiwalser>
- move scriplets to correct package (mga#26017)
- fix bug in post scriplet (mga#26017)

* Wed Apr 10 2019 kekepower <kekepower> 1.2.1335-1.mga7
+ Revision: 1388202
- Update to version 1.2.1335

* Mon Apr 01 2019 umeabot <umeabot> 1.1.463-2.mga7
+ Revision: 1384713
- Qt5 Rebuild

* Thu Oct 25 2018 kekepower <kekepower> 1.1.463-1.mga7
+ Revision: 1325250
- Update to version 1.1.463

* Tue Oct 23 2018 kekepower <kekepower> 1.1.459-1.mga7
+ Revision: 1324681
- Update to version 1.1.459

* Thu Oct 18 2018 kekepower <kekepower> 1.1.458-1.mga7
+ Revision: 1321950
- Update to version 1.1.458
+ wally <wally>
- rebuild for new boost 1.68.0

* Fri Oct 05 2018 daviddavid <daviddavid> 1.1.456-2.mga7
+ Revision: 1317775
- Mageia 7 Mass Rebuild

* Sat Aug 11 2018 kekepower <kekepower> 1.1.456-1.mga7
+ Revision: 1251038
- Update to version 1.1.456
- Rediffed Patch0

* Mon May 14 2018 kekepower <kekepower> 1.1.450-1.mga7
+ Revision: 1229656
- Update to version 1.1.450

* Fri May 11 2018 kekepower <kekepower> 1.1.448-1.mga7
+ Revision: 1228263
- Update to version 1.1.448

* Fri Apr 20 2018 kekepower <kekepower> 1.1.447-1.mga7
+ Revision: 1220589
- Update to version 1.1.447
- Remove unused BRs
- Cleaned up the spec file a little

* Sat Mar 31 2018 kekepower <kekepower> 1.1.444-1.mga7
+ Revision: 1213746
- Update to version 1.1.444
- Rebuild for new R-base

* Wed Mar 28 2018 kekepower <kekepower> 1.1.443-1.mga7
+ Revision: 1213036
- Update to version 1.1.443

* Wed Mar 14 2018 kekepower <kekepower> 1.1.442-1.mga7
+ Revision: 1209376
- Update to version 1.1.442

* Tue Mar 06 2018 kekepower <kekepower> 1.1.439-1.mga7
+ Revision: 1206895
- Update to version 1.1.439

* Mon Feb 26 2018 kekepower <kekepower> 1.1.435-1.mga7
+ Revision: 1205234
- Update to version 1.1.435
- Change license to AGPLv3
- Rename mageia-rstudio.desktop to rstudio.desktop

* Sat Feb 24 2018 kekepower <kekepower> 1.1.432-1.mga7
+ Revision: 1204791
- Update to version 1.1.432

* Fri Feb 23 2018 kekepower <kekepower> 1.1.430-1.mga7
+ Revision: 1204384
- Update to version 1.1.430
- Nearly halved the build time
- Fixed path to files
- Exclude build on ARM
- Downgrade gin and gwt
- Clean up the spec a little
- Added a Build dir variable
- Update to version 1.1.424
- Fixed Source0 URL

* Wed Feb 21 2018 kekepower <kekepower> 1.1.423-2.mga7
+ Revision: 1203859
- Use tmpfiles for content in /var
- Removed unused code
- Added rstudio-server pam auth
- Added rstudio-server systemd service
- Added rstudio-server init.d script
- Update to version 1.1.423
- Fixed some hardcoded path names
- Added a bit more information in the description

* Sat Jan 20 2018 kekepower <kekepower> 1.1.417-1.mga7
+ Revision: 1195058
- Update to version 1.1.417
- Hopefully fixed a bug where dictionaries where symlinked
- Fixed a few hardcoded values
- Removed all the hunspell BuildRequires

* Thu Jan 18 2018 kekepower <kekepower> 1.1.415-0.git20180118_35c7c0e.1.mga7
+ Revision: 1194380
- Update to version 1.1.415git
- Update dependencies packages
- Used the AUR package as inspiration for the upgrade
- Updated BuildRequires
- Added patches to make it build on Mageia
+ wally <wally>
- rebuild for new boost
+ tv <tv>
- rebuild with latest boost

* Wed Mar 15 2017 mrambo3501 <mrambo3501> 0.98.978-8.mga6
+ Revision: 1092807
- Rebuild for icu-58.2

* Sat May 14 2016 shlomif <shlomif> 0.98.978-7.mga6
+ Revision: 1015265
- Rebuild for the new UCI (new major)

* Thu Mar 03 2016 umeabot <umeabot> 0.98.978-6.mga6
+ Revision: 984098
- Rebuild for openssl

* Wed Feb 17 2016 umeabot <umeabot> 0.98.978-5.mga6
+ Revision: 963744
- Mageia 6 Mass Rebuild
- Second Mageia 5 Mass Rebuild
+ barjac <barjac>
- add partial fix for boost-1.59/60 builds
+ daviddavid <daviddavid>
- rebuild for new boost-1.58.0

* Tue Sep 16 2014 umeabot <umeabot> 0.98.978-2.mga5
+ Revision: 688726
- Mageia 5 Mass Rebuild

* Fri Aug 01 2014 joequant <joequant> 0.98.978-1.mga5
+ Revision: 658857
- update version to 0.98.978

* Wed Apr 16 2014 joequant <joequant> 0.98.501-2.mga5
+ Revision: 615245
- add link to rserver

* Sat Apr 12 2014 joequant <joequant> 0.98.501-1.mga5
+ Revision: 613640
- add ant to build requires
- single thread make
- single thread make
- add QtWebKit
- imported package rstudio