%global __brp_check_rpaths %{nil} %global packname LST %global packver 1.1.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.1.0 Release: 1%{?dist}%{?buildtag} Summary: Land Surface Temperature Retrieval for Landsat 8 License: AGPL-3 URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.5.0 Requires: R-core >= 3.5.0 BuildArch: noarch BuildRequires: R-CRAN-raster Requires: R-CRAN-raster %description Calculates Land Surface Temperature from Landsat band 10 and 11. Revision of the Single-Channel Algorithm for Land Surface Temperature Retrieval From Landsat Thermal-Infrared Data. Jimenez-Munoz JC, Cristobal J, Sobrino JA, et al (2009). . Land surface temperature retrieval from LANDSAT TM 5. Sobrino JA, Jiménez-Muñoz JC, Paolini L (2004). . Surface temperature estimation in Singhbhum Shear Zone of India using Landsat-7 ETM+ thermal infrared data. Srivastava PK, Majumdar TJ, Bhattacharya AK (2009). . Mapping land surface emissivity from NDVI: Application to European, African, and South American areas. Valor E (1996). . On the relationship between thermal emissivity and the normalized difference vegetation index for natural surfaces. Van de Griend AA, Owe M (1993). . Land Surface Temperature Retrieval from Landsat 8 TIRS—Comparison between Radiative Transfer Equation-Based Method, Split Window Algorithm and Single Channel Method. Yu X, Guo X, Wu Z (2014). . Calibration and Validation of land surface temperature for Landsat8-TIRS sensor. Land product validation and evolution. Skoković D, Sobrino JA, Jimenez-Munoz JC, Soria G, Julien Y, Mattar C, Cristóbal J. (2014). %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 # 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}