]> git.pld-linux.org Git - packages/CGAL.git/blobdiff - CGAL.spec
- partial cleanup
[packages/CGAL.git] / CGAL.spec
index ba7abb80d61a4e090738a1e9c714743c91bef19c..99b4d63c12b8b84aba834d68ff3c441a58eaa7a9 100644 (file)
--- a/CGAL.spec
+++ b/CGAL.spec
@@ -1,41 +1,51 @@
 # TODO
-# - force use of qt5, otherwise it may pick qt4! add bcond?
-# - check these:
-#   blas-devel may be superfluous !
-#   gmp-c++-devel may be superfluous !
-#   lapack-devel may be superfluous !
-# - cleanup?
-#   warning: Installed (but unpackaged) file(s) found:
-#   /usr/bin/cgal_make_macosx_app
+# - optflags
 # - move qt stuff to subpackages?
+#
+# Conditional build:
+%bcond_with    examples        # demo+examples build
+%bcond_with    qt3             # CGAL_Qt3 library
 
-%define boost_version 1.32
+%define        boost_ver       1.48
+%define        qt5_ver         5.3
 Summary:       Computational Geometry Algorithms Library
 Summary(pl.UTF-8):     Computational Geometry Algorithms Library - biblioteka algorytmów geometrii obliczeniowej
 Name:          CGAL
 Version:       4.7
 Release:       1
-License:       GPLv3+ and LGPLv3+
+License:       GPL v3+ and LGPL v3+
 Group:         Libraries
 Source0:       https://github.com/CGAL/releases/archive/%{name}-%{version}.tar.gz
 # Source0-md5: 50b29d3f3372cd93aaa31d01f0e45036
 URL:           http://www.cgal.org/
 BuildRequires: OpenGL-GLU-devel
-BuildRequires: Qt5Core-devel
-BuildRequires: Qt5Gui-devel
-BuildRequires: Qt5OpenGL-devel
-BuildRequires: Qt5Svg-devel
-BuildRequires: blas-devel
-BuildRequires: boost-devel >= %{boost_version}
-BuildRequires: cmake
-BuildRequires: gmp-c++-devel
-BuildRequires: gmp-devel
-BuildRequires: lapack-devel
-BuildRequires: mpfr-devel
-BuildRequires: qt4-build
-BuildRequires: qt4-qmake
+BuildRequires: Qt5Core-devel >= %{qt5_ver}
+BuildRequires: Qt5Gui-devel >= %{qt5_ver}
+BuildRequires: Qt5OpenGL-devel >= %{qt5_ver}
+BuildRequires: Qt5Svg-devel >= %{qt5_ver}
+BuildRequires: Qt5Widgets-devel >= %{qt5_ver}
+BuildRequires: boost-devel >= %{boost_ver}
+BuildRequires: cmake >= 2.8.11
+BuildRequires: gmp-devel >= 4.1.4
+BuildRequires: libstdc++-devel
+BuildRequires: mpfr-devel >= 2.2.1
+BuildRequires: qt5-build >= %{qt5_ver}
+BuildRequires: qt5-qmake >= %{qt5_ver}
 BuildRequires: sed >= 4.0
 BuildRequires: zlib-devel
