From f9b954c5fe0e23672501a76d774b1206a4d8bf60807b54c6d6bfe248629b3386 Mon Sep 17 00:00:00 2001 From: Dmitry Roshchin Date: Wed, 9 Aug 2017 07:38:23 +0000 Subject: [PATCH] Accepting request 515038 from home:badshah400:branches:science - Implement shared library packaging policy for vtk: + Rename %{name} to %{shlib}. + Move all shared library objects to %{shlib} package. + Remove no longer needed Requires from %{name}-devel package; e.g.: %{name}-java contains the java binaries and jar object now, and no longer the lib*Java.so file which has been moved into %{shlib}. + Adapt conflicts for vtk-compat_gl accordingly. + Install libraries to /usr/lib(64) instead of /usr/lib(64)/vtk. + Do away with python3-%{name}-qt subpackage and Obsolete/Provide it from %{shlib} as it only contained a shared lib object. - Use system mpi4py; add BuildRequires on python3-mpi4py. - liblz4 >= 1.7.3 now required (since version 8.0); adapt BuildRequires accordingly. - Implement shared library packaging policy for vtk: + Rename %{name} to %{shlib}. + Move all shared library objects to %{shlib} package. + Remove no longer needed Requires from %{name}-devel package; e.g.: %{name}-java contains the java binaries and jar object now, and no longer the lib*Java.so file which has been moved into %{shlib}. + Adapt conflicts for vtk-compat_gl accordingly. + Install libraries to /usr/lib(64) instead of /usr/lib(64)/vtk. + Do away with python3-%{name}-qt subpackage and Obsolete/Provide it from %{shlib} as it only contained a shared lib object. OBS-URL: https://build.opensuse.org/request/show/515038 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=86 --- vtk-compat_gl.changes | 20 ++++++ vtk-compat_gl.spec | 158 +++++++++++++++--------------------------- vtk.changes | 20 ++++++ vtk.spec | 158 +++++++++++++++--------------------------- 4 files changed, 148 insertions(+), 208 deletions(-) diff --git a/vtk-compat_gl.changes b/vtk-compat_gl.changes index ce7c178..090735f 100644 --- a/vtk-compat_gl.changes +++ b/vtk-compat_gl.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Mon Aug 7 09:13:03 UTC 2017 - badshah400@gmail.com + +- Implement shared library packaging policy for vtk: + + Rename %{name} to %{shlib}. + + Move all shared library objects to %{shlib} package. + + Remove no longer needed Requires from %{name}-devel package; + e.g.: %{name}-java contains the java binaries and jar object + now, and no longer the lib*Java.so file which has been moved + into %{shlib}. + + Adapt conflicts for vtk-compat_gl accordingly. + + Install libraries to /usr/lib(64) instead of + /usr/lib(64)/vtk. + + Do away with python3-%{name}-qt subpackage and + Obsolete/Provide it from %{shlib} as it only contained a + shared lib object. +- Use system mpi4py; add BuildRequires on python3-mpi4py. +- liblz4 >= 1.7.3 now required (since version 8.0); adapt + BuildRequires accordingly. + ------------------------------------------------------------------- Tue Jul 25 00:04:11 UTC 2017 - jengelh@inai.de diff --git a/vtk-compat_gl.spec b/vtk-compat_gl.spec index a437101..af23966 100644 --- a/vtk-compat_gl.spec +++ b/vtk-compat_gl.spec @@ -18,6 +18,14 @@ %define compat_gl 1 %define pkgname vtk +%define vtklib lib%{pkgname}1 +%define vtkcompatlib libvtkcompat_gl1 + +%if %{compat_gl} +%define shlib %{vtkcompatlib} +%else +%define shlib %{vtklib} +%endif %if %{compat_gl} Name: vtk-compat_gl @@ -36,7 +44,12 @@ Group: Productivity/Scientific/Other Url: http://vtk.org/ Source: http://www.vtk.org/files/release/%{series}/VTK-%{version}.tar.gz # FIXME See if packaging can be tweaked to accommodate python-vtk's devel files in a devel package later -Source1: %{name}-rpmlintrc +# We need to use the compat conditionals here to avoid Factory's source validator from tripping up +%if %{compat_gl} +Source1: vtk-compat_gl-rpmlintrc +%else +Source1: vtk-rpmlintrc +%endif # PATCH-FIX-UPSTREAM vtk-fix-file-contains-date-time.patch badshah400@gmail.com -- Fix file containing DATE and TIME Patch1: vtk-fix-file-contains-date-time.patch # PATCH-FIX-UPSTREAM vtk-Rinterface-uintptr_t.patch boo#985386 badshah400@gmail.com -- Fix issues with uintptr_t redefinition by defining the HAVE_UINTPTR_T macro using cmake functions to avoid redefinition of uintptr_t, which is already defined in stdint.h called earlier; patch sent upstream @@ -62,7 +75,7 @@ BuildRequires: libexpat-devel BuildRequires: libharu-devel BuildRequires: libiodbc-devel BuildRequires: libjpeg-devel -BuildRequires: liblz4-devel +BuildRequires: liblz4-devel >= 1.7.3 BuildRequires: libmysqlclient-devel BuildRequires: libnetcdf_c++-devel BuildRequires: libpng-devel @@ -71,6 +84,7 @@ BuildRequires: libtiff-devel BuildRequires: netcdf-devel BuildRequires: openmpi-devel BuildRequires: python3-devel +BuildRequires: python3-mpi4py-devel BuildRequires: tcl-devel BuildRequires: tk-devel BuildRequires: wget @@ -101,12 +115,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %else %define qtdir %{_lib}/qt4 %endif -%if %{compat_gl} -Conflicts: vtk -Provides: vtk = %{version} -%else -Conflicts: vtk-compat_gl -%endif +Provides: python3-%{name}-qt = %{version} %description VTK is a software system for image processing, 3D graphics, volume @@ -115,13 +124,25 @@ rendering and visualization. VTK includes many advanced algorithms rendering techniques (e.g. hardware-accelerated volume rendering, LOD control). +%package -n %{shlib} +Summary: Shared libraries for %{pkgname} +Group: Productivity/Scientific/Other +%if %{compat_gl} +Conflicts: %{vtklib} +%else +Conflicts: %{vtkcompatlib} +%endif + +%description -n %{shlib} +VTK is a software system for image processing, 3D graphics, volume +rendering and visualization. + +This package provides the shared libraries for VTK. + %package devel Summary: VTK header files for building C++ code Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} -Requires: %{name}-java = %{version} -Requires: %{name}-qt = %{version} -Requires: %{name}-tcl = %{version} +Requires: %{shlib} = %{version} Requires: Mesa-libGL-devel Requires: R-base-devel Requires: gl2ps-devel @@ -144,8 +165,6 @@ Requires: libtiff-devel Requires: libxml2-devel Requires: netcdf-devel Requires: openmpi-devel -Requires: python3-%{name} = %{version} -Requires: python3-%{name}-qt = %{version} %if %{compat_gl} Conflicts: vtk-devel Provides: vtk-devel @@ -163,7 +182,7 @@ use VTK to do 3D visualisation. %package java Summary: Java bindings for VTK Group: Development/Libraries/Java -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} %if %{compat_gl} Conflicts: vtk-java Provides: vtk-java @@ -180,7 +199,7 @@ This package provides java bindings for VTK. %package -n python3-%{name} Summary: Python bindings for VTK Group: Development/Languages/Python -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} # DESPITE NOT BEING A DEVEL PACKAGE, THIS REQUIRES OPENMPI-DEVEL TO RUN Requires: openmpi-devel %if %{compat_gl} @@ -194,44 +213,12 @@ Conflicts: python3-vtk-compat_gl VTK is a software system for image processing, 3D graphics, volume rendering and visualization. -This package provides Python bindings for VTK. - -%package -n python3-%{name}-qt -Summary: Qt Python VTK widget -Group: Development/Languages/Python -Requires: %{name} = %{version} -Requires: %{name}-qt = %{version} -Requires: python3-%{name} = %{version} -%if 0%{?suse_version} > 1320 -Requires: libQt5OpenGL-devel -Requires: libQt5OpenGLExtensions-devel-static -Requires: libQt5Sql-devel -Requires: libQt5WebKitWidgets-devel -Requires: libQt5Widgets-devel -Requires: python3-qt5 -%else -Requires: libqt4-devel -Requires: python3-qt4 -%endif -# CONFLICTS IS FOR A PKG (python-vtk) IN SCIENCE THAT IS NOT INTENDED TO BE INCLUDED IN openSUSE:FACTORY -Conflicts: python-vtk -%if %{compat_gl} -Conflicts: python3-vtk-qt -Provides: python3-vtk-qt -%else -Conflicts: python3-vtk-compat_gl-qt -%endif - -%description -n python3-%{name}-qt -VTK is a software system for image processing, 3D graphics, volume -rendering and visualization. - -This package provides python-qt bindings for VTK. +This package provides python bindings for VTK. %package qt Summary: Qt VTK widget Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} %if %{compat_gl} Conflicts: vtk-qt Provides: vtk-qt @@ -248,7 +235,7 @@ This package provides Qt bindings for VTK. %package tcl Summary: Tcl bindings for VTK Group: System/Libraries -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} %if %{compat_gl} Conflicts: vtk-tcl Provides: vtk-tcl @@ -265,7 +252,7 @@ This package provides tcl bindings for VTK. %package examples Summary: Examples for VTK Group: Productivity/Scientific/Other -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} Recommends: %{name}data = %{version} %if %{compat_gl} Conflicts: vtk-examples @@ -284,8 +271,8 @@ are available in the C++, Tcl, Python and Java programming languages. %package testing Summary: Testing programs for VTK Group: Productivity/Scientific/Other -Requires: %{name} = %{version} Requires: %{name}data = %{version} +Requires: %{shlib} = %{version} %if %{compat_gl} Conflicts: vtk-testing Provides: vtk-testing @@ -325,8 +312,8 @@ cmake .. \ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ -DSIP_INCLUDE_DIR:Path=%{py3_incdir} \ - -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/%{pkgname} \ - -DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib}/%{pkgname}\ + -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib} \ + -DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib} \ -DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{pkgname} \ -DVTK_INSTALL_TCL_DIR:PATH=share/tcl/%{pkgname} \ %if 0%{?suse_version} > 1320 @@ -365,25 +352,22 @@ cmake .. \ -DVTK_PYTHON_VERSION=3 \ -DCMAKE_NO_BUILTIN_CHRPATH:BOOL=ON \ -DVTK_USE_SYSTEM_DIY2=OFF \ - -DVTK_USE_SYSTEM_GL2PS=OFF + -DVTK_USE_SYSTEM_GL2PS=OFF \ + -DVTK_USE_SYSTEM_MPI4PY=ON make %{?_smp_mflags} VERBOSE=1 make %{?_smp_mflags} DoxygenDoc # Remove executable bits from sources (some of which are generated) -find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or -name \*.gif -exec chmod -x "{}" "+" +find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or -name \*.gif | xargs chmod -x popd %install pushd build %makeinstall -# Install conf file to enable vtk to find its libraries -mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d -echo %{_libdir}/%{pkgname} > %{buildroot}/%{_sysconfdir}/ld.so.conf.d/%{pkgname}.conf - # Gather list of non-binding libraries -ls %{buildroot}%{_libdir}/%{pkgname}/lib*.so.* | grep -Ev '(Java|QVTK|Qt|Python|TCL)' | sed -e's,^%{buildroot},,' > libs.list +ls %{buildroot}%{_libdir}/lib*.so.* | sed -e's,^%{buildroot},,' > libs.list # List of executable examples cat > examples.list << EOF @@ -439,35 +423,15 @@ chrpath -d %{buildroot}%{_bindir}/* %fdupes -s %{buildroot} -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%post -n %{shlib} -p /sbin/ldconfig +%postun -n %{shlib} -p /sbin/ldconfig -%post java -p /sbin/ldconfig -%postun java -p /sbin/ldconfig - -%post -n python3-%{name} -p /sbin/ldconfig -%postun -n python3-%{name} -p /sbin/ldconfig - -%post -n python3-%{name}-qt -p /sbin/ldconfig -%postun -n python3-%{name}-qt -p /sbin/ldconfig - -%post qt -p /sbin/ldconfig -%postun qt -p /sbin/ldconfig - -%post tcl -p /sbin/ldconfig -%postun tcl -p /sbin/ldconfig - -%files -f build/libs.list +%files -n %{shlib} -f build/libs.list %defattr(-,root,root,-) -%config %{_sysconfdir}/ld.so.conf.d/%{pkgname}.conf -%doc Copyright.txt -%dir %{_libdir}/%{pkgname}/ -%if 0%{?suse_version} <= 1320 && 0%{?suse_version} != 1315 -%{_libdir}/libvtktiff.so.* -%endif %files devel %defattr(-,root,root,-) +%doc Copyright.txt %{_bindir}/%{pkgname}EncodeString %{_bindir}/%{pkgname}HashSource %{_bindir}/%{pkgname}WrapHierarchy @@ -479,21 +443,20 @@ chrpath -d %{buildroot}%{_bindir}/* %{_bindir}/%{pkgname}mkg3states %endif %{_datadir}/doc/%{pkgname}-%{series}/ -%{_libdir}/%{pkgname}/*.so +%{_libdir}/*.so %if 0%{?suse_version} <= 1320 && 0%{?suse_version} != 1315 %{_libdir}/libvtktiff.so %endif %{_libdir}/cmake/%{pkgname}/ -%{_libdir}/%{pkgname}/libvtkWrappingTools.a +%{_libdir}/libvtkWrappingTools.a %{_includedir}/%{pkgname}-%{series}/ -%{_datadir}/tcl/vtk/vtktcl.c +%exclude %{_datadir}/tcl/vtk/vtktcl.c %files java %defattr(-,root,root,-) %{_bindir}/%{pkgname}ParseJava %{_bindir}/%{pkgname}WrapJava -%{_libdir}/%{pkgname}/%{pkgname}.jar -%{_libdir}/%{pkgname}/*Java.so.* +%{_libdir}/%{pkgname}.jar %files -n python3-%{name} %defattr(-,root,root,-) @@ -501,11 +464,7 @@ chrpath -d %{buildroot}%{_bindir}/* %{_bindir}/p%{pkgname}python %{_bindir}/%{pkgname}WrapPython %{_bindir}/%{pkgname}WrapPythonInit -%{_libdir}/%{pkgname}/*Python*.so.* %{python3_sitearch}/%{pkgname}/ -%dir %{_libdir}/%{pkgname}/site-packages -%{_libdir}/%{pkgname}/site-packages/mpi4py/ -%exclude %{_libdir}/%{pkgname}/*QtPython*.so.* %files tcl %defattr(-,root,root,-) @@ -513,20 +472,11 @@ chrpath -d %{buildroot}%{_bindir}/* %{_bindir}/%{pkgname}WrapTcl %{_bindir}/%{pkgname}WrapTclInit %{_datadir}/tcl/%{pkgname}/ -%{_libdir}/%{pkgname}/lib%{pkgname}*TCL.so.* -%exclude %{_libdir}/%{pkgname}/*QtTCL.so.* -%exclude %{_datadir}/tcl/vtk/vtktcl.c %files qt %defattr(-,root,root,-) -%{_libdir}/%{pkgname}/lib*Qt*.so.* %dir %{_prefix}/%{qtdir}/plugins/designer %{_prefix}/%{qtdir}/plugins/designer/libQVTKWidgetPlugin.so -%exclude %{_libdir}/%{pkgname}/*Python*.so.* - -%files -n python3-%{name}-qt -%defattr(-,root,root,-) -%{_libdir}/%{pkgname}/*QtPython*.so.* %files examples -f build/examples.list %defattr(-,root,root,-) diff --git a/vtk.changes b/vtk.changes index ce7c178..090735f 100644 --- a/vtk.changes +++ b/vtk.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Mon Aug 7 09:13:03 UTC 2017 - badshah400@gmail.com + +- Implement shared library packaging policy for vtk: + + Rename %{name} to %{shlib}. + + Move all shared library objects to %{shlib} package. + + Remove no longer needed Requires from %{name}-devel package; + e.g.: %{name}-java contains the java binaries and jar object + now, and no longer the lib*Java.so file which has been moved + into %{shlib}. + + Adapt conflicts for vtk-compat_gl accordingly. + + Install libraries to /usr/lib(64) instead of + /usr/lib(64)/vtk. + + Do away with python3-%{name}-qt subpackage and + Obsolete/Provide it from %{shlib} as it only contained a + shared lib object. +- Use system mpi4py; add BuildRequires on python3-mpi4py. +- liblz4 >= 1.7.3 now required (since version 8.0); adapt + BuildRequires accordingly. + ------------------------------------------------------------------- Tue Jul 25 00:04:11 UTC 2017 - jengelh@inai.de diff --git a/vtk.spec b/vtk.spec index e822b49..2ade832 100644 --- a/vtk.spec +++ b/vtk.spec @@ -18,6 +18,14 @@ %define compat_gl 0 %define pkgname vtk +%define vtklib lib%{pkgname}1 +%define vtkcompatlib libvtkcompat_gl1 + +%if %{compat_gl} +%define shlib %{vtkcompatlib} +%else +%define shlib %{vtklib} +%endif %if %{compat_gl} Name: vtk-compat_gl @@ -36,7 +44,12 @@ Group: Productivity/Scientific/Other Url: http://vtk.org/ Source: http://www.vtk.org/files/release/%{series}/VTK-%{version}.tar.gz # FIXME See if packaging can be tweaked to accommodate python-vtk's devel files in a devel package later -Source1: %{name}-rpmlintrc +# We need to use the compat conditionals here to avoid Factory's source validator from tripping up +%if %{compat_gl} +Source1: vtk-compat_gl-rpmlintrc +%else +Source1: vtk-rpmlintrc +%endif # PATCH-FIX-UPSTREAM vtk-fix-file-contains-date-time.patch badshah400@gmail.com -- Fix file containing DATE and TIME Patch1: vtk-fix-file-contains-date-time.patch # PATCH-FIX-UPSTREAM vtk-Rinterface-uintptr_t.patch boo#985386 badshah400@gmail.com -- Fix issues with uintptr_t redefinition by defining the HAVE_UINTPTR_T macro using cmake functions to avoid redefinition of uintptr_t, which is already defined in stdint.h called earlier; patch sent upstream @@ -62,7 +75,7 @@ BuildRequires: libexpat-devel BuildRequires: libharu-devel BuildRequires: libiodbc-devel BuildRequires: libjpeg-devel -BuildRequires: liblz4-devel +BuildRequires: liblz4-devel >= 1.7.3 BuildRequires: libmysqlclient-devel BuildRequires: libnetcdf_c++-devel BuildRequires: libpng-devel @@ -71,6 +84,7 @@ BuildRequires: libtiff-devel BuildRequires: netcdf-devel BuildRequires: openmpi-devel BuildRequires: python3-devel +BuildRequires: python3-mpi4py-devel BuildRequires: tcl-devel BuildRequires: tk-devel BuildRequires: wget @@ -101,12 +115,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %else %define qtdir %{_lib}/qt4 %endif -%if %{compat_gl} -Conflicts: vtk -Provides: vtk = %{version} -%else -Conflicts: vtk-compat_gl -%endif +Provides: python3-%{name}-qt = %{version} %description VTK is a software system for image processing, 3D graphics, volume @@ -115,13 +124,25 @@ rendering and visualization. VTK includes many advanced algorithms rendering techniques (e.g. hardware-accelerated volume rendering, LOD control). +%package -n %{shlib} +Summary: Shared libraries for %{pkgname} +Group: Productivity/Scientific/Other +%if %{compat_gl} +Conflicts: %{vtklib} +%else +Conflicts: %{vtkcompatlib} +%endif + +%description -n %{shlib} +VTK is a software system for image processing, 3D graphics, volume +rendering and visualization. + +This package provides the shared libraries for VTK. + %package devel Summary: VTK header files for building C++ code Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} -Requires: %{name}-java = %{version} -Requires: %{name}-qt = %{version} -Requires: %{name}-tcl = %{version} +Requires: %{shlib} = %{version} Requires: Mesa-libGL-devel Requires: R-base-devel Requires: gl2ps-devel @@ -144,8 +165,6 @@ Requires: libtiff-devel Requires: libxml2-devel Requires: netcdf-devel Requires: openmpi-devel -Requires: python3-%{name} = %{version} -Requires: python3-%{name}-qt = %{version} %if %{compat_gl} Conflicts: vtk-devel Provides: vtk-devel @@ -163,7 +182,7 @@ use VTK to do 3D visualisation. %package java Summary: Java bindings for VTK Group: Development/Libraries/Java -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} %if %{compat_gl} Conflicts: vtk-java Provides: vtk-java @@ -180,7 +199,7 @@ This package provides java bindings for VTK. %package -n python3-%{name} Summary: Python bindings for VTK Group: Development/Languages/Python -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} # DESPITE NOT BEING A DEVEL PACKAGE, THIS REQUIRES OPENMPI-DEVEL TO RUN Requires: openmpi-devel %if %{compat_gl} @@ -194,44 +213,12 @@ Conflicts: python3-vtk-compat_gl VTK is a software system for image processing, 3D graphics, volume rendering and visualization. -This package provides Python bindings for VTK. - -%package -n python3-%{name}-qt -Summary: Qt Python VTK widget -Group: Development/Languages/Python -Requires: %{name} = %{version} -Requires: %{name}-qt = %{version} -Requires: python3-%{name} = %{version} -%if 0%{?suse_version} > 1320 -Requires: libQt5OpenGL-devel -Requires: libQt5OpenGLExtensions-devel-static -Requires: libQt5Sql-devel -Requires: libQt5WebKitWidgets-devel -Requires: libQt5Widgets-devel -Requires: python3-qt5 -%else -Requires: libqt4-devel -Requires: python3-qt4 -%endif -# CONFLICTS IS FOR A PKG (python-vtk) IN SCIENCE THAT IS NOT INTENDED TO BE INCLUDED IN openSUSE:FACTORY -Conflicts: python-vtk -%if %{compat_gl} -Conflicts: python3-vtk-qt -Provides: python3-vtk-qt -%else -Conflicts: python3-vtk-compat_gl-qt -%endif - -%description -n python3-%{name}-qt -VTK is a software system for image processing, 3D graphics, volume -rendering and visualization. - -This package provides python-qt bindings for VTK. +This package provides python bindings for VTK. %package qt Summary: Qt VTK widget Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} %if %{compat_gl} Conflicts: vtk-qt Provides: vtk-qt @@ -248,7 +235,7 @@ This package provides Qt bindings for VTK. %package tcl Summary: Tcl bindings for VTK Group: System/Libraries -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} %if %{compat_gl} Conflicts: vtk-tcl Provides: vtk-tcl @@ -265,7 +252,7 @@ This package provides tcl bindings for VTK. %package examples Summary: Examples for VTK Group: Productivity/Scientific/Other -Requires: %{name} = %{version} +Requires: %{shlib} = %{version} Recommends: %{name}data = %{version} %if %{compat_gl} Conflicts: vtk-examples @@ -284,8 +271,8 @@ are available in the C++, Tcl, Python and Java programming languages. %package testing Summary: Testing programs for VTK Group: Productivity/Scientific/Other -Requires: %{name} = %{version} Requires: %{name}data = %{version} +Requires: %{shlib} = %{version} %if %{compat_gl} Conflicts: vtk-testing Provides: vtk-testing @@ -325,8 +312,8 @@ cmake .. \ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ -DSIP_INCLUDE_DIR:Path=%{py3_incdir} \ - -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/%{pkgname} \ - -DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib}/%{pkgname}\ + -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib} \ + -DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib} \ -DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{pkgname} \ -DVTK_INSTALL_TCL_DIR:PATH=share/tcl/%{pkgname} \ %if 0%{?suse_version} > 1320 @@ -365,25 +352,22 @@ cmake .. \ -DVTK_PYTHON_VERSION=3 \ -DCMAKE_NO_BUILTIN_CHRPATH:BOOL=ON \ -DVTK_USE_SYSTEM_DIY2=OFF \ - -DVTK_USE_SYSTEM_GL2PS=OFF + -DVTK_USE_SYSTEM_GL2PS=OFF \ + -DVTK_USE_SYSTEM_MPI4PY=ON make %{?_smp_mflags} VERBOSE=1 make %{?_smp_mflags} DoxygenDoc # Remove executable bits from sources (some of which are generated) -find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or -name \*.gif -exec chmod -x "{}" "+" +find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or -name \*.gif | xargs chmod -x popd %install pushd build %makeinstall -# Install conf file to enable vtk to find its libraries -mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d -echo %{_libdir}/%{pkgname} > %{buildroot}/%{_sysconfdir}/ld.so.conf.d/%{pkgname}.conf - # Gather list of non-binding libraries -ls %{buildroot}%{_libdir}/%{pkgname}/lib*.so.* | grep -Ev '(Java|QVTK|Qt|Python|TCL)' | sed -e's,^%{buildroot},,' > libs.list +ls %{buildroot}%{_libdir}/lib*.so.* | sed -e's,^%{buildroot},,' > libs.list # List of executable examples cat > examples.list << EOF @@ -439,35 +423,15 @@ chrpath -d %{buildroot}%{_bindir}/* %fdupes -s %{buildroot} -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%post -n %{shlib} -p /sbin/ldconfig +%postun -n %{shlib} -p /sbin/ldconfig -%post java -p /sbin/ldconfig -%postun java -p /sbin/ldconfig - -%post -n python3-%{name} -p /sbin/ldconfig -%postun -n python3-%{name} -p /sbin/ldconfig - -%post -n python3-%{name}-qt -p /sbin/ldconfig -%postun -n python3-%{name}-qt -p /sbin/ldconfig - -%post qt -p /sbin/ldconfig -%postun qt -p /sbin/ldconfig - -%post tcl -p /sbin/ldconfig -%postun tcl -p /sbin/ldconfig - -%files -f build/libs.list +%files -n %{shlib} -f build/libs.list %defattr(-,root,root,-) -%config %{_sysconfdir}/ld.so.conf.d/%{pkgname}.conf -%doc Copyright.txt -%dir %{_libdir}/%{pkgname}/ -%if 0%{?suse_version} <= 1320 && 0%{?suse_version} != 1315 -%{_libdir}/libvtktiff.so.* -%endif %files devel %defattr(-,root,root,-) +%doc Copyright.txt %{_bindir}/%{pkgname}EncodeString %{_bindir}/%{pkgname}HashSource %{_bindir}/%{pkgname}WrapHierarchy @@ -479,21 +443,20 @@ chrpath -d %{buildroot}%{_bindir}/* %{_bindir}/%{pkgname}mkg3states %endif %{_datadir}/doc/%{pkgname}-%{series}/ -%{_libdir}/%{pkgname}/*.so +%{_libdir}/*.so %if 0%{?suse_version} <= 1320 && 0%{?suse_version} != 1315 %{_libdir}/libvtktiff.so %endif %{_libdir}/cmake/%{pkgname}/ -%{_libdir}/%{pkgname}/libvtkWrappingTools.a +%{_libdir}/libvtkWrappingTools.a %{_includedir}/%{pkgname}-%{series}/ -%{_datadir}/tcl/vtk/vtktcl.c +%exclude %{_datadir}/tcl/vtk/vtktcl.c %files java %defattr(-,root,root,-) %{_bindir}/%{pkgname}ParseJava %{_bindir}/%{pkgname}WrapJava -%{_libdir}/%{pkgname}/%{pkgname}.jar -%{_libdir}/%{pkgname}/*Java.so.* +%{_libdir}/%{pkgname}.jar %files -n python3-%{name} %defattr(-,root,root,-) @@ -501,11 +464,7 @@ chrpath -d %{buildroot}%{_bindir}/* %{_bindir}/p%{pkgname}python %{_bindir}/%{pkgname}WrapPython %{_bindir}/%{pkgname}WrapPythonInit -%{_libdir}/%{pkgname}/*Python*.so.* %{python3_sitearch}/%{pkgname}/ -%dir %{_libdir}/%{pkgname}/site-packages -%{_libdir}/%{pkgname}/site-packages/mpi4py/ -%exclude %{_libdir}/%{pkgname}/*QtPython*.so.* %files tcl %defattr(-,root,root,-) @@ -513,20 +472,11 @@ chrpath -d %{buildroot}%{_bindir}/* %{_bindir}/%{pkgname}WrapTcl %{_bindir}/%{pkgname}WrapTclInit %{_datadir}/tcl/%{pkgname}/ -%{_libdir}/%{pkgname}/lib%{pkgname}*TCL.so.* -%exclude %{_libdir}/%{pkgname}/*QtTCL.so.* -%exclude %{_datadir}/tcl/vtk/vtktcl.c %files qt %defattr(-,root,root,-) -%{_libdir}/%{pkgname}/lib*Qt*.so.* %dir %{_prefix}/%{qtdir}/plugins/designer %{_prefix}/%{qtdir}/plugins/designer/libQVTKWidgetPlugin.so -%exclude %{_libdir}/%{pkgname}/*Python*.so.* - -%files -n python3-%{name}-qt -%defattr(-,root,root,-) -%{_libdir}/%{pkgname}/*QtPython*.so.* %files examples -f build/examples.list %defattr(-,root,root,-)