%global __brp_check_rpaths %{nil} %global __requires_exclude ^libmpi %global packname Spectran %global packver 1.0.6 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.0.6 Release: 1%{?dist}%{?buildtag} Summary: Visual and Non-Visual Spectral Analysis of Light License: MIT + file LICENSE URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 2.10 Requires: R-core >= 2.10 BuildArch: noarch BuildRequires: R-CRAN-chromote BuildRequires: R-CRAN-colorSpec BuildRequires: R-CRAN-cowplot BuildRequires: R-CRAN-dplyr BuildRequires: R-CRAN-gghighlight BuildRequires: R-CRAN-ggplot2 BuildRequires: R-CRAN-ggrepel BuildRequires: R-CRAN-ggridges BuildRequires: R-CRAN-ggtext BuildRequires: R-grid BuildRequires: R-CRAN-gt BuildRequires: R-CRAN-htmltools BuildRequires: R-CRAN-magrittr BuildRequires: R-CRAN-openxlsx BuildRequires: R-CRAN-pagedown BuildRequires: R-CRAN-patchwork BuildRequires: R-CRAN-png BuildRequires: R-CRAN-purrr BuildRequires: R-CRAN-readr BuildRequires: R-CRAN-rlang BuildRequires: R-CRAN-scales BuildRequires: R-CRAN-shiny BuildRequires: R-CRAN-shinyalert BuildRequires: R-CRAN-shinydashboard BuildRequires: R-CRAN-shinyFeedback BuildRequires: R-CRAN-shinyjs BuildRequires: R-CRAN-shinyWidgets BuildRequires: R-CRAN-spacesXYZ BuildRequires: R-CRAN-spsComps BuildRequires: R-stats BuildRequires: R-CRAN-stringr BuildRequires: R-CRAN-tibble BuildRequires: R-CRAN-tidyr BuildRequires: R-CRAN-tidyselect BuildRequires: R-utils BuildRequires: R-CRAN-waiter BuildRequires: R-CRAN-webshot2 BuildRequires: R-CRAN-withr Requires: R-CRAN-chromote Requires: R-CRAN-colorSpec Requires: R-CRAN-cowplot Requires: R-CRAN-dplyr Requires: R-CRAN-gghighlight Requires: R-CRAN-ggplot2 Requires: R-CRAN-ggrepel Requires: R-CRAN-ggridges Requires: R-CRAN-ggtext Requires: R-grid Requires: R-CRAN-gt Requires: R-CRAN-htmltools Requires: R-CRAN-magrittr Requires: R-CRAN-openxlsx Requires: R-CRAN-pagedown Requires: R-CRAN-patchwork Requires: R-CRAN-png Requires: R-CRAN-purrr Requires: R-CRAN-readr Requires: R-CRAN-rlang Requires: R-CRAN-scales Requires: R-CRAN-shiny Requires: R-CRAN-shinyalert Requires: R-CRAN-shinydashboard Requires: R-CRAN-shinyFeedback Requires: R-CRAN-shinyjs Requires: R-CRAN-shinyWidgets Requires: R-CRAN-spacesXYZ Requires: R-CRAN-spsComps Requires: R-stats Requires: R-CRAN-stringr Requires: R-CRAN-tibble Requires: R-CRAN-tidyr Requires: R-CRAN-tidyselect Requires: R-utils Requires: R-CRAN-waiter Requires: R-CRAN-webshot2 Requires: R-CRAN-withr %description Analyse light spectra for visual and non-visual (often called melanopic) needs, wrapped up in a Shiny App. 'Spectran' allows for the import of spectra in various CSV forms but also provides a wide range of example spectra and even the creation of own spectral power distributions. The goal of the app is to provide easy access and a visual overview of the spectral calculations underlying common parameters used in the field. It is thus ideal for educational purposes or the creation of presentation ready graphs in lighting research and application. 'Spectran' uses equations and action spectra described in CIE S026 (2018) , DIN/TS 5031-100 (2021) , and ISO/CIE 23539 (2023) . %prep %setup -q -c -n %{packname} # fix end of executable files find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; # prevent binary stripping [ -d %{packname}/src ] && find %{packname}/src -type f -exec \ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true [ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \ sed -i 's@-g0@@g' {} \; || true # don't allow local prefix in executable scripts find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \; %build %install mkdir -p %{buildroot}%{rlibdir} %{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname} test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) rm -f %{buildroot}%{rlibdir}/R.css # remove buildroot from installed files find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \; %files %{rlibdir}/%{packname}