+%if %{with qt3}
+BuildRequires: qt-devel >= 3
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXext-devel
+%endif
+%if %{with examples}
+BuildRequires: blas-devel
+BuildRequires: eigen3 >= 3.1.91
+BuildRequires: gmp-c++-devel >= 4.1.4
+BuildRequires: lapack-devel
+BuildRequires: tbb
+#TODO: mpfi QGLViewer ipelib 
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -59,14 +69,27 @@ Summary:    Development files and tools for CGAL applications
 Summary(pl.UTF-8):     Pliki i narzędzia programistyczne dla aplikacji CGAL
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      boost-devel >= %{boost_ver}
+Requires:      libstdc++-devel
+# for Qt5 component
+Requires:      Qt5Core-devel >= %{qt5_ver}
+Requires:      Qt5Gui-devel >= %{qt5_ver}
+Requires:      Qt5OpenGL-devel >= %{qt5_ver}
+Requires:      Qt5Widgets-devel >= %{qt5_ver}
+# for Qt3 component
+%if %{with qt3}
+Requires:      qt-devel >= 3
+%endif
+# CGAL header interfaces for (using their headers) - use Suggests?
+Requires:      gmp-c++-devel >= 4.1.4
+Requires:      gmp-devel >= 4.1.4
+Requires:      mpfr-devel >= 2.2.1
+#Suggests: eigen3 >= 3.1 gsl-devel tbb-devel vtk-devel
+#Suggests(TODO): <rs_exports.h> <rs3_fncts.h> <taucs.h> <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh> <NTL/ZZX.h> <mpfi.h> <LEDA/*.h> <ipelib.h>
+Requires:      zlib-devel
+# CGAL header interfaces for (without using their headers) - use Suggests?
 Requires:      blas-devel
-Requires:      boost-devel >= %{boost_version}
-Requires:      gmp-c++-devel
-Requires:      gmp-devel
 Requires:      lapack-devel
-Requires:      mpfr-devel
-Requires:      qt-devel
-Requires:      zlib-devel
 
 %description devel
 This package provides the header files and tools you may need to
@@ -98,13 +121,18 @@ install -d build
 cd build
 # override build type, because:
 # PLD is not a valid build type: only Release or Debug is allowed
-
-# XXX: what is ${CHANGE_SOVERSION} here?
-%cmake \
+%cmake .. \
        -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
+       -DCMAKE_CXX_FLAGS_Release="%{rpmcxxflags}" \
+       -DCMAKE_EXE_LINKER_FLAGS_Release="%{rpmldflags}" \
+       -DCMAKE_SHARED_LINKER_FLAGS_Release="%{rpmldflags}" \
        -DCGAL_INSTALL_LIB_DIR=%{_lib} \
-       -DCGAL_INSTALL_DOC_DIR= ${CHANGE_SOVERSION} \
-       ..
+       -DCGAL_INSTALL_DOC_DIR= \
+       %{?with_qt3:-DWITH_CGAL_Qt3=ON} \
+%if %{with examples}
+       -DWITH_demos=ON \
+       -DWITH_examples=ON
+%endif
 
 %{__make}
 
@@ -113,6 +141,9 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
+# useless in binary package
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/{cgal_create_CMakeLists,cgal_create_cmake_script,cgal_make_macosx_app}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -121,21 +152,29 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS LICENSE LICENSE.FREE_USE LICENSE.LGPL CHANGES
+%doc AUTHORS CHANGES LICENSE LICENSE.BSL LICENSE.FREE_USE LICENSE.LGPL
 %attr(755,root,root) %{_libdir}/libCGAL.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libCGAL.so.11
 %attr(755,root,root) %{_libdir}/libCGAL_Core.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libCGAL_Core.so.11
 %attr(755,root,root) %{_libdir}/libCGAL_ImageIO.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libCGAL_ImageIO.so.11
+%if %{with qt3}
+%attr(755,root,root) %{_libdir}/libCGAL_Qt3.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libCGAL_Qt3.so.11
+%endif
 %attr(755,root,root) %{_libdir}/libCGAL_Qt5.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libCGAL_Qt5.so.11
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/cgal_create_CMakeLists
-%attr(755,root,root) %{_bindir}/cgal_create_cmake_script
-%attr(755,root,root) %{_libdir}/libCGAL*.so
+%attr(755,root,root) %{_libdir}/libCGAL.so
+%attr(755,root,root) %{_libdir}/libCGAL_Core.so
+%attr(755,root,root) %{_libdir}/libCGAL_ImageIO.so
+%if %{with qt3}
+%attr(755,root,root) %{_libdir}/libCGAL_Qt3.so
+%endif
+%attr(755,root,root) %{_libdir}/libCGAL_Qt5.so
 %{_includedir}/CGAL
 %{_libdir}/CGAL
 %{_mandir}/man1/cgal_create_cmake_script.1*
This page took 0.079864 seconds and 4 git commands to generate.