Blob Blame History Raw
%global upstream_version 3_4_0

Name:           opensubdiv
Version:        3.4.0
Release:        4%{?dist}
Summary:        An Open-Source subdivision surface library

License:        ASL 2.0
URL:  {name}
Patch0:         %{name}-rpath.patch

BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  glew-devel
BuildRequires:  glfw-devel
BuildRequires:  graphviz-devel
BuildRequires:  opencl-headers
BuildRequires:  pkgconfig(python3)
BuildRequires:  pkgconfig(zlib)
BuildRequires:	python3-docutils
BuildRequires:  tbb-devel

OpenSubdiv is a set of open source libraries that implement high performance
subdivision surface (subdiv) evaluation on massively parallel CPU and
GPU architectures. 
This codepath is optimized for drawing deforming subdivs with static topology
at interactive framerates.

%package        libs
Summary:        Core OpenSubdiv libraries
Requires:       %{name}%{?_isa} = %{version}-%{release} 
%description    libs

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%autosetup -p1 -n OpenSubdiv-%{upstream_version}

mkdir cmake-build
pushd cmake-build

%cmake \
       -DCMAKE_BUILD_TYPE=Release \
       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
       -DCMAKE_LIBDIR_BASE=%{_libdir} \
       -DGLEW_LOCATION=%{_libdir} \
       -DGLFW_LOCATION=%{_libdir} \
       -DNO_CUDA=1 \
       -DNO_GLFW_X11=1 // disable X11 dependencies\
       -DNO_PTEX=1 \
       -DOPENCL_INCLUDE_DIRS=%{_includedir} \
       -DTBB_LOCATION=%{_libdir} \


pushd cmake-build
make test V=1

pushd cmake-build

# Let rpmbuild pick up documentation
mv %{buildroot}%{_docdir}/%{name} docs

# Move tutorials out of subdirectory
mv %{buildroot}%{_bindir}/tutorials/* %{buildroot}%{_bindir}/
rm -fr %{buildroot}%{_bindir}/tutorials

# Remove static files
find %{buildroot} -name '*.la' -delete
find %{buildroot} -name '*.a' -delete



%files libs
%license LICENSE.txt

%files devel
%doc NOTICE.txt cmake-build/docs/*

* Wed Jan 29 2020 Fedora Release Engineering <> - 3.4.0-4
- Rebuilt for

* Mon Oct 14 2019 Luya Tshimbalanga <> - 3.4.0-3
- Remove rpath
- Remove unneeded ldconfig_scriptlets macro
- Improve spec file upon review (rhbz #1762155)

* Mon Oct 14 2019 Luya Tshimbalanga <> - 3.4.0-2
- Adjust maximum line limit on description

* Mon Oct 14 2019 Luya Tshimbalanga <> - 3.4.0-1
- Initial package