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