/[packages]/cauldron/rstudio/current/SPECS/rstudio.spec
ViewVC logotype

Annotation of /cauldron/rstudio/current/SPECS/rstudio.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2077511 - (hide annotations) (download)
Fri Jun 28 04:59:29 2024 UTC (2 months, 2 weeks ago) by daviddavid
File size: 14202 byte(s)
- new version: 2024.04.2+764

1 squidf 2053327 #squidf: this spec is heavily inspired by Fedora
2     #
3 daviddavid 2077511 %global bundled_gwt_version 2.10.0
4 squidf 2053327 %global bundled_websockets_version 1.0.4
5     %global bundled_gin_version 2.1.2
6     %global bundled_elemental2_version 1.0.0
7     %global bundled_junit_version 4.9b3
8     %global bundled_guice_version 3.0
9     %global bundled_aopalliance_version 1.0
10     %global bundled_rapidjson_version 5cd62c2
11     %global bundled_treehh_version 2.81
12     %global bundled_sundown_version 1.16.0
13     %global bundled_synctex_version 1.17
14     %global bundled_gsllite_version 0.34.0
15 daviddavid 2077511 %global bundled_ace_version 1.32.5
16 squidf 2053327 %global bundled_datatables_version 1.10.4
17     %global bundled_jquery_version 3.5.1
18     %global bundled_pdfjs_version 1.3.158
19     %global bundled_revealjs_version 2.4.0
20     %global bundled_jsbn_version 1.1
21     %global bundled_highlightjs_version c589dcc
22     %global bundled_qunitjs_version 1.18.0
23     %global bundled_xtermjs_version 3.14.5
24     %global bundled_inertpol_version 0.2.5
25     %global bundled_focusvis_version 5.0.2
26     %global bundled_jsyaml_version 5.0.2
27     %global mathjax_short 27
28 daviddavid 2077511 %global rstudio_version_major 2024
29     %global rstudio_version_minor 04
30     %global rstudio_version_patch 2
31     %global rstudio_version_suffix 764
32     %global rstudio_git_revision_hash e4392fc9ddc21961fd1d0efd47484b43f07a4177
33 squidf 2053327 %global rstudio_version %{rstudio_version_major}.%{rstudio_version_minor}.%{rstudio_version_patch}
34     %global rstudio_flags \
35     export RSTUDIO_VERSION_MAJOR=%{rstudio_version_major} ; \
36     export RSTUDIO_VERSION_MINOR=%{rstudio_version_minor} ; \
37     export RSTUDIO_VERSION_PATCH=%{rstudio_version_patch} ; \
38     export RSTUDIO_VERSION_SUFFIX=+%{rstudio_version_suffix} ; \
39     export RSTUDIO_GIT_REVISION_HASH=%{rstudio_git_revision_hash} ; \
40     export GIT_COMMIT=%{rstudio_git_revision_hash} ; \
41     export PACKAGE_OS=$(cat /etc/mageia-release)
42 kekepower 1567639
43 squidf 2053327 # Do not build non-lto objects, as that may result in
44     # memory exhaustion by the linker.
45     %global optflags %(echo '%{optflags}' | sed -e 's!-ffat-lto-objects!-fno-fat-lto-objects!g')
46 joequant 612836
47 squidf 2053327 Name: rstudio
48 squidf 2053328 Version: %{rstudio_version}%{?rstudio_version_suffix:+%rstudio_version_suffix}
49 daviddavid 2077511 Release: %mkrel 1
50 squidf 2053327 Summary: RStudio IDE is a powerful and productive user interface for R
51     Group: Sciences/Mathematics
52 kekepower 1251038 ExcludeArch: %{arm} aarch64
53 kekepower 1204384
54 squidf 2053327 # See NOTICE file
55     License: AGPLv3
56 daviddavid 2077511 URL: https://github.com/rstudio/rstudio
57     Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
58 squidf 2053327 Source3: %{name}.metainfo.xml
59     # Unbundle mathjax, pandoc, hunspell dictionaries, qtsingleapplication
60 daviddavid 2077511 Patch0: rstudio-2024.04.2-unbundle-dependencies-common.patch
61 squidf 2053460 Patch1: rstudio-2023.12.1-unbundle-qtsingleapplication.patch
62 squidf 2053327 # Remove the installation prefix from the exec path in the .desktop file
63 squidf 2053460 Patch2: rstudio-2023.12.1-fix-rstudio-exec-path.patch
64 squidf 2053327 # We don't want to set RSTUDIO_PACKAGE_BUILD
65 squidf 2053460 Patch3: rstudio-2023.12.1-fix-resources-path.patch
66 squidf 2053505 #squidf: for i586
67     Patch5: rstudio-2023.12.1-disable-quarto.patch
68 squidf 2053327 # https://github.com/rstudio/rstudio/issues/9854
69     # We don't need this with our version of QtWebEngine
70 squidf 2053460 Patch6: rstudio-2023.12.1-do-not-disable-seccomp-filter-sandbox.patch
71 squidf 2053696 # Squidf: panmirror from Fedora fails for i586
72     Patch7: rstudio-2023.12.1-remove-panmirror.patch
73 daviddavid 2077476 # adapt to boost 1.85
74     Patch8: rstudio-2023.12.1-fix-boost-1.85-build.patch
75 joequant 658857
76 squidf 2053327 BuildRequires: cmake, ant
77     BuildRequires: extra-cmake-modules
78 daviddavid 2077511 BuildRequires: java-devel
79 squidf 2053327 BuildRequires: R-base
80     BuildRequires: yarnpkg, jq
81     BuildRequires: nodejs
82     BuildRequires: mathjax
83     BuildRequires: lato-fonts
84     BuildRequires: soci-postgresql-devel, soci-sqlite3-devel
85     BuildRequires: pkgconfig(appstream-glib)
86     BuildRequires: pkgconfig(pam)
87     BuildRequires: pkgconfig(systemd)
88     BuildRequires: pkgconfig(uuid)
89     BuildRequires: pkgconfig(openssl)
90     BuildRequires: cmake(boost)
91     BuildRequires: cmake(yaml-cpp)
92     BuildRequires: cmake(websocketpp)
93     BuildRequires: cmake(fmt)
94 daviddavid 2077511 BuildRequires: cmake(tl-expected)
95 squidf 2053327 BuildRequires: cmake(Qt5Location)
96     BuildRequires: cmake(Qt5OpenGL)
97     BuildRequires: cmake(Qt5Sensors)
98     BuildRequires: cmake(Qt5Sql)
99     BuildRequires: cmake(Qt5Svg)
100     BuildRequires: cmake(Qt5WebEngine)
101     BuildRequires: cmake(Qt5WebChannel)
102     BuildRequires: cmake(Qt5Xml)
103     BuildRequires: cmake(Qt5XmlPatterns)
104     BuildRequires: qtsingleapplication-qt5-devel
105     BuildRequires: rapidxml-devel
106     BuildRequires: hicolor-icon-theme
107 kekepower 1194374
108 squidf 2053327 Requires: hunspell
109     Requires: R-base
110     Requires: rstudio-common
111 joequant 612836
112 squidf 2053327 Provides: bundled(gwt) = %{bundled_gwt_version}
113     Provides: bundled(gwt-websockets) = %{bundled_websockets_version}
114     Provides: bundled(gin) = %{bundled_gin_version}
115     Provides: bundled(elemental2) = %{bundled_elemental2_version}
116     Provides: bundled(junit) = %{bundled_junit_version}
117     Provides: bundled(guice) = %{bundled_guice_version}
118     Provides: bundled(aopalliance) = %{bundled_aopalliance_version}
119     Provides: bundled(rapidjson-devel) = %{bundled_rapidjson_version}
120     Provides: bundled(tree-hh-devel) = %{bundled_treehh_version}
121     Provides: bundled(sundown) = %{bundled_sundown_version}
122     Provides: bundled(synctex) = %{bundled_synctex_version}
123     Provides: bundled(guidelines-support-library-lite-devel) = %{bundled_gsllite_version}
124     Provides: bundled(js-ace) = %{bundled_ace_version}
125     Provides: bundled(js-datatables) = %{bundled_datatables_version}
126     Provides: bundled(js-jquery) = %{bundled_jquery_version}
127     Provides: bundled(js-pdf) = %{bundled_pdfjs_version}
128     Provides: bundled(js-reveal) = %{bundled_revealjs_version}
129     Provides: bundled(js-bn) = %{bundled_jsbn_version}
130     Provides: bundled(js-highlight) = %{bundled_highlightjs_version}
131     Provides: bundled(js-qunit) = %{bundled_qunitjs_version}
132     Provides: bundled(js-xterm) = %{bundled_xtermjs_version}
133     Provides: bundled(js-inert-polyfill) = %{bundled_inertpol_version}
134     Provides: bundled(js-focus-visible) = %{bundled_focusvis_version}
135     Provides: bundled(js-yaml) = %{bundled_jsyaml_version}
136 kekepower 1194374
137 joequant 612836 %description
138 squidf 2053460 This package provides the Desktop version, to access the RStudio IDE locally.
139    
140    
141     %package common
142     Summary: RStudio base package
143     Group: Sciences/Mathematics
144     Requires: R-base
145     Requires(post): systemd >= %{systemd_required_version}
146     Requires: hicolor-icon-theme, shared-mime-info
147    
148     %description common
149 kekepower 1201268 RStudio is an integrated development environment (IDE) for the R programming
150     language. Some of its features include:
151 joequant 612836
152 kekepower 1201268 - Customizable workbench with all of the tools required to work with R in one
153     place (console, source, plots, workspace, help, history, etc.).
154     - Syntax highlighting editor with code completion.
155     - Execute code directly from the source editor (line, selection, or file).
156     - Full support for authoring Sweave and TeX documents.
157     - Runs on all major platforms (Windows, Mac, and Linux) and can also be run
158     as a server, enabling multiple users to access the RStudio IDE using a web
159     browser.
160    
161 squidf 2053460 This package provides common files for %{name} and %{name}-server.
162 joequant 612836
163    
164 squidf 2053327 %package server
165     Summary: Access RStudio via a web browser
166     Group: Sciences/Mathematics
167     Requires: R-base
168     Requires: rstudio-common
169     Requires(post): rpm-helper >= %{rpmhelper_required_version}
170     Requires(preun): rpm-helper >= %{rpmhelper_required_version}
171    
172     %description server
173     This package provides the Server version, a browser-based interface to the RStudio IDE.
174    
175 squidf 2053460
176 joequant 612836 %prep
177 squidf 2053327 %autosetup -p1 -n %{name}-%{rstudio_version}-%{rstudio_version_suffix}
178 joequant 612836
179 squidf 2053327 # use system libraries when available
180 daviddavid 2077511 rm -rf src/cpp/desktop/3rdparty src/cpp/ext/{websocketpp,fmt,expected}
181 squidf 2053327 sed -i '/fmt/d' src/cpp/ext/CMakeLists.txt
182     sed -i '/target_link_libraries(rstudio-core/i find_package(fmt REQUIRED)' \
183     src/cpp/core/CMakeLists.txt
184     ln -sf %{_includedir}/rapidxml.h src/cpp/core/include/core/rapidxml/rapidxml.hpp
185     ln -sf %{_includedir}/websocketpp src/cpp/ext/websocketpp
186 daviddavid 2077511 ln -sf %{_includedir}/tl src/cpp/ext/expected
187 daviddavid 1483752
188 joequant 612836 %build
189 squidf 2053327 %{rstudio_flags}
190     %cmake -B build \
191     -DRSTUDIO_TARGET=Desktop \
192     -DRSTUDIO_DESKTOP=TRUE \
193     -DQUARTO_ENABLED=FALSE \
194     -DQT_QMAKE_EXECUTABLE=%{_qt5_bindir}/qmake \
195 daviddavid 2077511 -DRSTUDIO_DISABLE_CHECK_FOR_UPDATES=1 \
196 squidf 2053327 -DRSTUDIO_SERVER=TRUE \
197     -DCMAKE_BUILD_TYPE=Release \
198     -DRSTUDIO_USE_SYSTEM_SOCI=Yes \
199     -DRSTUDIO_USE_SYSTEM_BOOST=Yes \
200     -DRSTUDIO_USE_SYSTEM_YAML_CPP=Yes \
201 squidf 2053502 -DBOOST_ROOT=%{_prefix} \
202 daviddavid 2077511 -DRSTUDIO_BOOST_REQUESTED_VERSION=1.85.0 \
203 squidf 2053327 -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name}
204     %make_build -C build # ALL
205 joequant 612836
206     %install
207 squidf 2053327 %{rstudio_flags}
208     %make_install -C build
209     # expose symlinks in /usr/bin
210     install -d -m 0755 %{buildroot}%{_bindir}
211 joequant 612836 ln -s %{_libdir}/%{name}/bin/%{name} %{buildroot}%{_bindir}/%{name}
212 squidf 2053327 for bin in %{name}-server rserver rserver-pam; do
213     ln -s %{_libdir}/%{name}/bin/${bin} %{buildroot}%{_bindir}/${bin}
214     done
215 joequant 612836
216 squidf 2053327 #squidf: install desktop file with same categories than R-base
217     desktop-file-install \
218     --add-category="Science;Math" \
219     --remove-category="Development;IDE" \
220     --dir=%{buildroot}%{_datadir}/applications \
221     %{buildroot}%{_datadir}/applications/%{name}.desktop
222 joequant 615245
223 squidf 2053327 mkdir -p %{buildroot}%{_metainfodir}
224     install -m 0644 %{SOURCE3} %{buildroot}%{_metainfodir}/
225     appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.metainfo.xml
226 joequant 612836
227 squidf 2053327 # create required directories for rstudio-server (according to INSTALL)
228     mkdir -p %{buildroot}%{_sharedstatedir}/%{name}-server
229 joequant 612836
230 squidf 2053327 # install the systemd service file and change /var/run -> /run
231     install -D -m 0644 \
232     %{buildroot}%{_libdir}/%{name}/extras/systemd/%{name}-server.service \
233     %{buildroot}%{_unitdir}/%{name}-server.service
234     sed -i 's@/var/run@/run@g' %{buildroot}%{_unitdir}/%{name}-server.service
235    
236     # install the PAM module
237     mkdir -p %{buildroot}%{_sysconfdir}/pam.d
238     install -m 0644 \
239     %{buildroot}%{_libdir}/%{name}/extras/pam/%{name} \
240     %{buildroot}%{_sysconfdir}/pam.d/%{name}
241    
242     # symlink the location where the bundled dependencies should be
243     pushd %{buildroot}%{_libdir}/%{name}/bin
244     ln -sf %{_bindir}/node node
245 kekepower 1204384 popd
246 squidf 2053327 pushd %{buildroot}%{_libdir}/%{name}/resources
247 squidf 2053502 ln -sf %{_datadir}/hunspell dictionaries
248 squidf 2053327 ln -sf %{_datadir}/javascript/mathjax mathjax-%{mathjax_short}
249     pushd presentation/revealjs/fonts
250     for fnt in Lato*.ttf; do
251     ln -sf %{_datadir}/fonts/lato/${fnt} ${fnt}
252     done
253     popd
254 squidf 2053502 # move and symlink bundled libraries
255     mv grid/datatables grid/datatables.bundled
256     ln -sf ./datatables.bundled grid/datatables
257     mv pdfjs pdfjs.bundled
258     ln -sf ./pdfjs.bundled pdfjs
259     mv presentation/revealjs presentation/revealjs.bundled
260     ln -sf ./revealjs.bundled presentation/revealjs
261 squidf 2053327 popd
262 kekepower 1203854
263 squidf 2053327 # clean up
264     pushd %{buildroot}%{_libdir}/%{name}
265     for f in .gitignore .Rbuildignore LICENSE README; do
266     find . -name ${f} -delete
267     done
268     rm -rf {extras,INSTALL,COPYING,NOTICE,README.md,SOURCE,VERSION}
269     popd
270    
271 squidf 2053502 #squidf: clean deprecated directories
272     # Can be removed with MGA11
273     %pretrans -p <lua>
274     path = "%{_libdir}/%{name}/resources/dictionaries"
275     st = posix.stat(path)
276     if st and st.type == "directory" then
277     status = os.rename(path, path .. ".rpmmoved")
278     if not status then
279     suffix = 0
280     while not status do
281     suffix = suffix + 1
282     status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
283     end
284     os.rename(path, path .. ".rpmmoved")
285     end
286     end
287 squidf 2053460
288 squidf 2053502 path = "%{_libdir}/%{name}/resources/grid/datatables"
289     st = posix.stat(path)
290     if st and st.type == "directory" then
291     status = os.rename(path, path .. ".rpmmoved")
292     if not status then
293     suffix = 0
294     while not status do
295     suffix = suffix + 1
296     status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
297     end
298     os.rename(path, path .. ".rpmmoved")
299     end
300     end
301    
302     path = "%{_libdir}/%{name}/resources/presentation/revealjs"
303     st = posix.stat(path)
304     if st and st.type == "directory" then
305     status = os.rename(path, path .. ".rpmmoved")
306     if not status then
307     suffix = 0
308     while not status do
309     suffix = suffix + 1
310     status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
311     end
312     os.rename(path, path .. ".rpmmoved")
313     end
314     end
315    
316     path = "%{_libdir}/%{name}/resources/pdfjs"
317     st = posix.stat(path)
318     if st and st.type == "directory" then
319     status = os.rename(path, path .. ".rpmmoved")
320     if not status then
321     suffix = 0
322     while not status do
323     suffix = suffix + 1
324     status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
325     end
326     os.rename(path, path .. ".rpmmoved")
327     end
328     end
329    
330     %pre server
331 squidf 2053327 # add user rstudio-server
332 kekepower 1203854 %_pre_useradd %{name}-server %{_localstatedir}/lib/%{name}-server /bin/false
333 kekepower 1201557
334 luigiwalser 1476742 %post server
335 luigiwalser 1476690 %_tmpfilescreate %{_tmpfilesdir}/%{name}-server
336 daviddavid 1477078 %_post_service %{name}-server
337 kekepower 1201557
338 luigiwalser 1476742 %preun server
339 daviddavid 1477078 %_preun_service %{name}-server
340 kekepower 1201557
341 luigiwalser 1476742 %postun server
342 kekepower 1201557 %_postun_userdel %{name}-server
343    
344 squidf 2053327 %triggerun server -- %{name}-server
345     chown -R %{name}-server:%{name}-server %{_sharedstatedir}/%{name}-server
346    
347 joequant 612836 %files
348     %{_bindir}/%{name}
349 squidf 2053327 %dir %{_libdir}/%{name}
350     %{_libdir}/%{name}/R
351     %dir %{_libdir}/%{name}/bin
352     %{_libdir}/%{name}/bin/node
353     %{_libdir}/%{name}/bin/postback
354     %{_libdir}/%{name}/bin/r-ldpath
355     %{_libdir}/%{name}/bin/rpostback
356     %{_libdir}/%{name}/bin/rsession
357     %{_libdir}/%{name}/resources
358     %{_libdir}/%{name}/www
359     %{_libdir}/%{name}/www-symbolmaps
360    
361     %files common
362 squidf 2053696 %license COPYING NOTICE
363 squidf 2053327 %doc README.md
364     %{_libdir}/%{name}/%{name}.png
365     %{_libdir}/%{name}/bin/diagnostics
366     %{_libdir}/%{name}/bin/%{name}
367     %{_libdir}/%{name}/bin/%{name}-backtrace.sh
368 kekepower 1205234 %{_datadir}/applications/%{name}.desktop
369 squidf 2053327 %{_datadir}/icons/hicolor/*/apps/*
370     %{_datadir}/icons/hicolor/*/mimetypes/*
371     %{_datadir}/mime/packages/%{name}.xml
372     %{_datadir}/pixmaps/%{name}.png
373     %{_metainfodir}/%{name}.metainfo.xml
374 joequant 612836
375     %files server
376     %{_bindir}/%{name}-server
377 joequant 615245 %{_bindir}/rserver
378 squidf 2053327 %{_bindir}/rserver-pam
379     %{_libdir}/%{name}/bin/crash-handler-proxy
380     %{_libdir}/%{name}/bin/rserver
381     %{_libdir}/%{name}/bin/rserver-pam
382     %{_libdir}/%{name}/bin/rserver-url
383     %{_libdir}/%{name}/bin/%{name}-server
384     %{_libdir}/%{name}/db
385     %dir %{_sharedstatedir}/%{name}-server
386     %{_unitdir}/%{name}-server.service
387     %config(noreplace) %{_sysconfdir}/pam.d/%{name}

  ViewVC Help
Powered by ViewVC 1.1.30