Blame R-igraph.spec

472dcb8
%global packname  igraph
472dcb8
%global rlibdir  %{_libdir}/R/library
472dcb8
472dcb8
# Some loops; some unavailable yet.
472dcb8
%global with_suggests 0
472dcb8
# Examples use the network.
472dcb8
%bcond_with network
472dcb8
472dcb8
Name:             R-%{packname}
472dcb8
Version:          1.2.1
472dcb8
Release:          1%{?dist}
472dcb8
Summary:          Network Analysis and Visualization
472dcb8
472dcb8
# Main: GPLv2+; html_library.tcl: TCL
472dcb8
License:          GPLv2+ and TCL
472dcb8
URL:              https://cran.r-project.org/web/packages/%{packname}/index.html
472dcb8
Source0:          https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
472dcb8
# Unbundle some things:
472dcb8
Patch0001:        0001-Unbundle-uuid.patch
472dcb8
Patch0002:        0002-Unbundle-arpack.patch
472dcb8
Patch0003:        0003-Increase-tolerances-to-work-everywhere.patch
472dcb8
472dcb8
# Here's the R view of the dependencies world:
472dcb8
# Depends:   R-methods
472dcb8
# Imports:   R-graphics, R-grDevices, R-magrittr, R-Matrix, R-pkgconfig >= 2.0.0, R-stats, R-utils
472dcb8
# Suggests:  R-ape, R-graph, R-igraphdata, R-rgl, R-scales, R-stats4, R-tcltk, R-testthat
472dcb8
# LinkingTo:
472dcb8
# Enhances:
472dcb8
472dcb8
Requires:         R-methods
472dcb8
Requires:         R-graphics
472dcb8
Requires:         R-grDevices
472dcb8
Requires:         R-magrittr
472dcb8
Requires:         R-Matrix
472dcb8
Requires:         R-pkgconfig >= 2.0.0
472dcb8
Requires:         R-stats
472dcb8
Requires:         R-utils
472dcb8
Suggests:         R-ape
472dcb8
Suggests:         R-graph
472dcb8
Suggests:         R-rgl
472dcb8
Suggests:         R-stats4
472dcb8
Suggests:         R-tcltk
472dcb8
Suggests:         R-testthat
472dcb8
BuildRequires:    R-devel
472dcb8
BuildRequires:    tex(latex)
472dcb8
BuildRequires:    R-methods
472dcb8
BuildRequires:    R-graphics
472dcb8
BuildRequires:    R-grDevices
472dcb8
BuildRequires:    R-magrittr
472dcb8
BuildRequires:    R-Matrix
472dcb8
BuildRequires:    R-pkgconfig >= 2.0.0
472dcb8
BuildRequires:    R-stats
472dcb8
BuildRequires:    R-utils
472dcb8
BuildRequires:    R-ape
472dcb8
BuildRequires:    R-stats4
472dcb8
BuildRequires:    R-tcltk
472dcb8
BuildRequires:    R-testthat
472dcb8
%if %{with_suggests}
472dcb8
BuildRequires:    R-graph
472dcb8
BuildRequires:    R-igraphdata
472dcb8
BuildRequires:    R-rgl
472dcb8
BuildRequires:    R-scales
472dcb8
%endif
472dcb8
BuildRequires:    arpack-devel
472dcb8
BuildRequires:    glpk-devel
472dcb8
BuildRequires:    gmp-devel
472dcb8
BuildRequires:    libuuid-devel
472dcb8
BuildRequires:    libxml2-devel
472dcb8
BuildRequires:    openblas-devel
472dcb8
472dcb8
# https://github.com/igraph/rigraph/issues/268
472dcb8
# Not a released version.
472dcb8
Provides: bundled(igraph) = 9acfa54fa6b3d182fe458434a497f4e9b5c39955
472dcb8
472dcb8
%description
472dcb8
Routines for simple graphs and network analysis. It can handle large
472dcb8
graphs very well and provides functions for generating random and regular
472dcb8
graphs, graph visualization, centrality methods and much more.
472dcb8
472dcb8
472dcb8
%prep
472dcb8
%setup -q -c -n %{packname}
472dcb8
472dcb8
pushd %{packname}
472dcb8
# Remove bundled bits.
472dcb8
%patch0001 -p1
472dcb8
%patch0002 -p1
472dcb8
%patch0003 -p1
472dcb8
472dcb8
# Fix executable files.
472dcb8
chmod -x src/simpleraytracer/*.*
472dcb8
popd
472dcb8
472dcb8
472dcb8
%build
472dcb8
472dcb8
472dcb8
%install
472dcb8
mkdir -p %{buildroot}%{rlibdir}
472dcb8
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
472dcb8
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
472dcb8
rm -f %{buildroot}%{rlibdir}/R.css
472dcb8
472dcb8
472dcb8
%check
472dcb8
%if !%{with network}
472dcb8
ARGS=--no-examples
472dcb8
%endif
472dcb8
%if %{with_suggests}
472dcb8
%{_bindir}/R CMD check %{packname} $ARGS
472dcb8
%else
472dcb8
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} $ARGS
472dcb8
%endif
472dcb8
472dcb8
472dcb8
%files
472dcb8
%dir %{rlibdir}/%{packname}
472dcb8
%doc %{rlibdir}/%{packname}/html
472dcb8
%{rlibdir}/%{packname}/DESCRIPTION
472dcb8
%doc %{rlibdir}/%{packname}/NEWS.md
472dcb8
%doc %{rlibdir}/%{packname}/AUTHORS
472dcb8
%doc %{rlibdir}/%{packname}/CITATION
472dcb8
%doc %{rlibdir}/%{packname}/README.md
472dcb8
%{rlibdir}/%{packname}/INDEX
472dcb8
%{rlibdir}/%{packname}/NAMESPACE
472dcb8
%{rlibdir}/%{packname}/Meta
472dcb8
%{rlibdir}/%{packname}/R
472dcb8
%{rlibdir}/%{packname}/help
472dcb8
%{rlibdir}/%{packname}/benchmarks
472dcb8
%{rlibdir}/%{packname}/demo
472dcb8
%{rlibdir}/%{packname}/html_library.tcl
472dcb8
%license %{rlibdir}/%{packname}/html_library.license.terms
472dcb8
%{rlibdir}/%{packname}/igraph.gif
472dcb8
%{rlibdir}/%{packname}/igraph2.gif
472dcb8
%dir %{rlibdir}/%{packname}/libs
472dcb8
%{rlibdir}/%{packname}/libs/%{packname}.so
472dcb8
%{rlibdir}/%{packname}/my_html_library.tcl
472dcb8
%{rlibdir}/%{packname}/tkigraph_help
472dcb8
472dcb8
472dcb8
%changelog
472dcb8
* Mon Jul 23 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.1-1
472dcb8
- initial package for Fedora