]> git.pld-linux.org Git - packages/CGAL.git/blob - CGAL.spec
boost rebuild
[packages/CGAL.git] / CGAL.spec
1 # TODO
2 # - optflags
3 # - move qt stuff to subpackages?
4 #
5 # Conditional build:
6 %bcond_with     examples        # demo+examples build
7 %bcond_with     qt3             # CGAL_Qt3 library
8
9 %define boost_ver       1.48
10 %define qt5_ver         5.3
11 Summary:        Computational Geometry Algorithms Library
12 Summary(pl.UTF-8):      Computational Geometry Algorithms Library - biblioteka algorytmów geometrii obliczeniowej
13 Name:           CGAL
14 Version:        4.7
15 Release:        10
16 License:        GPL v3+ and LGPL v3+
17 Group:          Libraries
18 Source0:        https://github.com/CGAL/releases/archive/%{name}-%{version}.tar.gz
19 # Source0-md5:  50b29d3f3372cd93aaa31d01f0e45036
20 Patch0:         %{name}-buildtype.patch
21 URL:            http://www.cgal.org/
22 BuildRequires:  OpenGL-GLU-devel
23 BuildRequires:  Qt5Core-devel >= %{qt5_ver}
24 BuildRequires:  Qt5Gui-devel >= %{qt5_ver}
25 BuildRequires:  Qt5OpenGL-devel >= %{qt5_ver}
26 BuildRequires:  Qt5Svg-devel >= %{qt5_ver}
27 BuildRequires:  Qt5Widgets-devel >= %{qt5_ver}
28 BuildRequires:  boost-devel >= %{boost_ver}
29 BuildRequires:  cmake >= 2.8.11
30 BuildRequires:  gmp-devel >= 4.1.4
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  mpfr-devel >= 2.2.1
33 BuildRequires:  qt5-build >= %{qt5_ver}
34 BuildRequires:  qt5-qmake >= %{qt5_ver}
35 BuildRequires:  rpmbuild(macros) >= 1.605
36 BuildRequires:  sed >= 4.0
37 BuildRequires:  zlib-devel
38 %if %{with qt3}
39 BuildRequires:  qt-devel >= 3
40 BuildRequires:  xorg-lib-libX11-devel
41 BuildRequires:  xorg-lib-libXext-devel
42 %endif
43 %if %{with examples}
44 BuildRequires:  blas-devel
45 BuildRequires:  eigen3 >= 3.1.91
46 BuildRequires:  gmp-c++-devel >= 4.1.4
47 BuildRequires:  lapack-devel
48 BuildRequires:  tbb
49 #TODO: mpfi QGLViewer ipelib 
50 %endif
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
54 Libraries for CGAL applications. CGAL is a collaborative effort of
55 several sites in Europe and Israel. The goal is to make the most
56 important of the solutions and methods developed in computational
57 geometry available to users in industry and academia in a C++ library.
58 The goal is to provide easy access to useful, reliable geometric
59 algorithms.
60
61 %description -l pl.UTF-8
62 Biblioteka dla aplikacji CGAL (Computational Geometry Algorithms
63 Library). CGAL to wspólny projekt kilku placówek w Europie i Izraelu.
64 Celem jest udostępnienie najważniejszych rozwiązań i metod powstałych
65 w geometrii obliczeniowej dla użytkowników przemysłowych i naukowych w
66 postaci biblioteki C++. Ma ona za zadanie zapewniać łatwy dostęp do
67 przydatnych, wiarygodnych algorytmów geometrycznych.
68
69 %package devel
70 Summary:        Development files and tools for CGAL applications
71 Summary(pl.UTF-8):      Pliki i narzędzia programistyczne dla aplikacji CGAL
72 Group:          Development/Libraries
73 Requires:       %{name} = %{version}-%{release}
74 Requires:       boost-devel >= %{boost_ver}
75 Requires:       libstdc++-devel
76 # for Qt5 component
77 Requires:       Qt5Core-devel >= %{qt5_ver}
78 Requires:       Qt5Gui-devel >= %{qt5_ver}
79 Requires:       Qt5OpenGL-devel >= %{qt5_ver}
80 Requires:       Qt5Widgets-devel >= %{qt5_ver}
81 # for Qt3 component
82 %if %{with qt3}
83 Requires:       qt-devel >= 3
84 %endif
85 # CGAL header interfaces for (using their headers) - use Suggests?
86 Requires:       gmp-c++-devel >= 4.1.4
87 Requires:       gmp-devel >= 4.1.4
88 Requires:       mpfr-devel >= 2.2.1
89 #Suggests: eigen3 >= 3.1 gsl-devel tbb-devel vtk-devel
90 #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>
91 Requires:       zlib-devel
92 # CGAL header interfaces for (without using their headers) - use Suggests?
93 Requires:       blas-devel
94 Requires:       lapack-devel
95
96 %description devel
97 This package provides the header files and tools you may need to
98 develop applications using CGAL.
99
100 %description devel -l pl.UTF-8
101 Ten pakiet zawiera pliki nagłówkowe i narzędzia potrzebne do tworzenia
102 aplikacji wykorzystujących CGAL.
103
104 %package demos-source
105 Summary:        Examples and demos of CGAL algorithms
106 Summary(pl.UTF-8):      Przykłady i programy demonstracyjne do algorytmów CGAL
107 Group:          Documentation
108 Requires:       %{name}-devel = %{version}-%{release}
109
110 %description demos-source
111 This package provides the sources of examples and demos of CGAL
112 algorithms.
113
114 %description demos-source -l pl.UTF-8
115 Ten pakiet zawiera kod źrodłowy programów przykładowych i
116 demonstracyjnych do algorytmów CGAL.
117
118 %prep
119 %setup -q -n releases-%{name}-%{version}
120 %patch0 -p1
121
122 %build
123 install -d build
124 cd build
125 # override build type, because:
126 # PLD is not a valid build type: only Release or Debug is allowed
127 %cmake .. \
128         -DCGAL_CXX_FLAGS="%{rpmcxxflags} %{rpmcppflags}" \
129         -DCGAL_SHARED_LINKER_FLAGS="%{rpmldflags}" \
130         -DCGAL_INSTALL_LIB_DIR=%{_lib} \
131         -DCGAL_INSTALL_DOC_DIR= \
132         %{?with_qt3:-DWITH_CGAL_Qt3=ON} \
133 %if %{with examples}
134         -DWITH_demos=ON \
135         -DWITH_examples=ON
136 %endif
137
138 %{__make}
139
140 %install
141 rm -rf $RPM_BUILD_ROOT
142 %{__make} -C build install \
143         DESTDIR=$RPM_BUILD_ROOT
144
145 # useless in binary package
146 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{cgal_create_CMakeLists,cgal_create_cmake_script,cgal_make_macosx_app}
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %post   -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
153
154 %files
155 %defattr(644,root,root,755)
156 %doc AUTHORS CHANGES LICENSE LICENSE.BSL LICENSE.FREE_USE LICENSE.LGPL
157 %attr(755,root,root) %{_libdir}/libCGAL.so.*.*.*
158 %attr(755,root,root) %ghost %{_libdir}/libCGAL.so.11
159 %attr(755,root,root) %{_libdir}/libCGAL_Core.so.*.*.*
160 %attr(755,root,root) %ghost %{_libdir}/libCGAL_Core.so.11
161 %attr(755,root,root) %{_libdir}/libCGAL_ImageIO.so.*.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libCGAL_ImageIO.so.11
163 %if %{with qt3}
164 %attr(755,root,root) %{_libdir}/libCGAL_Qt3.so.*.*.*
165 %attr(755,root,root) %ghost %{_libdir}/libCGAL_Qt3.so.11
166 %endif
167 %attr(755,root,root) %{_libdir}/libCGAL_Qt5.so.*.*.*
168 %attr(755,root,root) %ghost %{_libdir}/libCGAL_Qt5.so.11
169
170 %files devel
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/libCGAL.so
173 %attr(755,root,root) %{_libdir}/libCGAL_Core.so
174 %attr(755,root,root) %{_libdir}/libCGAL_ImageIO.so
175 %if %{with qt3}
176 %attr(755,root,root) %{_libdir}/libCGAL_Qt3.so
177 %endif
178 %attr(755,root,root) %{_libdir}/libCGAL_Qt5.so
179 %{_includedir}/CGAL
180 %{_libdir}/CGAL
181 %{_mandir}/man1/cgal_create_cmake_script.1*
This page took 0.066142 seconds and 3 git commands to generate.