%define gitver %(echo %version | tr . _) Name: opencascade Version: 7.8.1 Release: 2mamba Summary: Open CASCADE Technology (OCCT) full-scale 3D geometry library Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://dev.opencascade.org/ Source: https://git.dev.opencascade.org/repos/occt.git/V%{gitver}/occt-%{version}.tar.bz2 Patch1: occt-7.6.2-cmake-fix2.patch Patch2: occt-7.8.1-cmake-install.patch Patch3: occt-7.8.1-tbb-2021.12.0.patch Patch4: occt-7.8.1-vtk-7.3.1.patch Patch5: opencascade-7.8.1-freetype-2.13.3.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libX11-devel BuildRequires: libfontconfig-devel BuildRequires: libfreetype-devel BuildRequires: libgcc BuildRequires: libglew-devel BuildRequires: libglvnd-devel BuildRequires: libgomp-devel BuildRequires: libstdc++6-devel BuildRequires: libtbb-devel BuildRequires: libtcl-devel BuildRequires: libtk-devel BuildRequires: libvtk-devel ## AUTOBUILDREQ-END BuildRequires: libvtk-devel >= 9.3.0-2mamba BuildRequires: cmake Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} Provides: oce Obsoletes: oce <= 0.17.2 Provides: occt Obsoletes: occt < 7.8.1-2mamba %description Open CASCADE Technology (OCCT) full-scale 3D geometry library. %package -n lib%{name} Group: System/Libraries Summary: Shared libraries for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Provides: liboce Obsoletes: liboce <= 0.17.2 Provides: libocct Obsoletes: libocct < 7.8.1-2mamba %description -n lib%{name} This package contains shared libraries for %{name}. %package -n lib%{name}-devel Group: Development/Libraries Summary: Development files for %{name} Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} Provides: liboce-devel Obsoletes: liboce-devel <= 0.17.2 Provides: libocct-devel Obsoletes: libocct-devel < 7.8.1-2mamba %description -n lib%{name}-devel This package contains libraries and header files for developing applications that use %{name}. %debug_package %prep %setup -q -n occt-%{version} #-D -T #:<< _EOF %patch 1 -p1 -b .cmake-fix2 %patch 2 -p1 -b .cmake-install %patch 3 -p1 -b .tbb-2021.12.0 %patch 4 -p1 -b .vtk-7.3.1 %patch 5 -p1 -b .freetype-2.13.3 %build #:<< _EOF # cmake uses $ENV{DESTDIR} to create cmake_install file export DESTDIR=%{buildroot} %cmake -d build \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DUSE_RAPIDJSON=True \ -DUSE_TBB=ON \ -D3RDPARTY_TBB_LIBRARY_DIR=%{_libdir} \ -D3RDPARTY_TBB_INCLUDE_DIR=%{_includedir} \ -DUSE_VTK=ON \ -DINSTALL_VTK=OFF \ -D3RDPARTY_VTK_LIBRARY_DIR=%{_libdir} \ -D3RDPARTY_VTK_INCLUDE_DIR=%{_includedir}/vtk \ -DINSTALL_DIR_LIB=%{_lib} \ -DINSTALL_DIR_CMAKE=%{_lib}/cmake/opencascade \ -Wno-dev %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall -C build # Draw binary should not be versioned. mv %{buildroot}%{_bindir}/DRAWEXE-* \ %{buildroot}%{_bindir}/DRAWEXE # Remove license files so they can be included by %%license rm -rf %{buildroot}%{_datadir}/doc/opencascade # Fix non-executable shell scripts chmod 0755 %{buildroot}%{_bindir}/*.sh # Fix library target manipulation attempt by upstream sed -i "s/\\\\\${OCCT_INSTALL_BIN_LETTER}//g" %{buildroot}%{_libdir}/cmake/opencascade/*.cmake %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -n lib%{name} -p /sbin/ldconfig %postun -n lib%{name} -p /sbin/ldconfig %files %defattr(-,root,root) %{_bindir}/DRAWEXE* %{_bindir}/ExpToCasExe* %dir %{_datadir}/opencascade %dir %{_datadir}/opencascade/data %{_datadir}/opencascade/data/* %dir %{_datadir}/opencascade/resources %{_datadir}/opencascade/resources/* %dir %{_datadir}/opencascade/samples %{_datadir}/opencascade/samples/* %files -n lib%{name} %defattr(-,root,root) %{_libdir}/libTK*.so.* %license LICENSE_LGPL_21.txt OCCT_LGPL_EXCEPTION.txt %files -n lib%{name}-devel %defattr(-,root,root) %{_bindir}/*.sh %dir %{_includedir}/opencascade/ %{_includedir}/opencascade/* %{_libdir}/libTK*.so %dir %{_libdir}/cmake/opencascade %{_libdir}/cmake/opencascade/OpenCASCADE*.cmake %doc README.txt %changelog * Fri Oct 25 2024 Silvan Calarco 7.8.1-2mamba - sync some packaging changes from Fedora - renamed from occt to opencascade * Wed May 15 2024 Silvan Calarco 7.8.1-1mamba - update to 7.8.1 * Sun Jul 31 2022 Automatic Build System 7.6.3-1mamba - automatic version update by autodist * Wed Jun 01 2022 Silvan Calarco 7.6.2-1mamba - update to 7.6.2 * Sun Jan 23 2022 Silvan Calarco 7.6.0-1mamba - package created using the webbuild interface