Blame SPECS/imath.spec

96f256
%global srcname Imath
96f256
%global sover 29
96f256
%global pyver_under %(%{python3} -Esc "import sys; sys.stdout.write('{0.major}_{0.minor}'.format(sys.version_info))")
96f256
96f256
Name:           imath
96f256
Version:        3.1.2
96f256
Release:        1%{?dist}
96f256
Summary:        Library of 2D and 3D vector, matrix, and math operations for computer graphics
96f256
96f256
License:        BSD
96f256
URL:            https://github.com/AcademySoftwareFoundation/Imath
96f256
Source0:        https://github.com/AcademySoftwareFoundation/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
96f256
Patch1:         imath-python-test.patch
96f256
96f256
BuildRequires:  cmake
96f256
BuildRequires:  gcc gcc-c++
96f256
BuildRequires:  make
96f256
BuildRequires:  boost-devel
96f256
BuildRequires:  python3-devel
96f256
# For documentation generation
96f256
BuildRequires:  doxygen
96f256
BuildRequires:  python3-sphinx
96f256
BuildRequires:  python3-breathe
96f256
96f256
%description
96f256
Imath is a basic, light-weight, and efficient C++ representation of 2D and 3D
96f256
vectors and matrices and other simple but useful mathematical objects,
96f256
functions, and data types common in computer graphics applications, including
96f256
the “half” 16-bit floating-point type.
96f256
96f256
96f256
%package -n python3-%{name}
96f256
Requires:       %{name}%{?_isa} = %{version}-%{release}
96f256
Summary:        Python module for Imath
96f256
96f256
%description -n python3-%{name}
96f256
%{summary}.
96f256
96f256
96f256
%package devel
96f256
Summary:        Development files for Imath
96f256
Requires:       %{name}%{?_isa} = %{version}-%{release}
96f256
Requires:       python3-%{name}%{?_isa} = %{version}-%{release}
96f256
Requires:       boost-devel
96f256
Requires:       python3-devel
96f256
96f256
%description devel
96f256
%{summary}.
96f256
96f256
96f256
%prep
96f256
%autosetup -n %{srcname}-%{version} -p1
96f256
96f256
96f256
%build
96f256
%cmake -DPYTHON=ON -DCMAKE_INSTALL_PREFIX=%{_usr}
96f256
%cmake_build
96f256
96f256
# Generate man docs
96f256
cd docs
96f256
doxygen
96f256
cd ..
96f256
PYTHONPATH=${PWD} sphinx-build-3 docs/ html
96f256
# Remove the sphinx-build leftovers
96f256
rm -rf html/.{doctrees,buildinfo}
96f256
96f256
96f256
%install
96f256
DESTDIR=%{buildroot} %cmake_install
96f256
96f256
96f256
%check
96f256
# https://github.com/AcademySoftwareFoundation/Imath/issues/151
96f256
%ifnarch i686
96f256
%ctest
96f256
%endif
96f256
96f256
96f256
%files
96f256
%license LICENSE.md
96f256
%doc CHANGES.md CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTORS.md README.md SECURITY.md
96f256
%{_libdir}/libImath-3_1.so.%{sover}*
96f256
96f256
%files -n python3-%{name}
96f256
%{_libdir}/libPyImath_Python%{pyver_under}-3_1.so.%{sover}*
96f256
%{python3_sitearch}/imath.so
96f256
%{python3_sitearch}/imathnumpy.so
96f256
96f256
%files devel
96f256
%doc html/
96f256
%{_includedir}/Imath/
96f256
%{_libdir}/pkgconfig/Imath.pc
96f256
%{_libdir}/pkgconfig/PyImath.pc
96f256
%{_libdir}/cmake/Imath/
96f256
%{_libdir}/libImath.so
96f256
%{_libdir}/libImath-3_1.so
96f256
%{_libdir}/libPyImath_Python%{pyver_under}-3_1.so
96f256
96f256
96f256
%changelog
96f256
* Thu Aug 05 2021 Josef Ridky <jridky@redhat.com> - 3.1.2-1
96f256
- New upstream release 3.1.2
96f256
96f256
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.0.2-4
96f256
- Rebuilt for Python 3.10
96f256
96f256
* Thu May 27 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-3
96f256
- Add main package as dependency to python package.
96f256
96f256
* Tue May 25 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-2
96f256
- Update spec per reviewer comments.
96f256
96f256
* Thu May 20 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-1
96f256
- Update to 3.0.2.
96f256
96f256
* Wed Apr 07 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.1-1
96f256
- Initial packaging.