File R-rtiff.spec of Package R-rtiff

#
# spec file for package R-rtiff
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%global packname  rtiff
%global rlibdir   %{_libdir}/R/library
Name:           R-%{packname}
Version:        1.4.5
Release:        0
Summary:        A tiff reader for R
License:        GPL-3.0
Group:          Development/Libraries/Other
Url:            https://cran.r-project.org/web/packages/rtiff
Source0:        https://cran.r-project.org/src/contrib/rtiff_1.4.5.tar.gz
BuildRequires:  R-base-devel
BuildRequires:    gcc-c++
BuildRequires:  R-pixmap
BuildRequires:  fdupes
BuildRequires:  libtiff-devel
BuildRequires:  texinfo
# Package suggestions
BuildRequires:  texlive
Requires:       R-base
Requires:       R-pixmap
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# Package suggestions, not required to build
#BuildRequires:

%description
This package will read and write TIFF format images and return them as a
pixmap object. Because the resulting object can be very large for even
modestly sized TIFF images, images can be reduced as they are read for
improved performance.  This package is a wrapper around libtiff
(www.libtiff.org), on which it depends (i.e. the libtiff shared library
must be on your PATH for the binary to work, and tiffio.h must be on your
system to build the package from source). By using libtiff's highlevel
TIFFReadRGBAImage function, this package inherently support a wide range
of image formats and compression schemes. This package also provides an
implementation of the Ridler Autothresholding algorithm for easy
generation of binary masks.

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

%build

%install
export R_LIBS="%{_datadir}/R/library"
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

%files
%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%dir %{rlibdir}/%{packname}/libs
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/tiff
%{rlibdir}/%{packname}/libs/rtiff.so

%changelog
openSUSE Build Service is sponsored by