occt/occt.spec

138 lines
3.8 KiB
RPMSpec
Raw Normal View History

%define gitver %(echo %version | tr . _)
Name: occt
Version: 7.6.3
Release: 1mamba
Summary: Open CASCADE Technology (OCCT) full-scale 3D geometry library
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://dev.opencascade.org/
Source: https://git.dev.opencascade.org/repos/occt.git/V%{gitver}/occt-%{version}.tar.bz2
Patch0: occt-7.6.0-cmake.patch
Patch1: occt-7.6.2-cmake-fix2.patch
Patch2: occt-7.6.2-cmake-install.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libX11-devel
BuildRequires: libfontconfig-devel
BuildRequires: libfreetype-devel
BuildRequires: libgcc
BuildRequires: libglvnd-devel
BuildRequires: libstdc++6-devel
BuildRequires: libtbb-devel
BuildRequires: libtcl-devel
BuildRequires: libtk-devel
BuildRequires: libvtk-devel
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: libvtk-devel >= 9.1.0-2mamba
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: oce
Obsoletes: oce <= 0.17.2
%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
%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
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q
#-D -T
#:<< _EOF
%patch0 -p1 -b .cmake
%patch1 -p1 -b .cmake-fix2
%patch2 -p1 -b .occt-7.6.2-cmake-install.patch
%build
#:<< _EOF
# cmake uses $ENV{DESTDIR} to create cmake_install file
export DESTDIR=%{buildroot}
%cmake -d build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DUSE_TBB=True \
-DUSE_VTK=True \
-DINSTALL_VTK=False \
-D3RDPARTY_VTK_LIBRARY_DIR=%{_libdir} \
-D3RDPARTY_VTK_INCLUDE_DIR=%{_includedir}/vtk \
-DINSTALL_DIR_LIB=%{_lib} \
-DINSTALL_DIR_CMAKE=%{_lib}/cmake/%{name} \
-Wno-dev
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
# 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
%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*
%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/occt
%{_libdir}/cmake/occt/OpenCASCADE*.cmake
%doc README.txt
%changelog
* Sun Jul 31 2022 Automatic Build System <autodist@mambasoft.it> 7.6.3-1mamba
- automatic version update by autodist
* Wed Jun 01 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 7.6.2-1mamba
- update to 7.6.2
* Sun Jan 23 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 7.6.0-1mamba
- package created using the webbuild interface