## START: Set by rpmautospec
## (rpmautospec version 0.3.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 2;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%bcond_with check

%global packname pillar
%global packver  1.9.0
%global rlibdir  %{_datadir}/R/library

Name:             R-%{packname}
Version:          %{packver}
Release:          %autorelease
Summary:          Coloured Formatting for Columns

License:          MIT
URL:              https://CRAN.R-project.org/package=%{packname}
Source0:          https://cran.r-project.org/src/contrib/%{packname}_%{packver}.tar.gz

# Here's the R view of the dependencies world:
# Depends:
# Imports:   R-cli >= 2.3.0, R-fansi, R-glue, R-lifecycle, R-rlang >= 1.0.2, R-utf8 >= 1.1.0, R-utils, R-vctrs >= 0.3.8
# Suggests:  R-bit64, R-debugme, R-DiagrammeR, R-dplyr, R-formattable, R-ggplot2, R-knitr, R-lubridate, R-nanotime, R-nycflights13, R-palmerpenguins, R-rmarkdown, R-scales, R-stringi, R-survival, R-testthat >= 3.1.1, R-tibble, R-units >= 0.7.2, R-vdiffr, R-withr
# LinkingTo:
# Enhances:

BuildArch:        noarch
BuildRequires:    R-devel
BuildRequires:    tex(latex)
BuildRequires:    R-cli >= 2.3.0
BuildRequires:    R-fansi
BuildRequires:    R-glue
BuildRequires:    R-lifecycle
BuildRequires:    R-rlang >= 1.0.2
BuildRequires:    R-utf8 >= 1.1.0
BuildRequires:    R-utils
BuildRequires:    R-vctrs >= 0.5.0
%if %{with check}
BuildRequires:    R-bit64
BuildRequires:    R-debugme
BuildRequires:    R-DiagrammeR
BuildRequires:    R-dplyr
BuildRequires:    R-formattable
BuildRequires:    R-ggplot2
BuildRequires:    R-knitr
BuildRequires:    R-lubridate
BuildRequires:    R-nanotime
BuildRequires:    R-nycflights13
BuildRequires:    R-palmerpenguins
BuildRequires:    R-rmarkdown
BuildRequires:    R-scales
BuildRequires:    R-stringi
BuildRequires:    R-survival
BuildRequires:    R-testthat >= 3.1.1
BuildRequires:    R-tibble
BuildRequires:    R-units >= 0.7.2
BuildRequires:    R-vdiffr
BuildRequires:    R-withr
%endif

%description
Provides 'pillar' and 'colonnade' generics designed for formatting columns
of data using the full range of colours provided by modern terminals.


%prep
%setup -q -c -n %{packname}


%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


%check
%if %{with check}
export LANG=C.UTF-8
%{_bindir}/R CMD check %{packname}
%endif


%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/doc
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS.md
%license %{rlibdir}/%{packname}/LICENSE
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/WORDLIST


%changelog
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Fri Apr 21 2023 Iñaki Úcar <iucar@fedoraproject.org> - 1.9.0-1
- Update to latest version

* Fri Apr 21 2023 Iñaki Úcar <iucar@fedoraproject.org> - 1.8.1-2
- R-maint-sig mass rebuild

* Tue Mar 14 2023 Tom Callaway <spot@fedoraproject.org> - 1.8.1-1
- 1.8.1

* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Sun Sep 04 2022 Iñaki Úcar <iucar@fedoraproject.org> - 1.8.0-3
- Switch bootstrap -> check to avoid checking those, package
  R-DiagrammeR|palmerpenguis|vdiffr not available

* Sun Sep 04 2022 Iñaki Úcar <iucar@fedoraproject.org> - 1.8.0-2
- Disable bootstrap

* Thu Aug 18 2022 Tom Callaway <spot@fedoraproject.org> - 1.8.0-1
- update to 1.8.0
- rebuilt for R 4.2.1
- bootstrap

* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Thu Jun 10 2021 Tom Callaway <spot@fedoraproject.org> - 1.6.1-1
- update to 1.6.1
- Rebuilt for R 4.1.0
- bootstrap

* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Sat Nov 28 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.7-1
- Update to latest version (#1899843)
- Rename check conditional as bootstrap

* Sun Aug 09 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.6-2
- Re-enable checks

* Sun Aug 09 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.6-1
- Update to latest version (rhbz#1855466)

* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Sat Jun  6 2020 Tom Callaway <spot@fedoraproject.org> - 1.4.4-2
- rebuild for R 4
- break loop

* Thu May 21 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.4-1
- Update to latest version

* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Tue Jan 07 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.3-1
- Update to latest version

* Sun Aug 11 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.2-3
- Remove explicit dependencies provided by automatic dependency generator

* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Tue Jul 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.2-1
- Update to latest version

* Tue May 28 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.1-1
- Update to latest version

* Wed May 22 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.0-1
- Update to latest version

* Wed Feb 20 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.1-1
- Update to latest version

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Wed Jul 25 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.0-1
- Update to latest version

* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu May 31 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.3-1
- initial package for Fedora