]>
Commit | Line | Data |
---|---|---|
d1b2e54c JB |
1 | # TODO: |
2 | # - any valid CMAKE_BUILD_TYPE causes overriding of our optflags | |
3 | # (and default non-verbose makefiles are hiding it!) | |
4 | # - rpmldflags/rpmcppflags are not passed through %%cmake macro at all | |
5 | # (is there any standard way???) | |
ccca321d KK |
6 | # |
7 | # Conditional build: | |
b563f9dc JB |
8 | %bcond_with bootstrap # use internal versions of some libraries |
9 | %bcond_without gui # don't build gui package | |
eead9c17 | 10 | %bcond_without tests # do not perform "make test" |
77f8acdd | 11 | |
efafbc62 | 12 | Summary: Cross-platform, open-source make system |
ac3ea35a | 13 | Summary(pl.UTF-8): Wieloplatformowy system make o otwartych źródłach |
72a696fa | 14 | Name: cmake |
cda7a827 | 15 | Version: 3.1.0 |
aed8617e | 16 | Release: 2 |
efafbc62 | 17 | License: BSD |
72a696fa | 18 | Group: Development/Building |
cda7a827 AM |
19 | Source0: http://www.cmake.org/files/v3.1/%{name}-%{version}.tar.gz |
20 | # Source0-md5: 188eb7dc9b1b82b363bc51c0d3f1d461 | |
6342daf8 | 21 | Patch0: %{name}-lib64.patch |
9ec4f08d | 22 | Patch1: %{name}-helpers.patch |
de784c58 JB |
23 | Patch2: %{name}-findruby.patch |
24 | Patch3: %{name}-tests.patch | |
aed8617e | 25 | Patch4: %{name}-bug-0015258.patch |
a048aac3 | 26 | Patch5: %{name}-findruby2.patch |
1269f267 | 27 | Patch6: %{name}-findpython.patch |
a315a797 | 28 | URL: http://www.cmake.org/ |
33042d59 | 29 | %{?with_gui:BuildRequires: QtGui-devel} |
fef12180 | 30 | BuildRequires: libarchive-devel |
ece9e155 | 31 | BuildRequires: libstdc++-devel |
59917d1a | 32 | BuildRequires: ncurses-devel > 5.9-3 |
33042d59 KK |
33 | %{?with_gui:BuildRequires: qt4-build} |
34 | %{?with_gui:BuildRequires: qt4-qmake} | |
ece9e155 | 35 | BuildRequires: rpmbuild(macros) >= 1.167 |
fe46a853 | 36 | BuildRequires: sphinx-pdg |
ab02ad6a | 37 | %{!?with_bootstrap:BuildRequires: xmlrpc-c-devel >= 1.4.12-2} |
75cb386f | 38 | Requires: filesystem >= 3.0-52 |
efafbc62 | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3fcbc09a AG |
40 | |
41 | %description | |
efafbc62 AG |
42 | CMake is used to control the software compilation process using simple |
43 | platform and compiler independent configuration files. CMake generates | |
44 | native makefiles and workspaces that can be used in the compiler | |
45 | environment of your choice. CMake is quite sophisticated: it is | |
46 | possible to support complex environments requiring system | |
47 | configuration, pre-processor generation, code generation, and template | |
48 | instantiation. | |
3fcbc09a | 49 | |
520c9eb8 JR |
50 | %description -l pl.UTF-8 |
51 | CMake służy do sterowania procesem kompilacji oprogramowania przy | |
ca760f29 | 52 | użyciu prostych plików konfiguracyjnych niezależnych od platformy i |
53 | kompilatora. CMake generuje natywne pliki makefile i workspace, | |
485d9a7a | 54 | których można używać w wybranym środowisku kompilatora. CMake jest |
59787775 | 55 | dość wyrafinowany: może obsłużyć złożone środowiska wymagające |
ca760f29 | 56 | konfiguracji systemu, generowanie preprocesora, generowanie kodu i |
57 | dziedziczenie szablonów. | |
33042d59 | 58 | |
fe46a853 JB |
59 | %package doc-html |
60 | Summary: CMake documentation in HTML format | |
61 | Summary(pl.UTF-8): Dokumentacja do pakietu CMake w formacie HTML | |
62 | Group: Documentation | |
63 | ||
64 | %description doc-html | |
65 | CMake documentation in HTML format. | |
66 | ||
67 | %description doc-html -l pl.UTF-8 | |
68 | Dokumentacja do pakietu CMake w formacie HTML. | |
69 | ||
33042d59 | 70 | %package gui |
b563f9dc JB |
71 | Summary: Qt GUI for CMake |
72 | Summary(pl.UTF-8): Graficzny interfejs użytkownika Qt dla CMake | |
33042d59 KK |
73 | Group: Development/Tools |
74 | Requires: %{name} = %{version}-%{release} | |
75 | ||
b563f9dc JB |
76 | %description gui |
77 | This package contains the Qt based GUI for CMake. | |
78 | ||
79 | %description gui -l pl.UTF-8 | |
80 | Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla | |
81 | CMake. | |
72a696fa | 82 | |
9ec4f08d | 83 | %package emacs |
69d19c08 JB |
84 | Summary: Emacs mode for cmake files |
85 | Summary(pl.UTF-8): Tryb Emacsa dla plików cmake'a | |
9ec4f08d KK |
86 | Group: Development/Tools |
87 | ||
88 | %description emacs | |
69d19c08 JB |
89 | Emacs mode for cmake files. |
90 | ||
91 | %description emacs -l pl.UTF-8 | |
92 | Tryb Emacsa dla plików cmake'a. | |
9ec4f08d KK |
93 | |
94 | %package -n bash-completion-%{name} | |
95 | Summary: bash-completion for cmake | |
69d19c08 | 96 | Summary(pl.UTF-8): Bashowe dopełnianie parametrów dla cmake'a |
9ec4f08d | 97 | Group: Applications/Shells |
69d19c08 | 98 | Requires: %{name} = %{version}-%{release} |
a9b1845f | 99 | Requires: bash-completion >= 2.0 |
6465d90a ER |
100 | %if "%{_rpmversion}" >= "5" |
101 | BuildArch: noarch | |
102 | %endif | |
9ec4f08d KK |
103 | |
104 | %description -n bash-completion-%{name} | |
69d19c08 JB |
105 | bash-completion for cmake. |
106 | ||
107 | %description -n bash-completion-%{name} -l pl.UTF-8 | |
108 | Bashowe dopełnianie parametrów dla cmake'a. | |
9ec4f08d | 109 | |
3fcbc09a | 110 | %prep |
923851a2 | 111 | %setup -q |
286b1479 | 112 | %if "%{_lib}" == "lib64" |
6342daf8 | 113 | %patch0 -p1 |
286b1479 | 114 | %endif |
9ec4f08d | 115 | %patch1 -p1 |
fe667d6f | 116 | %patch2 -p1 |
de784c58 | 117 | %patch3 -p1 |
aed8617e | 118 | %patch4 -p1 |
a048aac3 | 119 | %patch5 -p1 |
1269f267 | 120 | %patch6 -p1 |
3fcbc09a | 121 | |
ece9e155 | 122 | cat > "init.cmake" <<EOF |
286b1479 | 123 | SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE) |
9ec4f08d KK |
124 | SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE) |
125 | SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE) | |
ece9e155 KK |
126 | EOF |
127 | ||
b343cdb1 JR |
128 | # cleanup backups after patching, modules are copied as-is |
129 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
130 | ||
3fcbc09a | 131 | %build |
ece9e155 KK |
132 | export CC="%{__cc}" |
133 | export CXX="%{__cxx}" | |
134 | export CFLAGS="%{rpmcflags}" | |
135 | export CXXFLAGS="%{rpmcxxflags}" | |
ccca321d | 136 | export LDFLAGS="%{rpmldflags}" |
923851a2 AG |
137 | ./bootstrap \ |
138 | --prefix=%{_prefix} \ | |
139 | --mandir=/share/man \ | |
140 | --datadir=/share/cmake \ | |
ece9e155 | 141 | --init=init.cmake \ |
c342f103 | 142 | %{!?with_bootstrap:--system-libs} \ |
33042d59 | 143 | %{?with_gui:--qt-gui} \ |
08bb5e07 | 144 | --qt-qmake=/usr/bin/qmake-qt4 \ |
fe46a853 JB |
145 | --sphinx-html \ |
146 | --sphinx-man \ | |
923851a2 AG |
147 | --verbose |
148 | ||
28f0bd6c | 149 | %{__make} VERBOSE=1 |
3fcbc09a | 150 | |
1fbe3ed6 AM |
151 | %{?with_tests:%{__make} test} |
152 | ||
3fcbc09a | 153 | %install |
efafbc62 | 154 | rm -rf $RPM_BUILD_ROOT |
72a696fa JB |
155 | %{__make} install \ |
156 | DESTDIR=$RPM_BUILD_ROOT | |
157 | ||
75cb386f | 158 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc |
3fcbc09a AG |
159 | |
160 | %clean | |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
163 | %files | |
efafbc62 | 164 | %defattr(644,root,root,755) |
fe46a853 | 165 | %doc Copyright.txt README.rst *.gif |
72a696fa JB |
166 | %attr(755,root,root) %{_bindir}/ccmake |
167 | %attr(755,root,root) %{_bindir}/cmake | |
08b6790a | 168 | %attr(755,root,root) %{_bindir}/cpack |
72a696fa | 169 | %attr(755,root,root) %{_bindir}/ctest |
08bb5e07 JB |
170 | %{_mandir}/man1/ccmake.1* |
171 | %{_mandir}/man1/cmake.1* | |
08bb5e07 JB |
172 | %{_mandir}/man1/cpack.1* |
173 | %{_mandir}/man1/ctest.1* | |
fe46a853 JB |
174 | %{_mandir}/man7/cmake-buildsystem.7* |
175 | %{_mandir}/man7/cmake-commands.7* | |
cda7a827 | 176 | %{_mandir}/man7/cmake-compile-features.7* |
fe46a853 JB |
177 | %{_mandir}/man7/cmake-developer.7* |
178 | %{_mandir}/man7/cmake-generator-expressions.7* | |
179 | %{_mandir}/man7/cmake-generators.7* | |
180 | %{_mandir}/man7/cmake-language.7* | |
181 | %{_mandir}/man7/cmake-modules.7* | |
182 | %{_mandir}/man7/cmake-packages.7* | |
183 | %{_mandir}/man7/cmake-policies.7* | |
184 | %{_mandir}/man7/cmake-properties.7* | |
185 | %{_mandir}/man7/cmake-qt.7* | |
186 | %{_mandir}/man7/cmake-toolchains.7* | |
187 | %{_mandir}/man7/cmake-variables.7* | |
b24a2e64 JB |
188 | # top cmake/Modules dirs belong to filesystem |
189 | %{_datadir}/cmake/Modules/.NoDartCoverage | |
190 | %{_datadir}/cmake/Modules/* | |
191 | %{_datadir}/cmake/Templates | |
f13d1e41 | 192 | %{_datadir}/cmake/editors |
b24a2e64 | 193 | %{_datadir}/cmake/include |
09f5d631 | 194 | %{_aclocaldir}/cmake.m4 |
33042d59 | 195 | |
fe46a853 JB |
196 | %files doc-html |
197 | %defattr(644,root,root,755) | |
198 | %doc Utilities/Sphinx/html/* | |
199 | ||
1a3a9dcd | 200 | %if %{with gui} |
33042d59 KK |
201 | %files gui |
202 | %defattr(644,root,root,755) | |
203 | %attr(755,root,root) %{_bindir}/cmake-gui | |
fe46a853 | 204 | %{_datadir}/cmake/Help |
33042d59 KK |
205 | %{_datadir}/mime/packages/cmakecache.xml |
206 | %{_desktopdir}/CMake.desktop | |
ca760f29 | 207 | %{_pixmapsdir}/CMakeSetup32.png |
08bb5e07 | 208 | %{_mandir}/man1/cmake-gui.1* |
1a3a9dcd | 209 | %endif |
9ec4f08d KK |
210 | |
211 | %files emacs | |
212 | %defattr(644,root,root,755) | |
213 | %{_datadir}/emacs/site-lisp/cmake-mode.el | |
214 | ||
215 | %files -n bash-completion-%{name} | |
216 | %defattr(644,root,root,755) | |
a9b1845f JB |
217 | %{_datadir}/bash-completion/completions/cmake |
218 | %{_datadir}/bash-completion/completions/cpack | |
219 | %{_datadir}/bash-completion/completions/ctest |