]>
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 |
aae1b476 | 15 | Version: 2.8.12.2 |
6f0c4bc3 | 16 | Release: 2 |
efafbc62 | 17 | License: BSD |
72a696fa | 18 | Group: Development/Building |
28f0bd6c | 19 | Source0: http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz |
aae1b476 | 20 | # Source0-md5: 17c6513483d23590cbce6957ec6d1e66 |
6342daf8 | 21 | Patch0: %{name}-lib64.patch |
9ec4f08d | 22 | Patch1: %{name}-helpers.patch |
de784c58 JB |
23 | Patch2: %{name}-findruby.patch |
24 | Patch3: %{name}-tests.patch | |
0ea0e364 | 25 | Patch4: %{name}-freetype2.patch |
a048aac3 | 26 | Patch5: %{name}-findruby2.patch |
a315a797 | 27 | URL: http://www.cmake.org/ |
33042d59 | 28 | %{?with_gui:BuildRequires: QtGui-devel} |
fef12180 | 29 | BuildRequires: libarchive-devel |
ece9e155 | 30 | BuildRequires: libstdc++-devel |
59917d1a | 31 | BuildRequires: ncurses-devel > 5.9-3 |
33042d59 KK |
32 | %{?with_gui:BuildRequires: qt4-build} |
33 | %{?with_gui:BuildRequires: qt4-qmake} | |
ece9e155 | 34 | BuildRequires: rpmbuild(macros) >= 1.167 |
ab02ad6a | 35 | %{!?with_bootstrap:BuildRequires: xmlrpc-c-devel >= 1.4.12-2} |
75cb386f | 36 | Requires: filesystem >= 3.0-52 |
efafbc62 | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3fcbc09a AG |
38 | |
39 | %description | |
efafbc62 AG |
40 | CMake is used to control the software compilation process using simple |
41 | platform and compiler independent configuration files. CMake generates | |
42 | native makefiles and workspaces that can be used in the compiler | |
43 | environment of your choice. CMake is quite sophisticated: it is | |
44 | possible to support complex environments requiring system | |
45 | configuration, pre-processor generation, code generation, and template | |
46 | instantiation. | |
3fcbc09a | 47 | |
520c9eb8 JR |
48 | %description -l pl.UTF-8 |
49 | CMake służy do sterowania procesem kompilacji oprogramowania przy | |
ca760f29 | 50 | użyciu prostych plików konfiguracyjnych niezależnych od platformy i |
51 | kompilatora. CMake generuje natywne pliki makefile i workspace, | |
485d9a7a | 52 | których można używać w wybranym środowisku kompilatora. CMake jest |
59787775 | 53 | dość wyrafinowany: może obsłużyć złożone środowiska wymagające |
ca760f29 | 54 | konfiguracji systemu, generowanie preprocesora, generowanie kodu i |
55 | dziedziczenie szablonów. | |
33042d59 KK |
56 | |
57 | %package gui | |
b563f9dc JB |
58 | Summary: Qt GUI for CMake |
59 | Summary(pl.UTF-8): Graficzny interfejs użytkownika Qt dla CMake | |
33042d59 KK |
60 | Group: Development/Tools |
61 | Requires: %{name} = %{version}-%{release} | |
62 | ||
b563f9dc JB |
63 | %description gui |
64 | This package contains the Qt based GUI for CMake. | |
65 | ||
66 | %description gui -l pl.UTF-8 | |
67 | Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla | |
68 | CMake. | |
72a696fa | 69 | |
9ec4f08d | 70 | %package emacs |
69d19c08 JB |
71 | Summary: Emacs mode for cmake files |
72 | Summary(pl.UTF-8): Tryb Emacsa dla plików cmake'a | |
9ec4f08d KK |
73 | Group: Development/Tools |
74 | ||
75 | %description emacs | |
69d19c08 JB |
76 | Emacs mode for cmake files. |
77 | ||
78 | %description emacs -l pl.UTF-8 | |
79 | Tryb Emacsa dla plików cmake'a. | |
9ec4f08d KK |
80 | |
81 | %package -n bash-completion-%{name} | |
82 | Summary: bash-completion for cmake | |
69d19c08 | 83 | Summary(pl.UTF-8): Bashowe dopełnianie parametrów dla cmake'a |
9ec4f08d | 84 | Group: Applications/Shells |
69d19c08 | 85 | Requires: %{name} = %{version}-%{release} |
a9b1845f | 86 | Requires: bash-completion >= 2.0 |
6465d90a ER |
87 | %if "%{_rpmversion}" >= "5" |
88 | BuildArch: noarch | |
89 | %endif | |
9ec4f08d KK |
90 | |
91 | %description -n bash-completion-%{name} | |
69d19c08 JB |
92 | bash-completion for cmake. |
93 | ||
94 | %description -n bash-completion-%{name} -l pl.UTF-8 | |
95 | Bashowe dopełnianie parametrów dla cmake'a. | |
9ec4f08d | 96 | |
3fcbc09a | 97 | %prep |
923851a2 | 98 | %setup -q |
286b1479 | 99 | %if "%{_lib}" == "lib64" |
6342daf8 | 100 | %patch0 -p1 |
286b1479 | 101 | %endif |
9ec4f08d | 102 | %patch1 -p1 |
fe667d6f | 103 | %patch2 -p1 |
de784c58 | 104 | %patch3 -p1 |
0ea0e364 | 105 | %patch4 -p1 |
a048aac3 | 106 | %patch5 -p1 |
3fcbc09a | 107 | |
ece9e155 | 108 | cat > "init.cmake" <<EOF |
286b1479 | 109 | SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE) |
9ec4f08d KK |
110 | SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE) |
111 | SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE) | |
ece9e155 KK |
112 | EOF |
113 | ||
b343cdb1 JR |
114 | # cleanup backups after patching, modules are copied as-is |
115 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
116 | ||
3fcbc09a | 117 | %build |
ece9e155 KK |
118 | export CC="%{__cc}" |
119 | export CXX="%{__cxx}" | |
120 | export CFLAGS="%{rpmcflags}" | |
121 | export CXXFLAGS="%{rpmcxxflags}" | |
ccca321d | 122 | export LDFLAGS="%{rpmldflags}" |
923851a2 AG |
123 | ./bootstrap \ |
124 | --prefix=%{_prefix} \ | |
125 | --mandir=/share/man \ | |
126 | --datadir=/share/cmake \ | |
ece9e155 | 127 | --init=init.cmake \ |
c342f103 | 128 | %{!?with_bootstrap:--system-libs} \ |
33042d59 | 129 | %{?with_gui:--qt-gui} \ |
08bb5e07 | 130 | --qt-qmake=/usr/bin/qmake-qt4 \ |
923851a2 AG |
131 | --verbose |
132 | ||
28f0bd6c | 133 | %{__make} VERBOSE=1 |
3fcbc09a | 134 | |
1fbe3ed6 AM |
135 | %{?with_tests:%{__make} test} |
136 | ||
3fcbc09a | 137 | %install |
efafbc62 | 138 | rm -rf $RPM_BUILD_ROOT |
72a696fa JB |
139 | %{__make} install \ |
140 | DESTDIR=$RPM_BUILD_ROOT | |
141 | ||
75cb386f | 142 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc |
3fcbc09a AG |
143 | |
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
147 | %files | |
efafbc62 | 148 | %defattr(644,root,root,755) |
51ed65c6 | 149 | %doc ChangeLog.* Copyright.txt *.gif Docs/{cmake,ctest}.{txt,html} |
72a696fa JB |
150 | %attr(755,root,root) %{_bindir}/ccmake |
151 | %attr(755,root,root) %{_bindir}/cmake | |
08b6790a | 152 | %attr(755,root,root) %{_bindir}/cpack |
72a696fa | 153 | %attr(755,root,root) %{_bindir}/ctest |
08bb5e07 JB |
154 | %{_mandir}/man1/ccmake.1* |
155 | %{_mandir}/man1/cmake.1* | |
156 | %{_mandir}/man1/cmakecommands.1* | |
157 | %{_mandir}/man1/cmakecompat.1* | |
158 | %{_mandir}/man1/cmakemodules.1* | |
159 | %{_mandir}/man1/cmakepolicies.1* | |
160 | %{_mandir}/man1/cmakeprops.1* | |
161 | %{_mandir}/man1/cmakevars.1* | |
162 | %{_mandir}/man1/cpack.1* | |
163 | %{_mandir}/man1/ctest.1* | |
b24a2e64 JB |
164 | # top cmake/Modules dirs belong to filesystem |
165 | %{_datadir}/cmake/Modules/.NoDartCoverage | |
166 | %{_datadir}/cmake/Modules/* | |
167 | %{_datadir}/cmake/Templates | |
f13d1e41 | 168 | %{_datadir}/cmake/editors |
b24a2e64 | 169 | %{_datadir}/cmake/include |
09f5d631 | 170 | %{_aclocaldir}/cmake.m4 |
33042d59 | 171 | |
1a3a9dcd | 172 | %if %{with gui} |
33042d59 KK |
173 | %files gui |
174 | %defattr(644,root,root,755) | |
175 | %attr(755,root,root) %{_bindir}/cmake-gui | |
176 | %{_datadir}/mime/packages/cmakecache.xml | |
177 | %{_desktopdir}/CMake.desktop | |
ca760f29 | 178 | %{_pixmapsdir}/CMakeSetup32.png |
08bb5e07 | 179 | %{_mandir}/man1/cmake-gui.1* |
1a3a9dcd | 180 | %endif |
9ec4f08d KK |
181 | |
182 | %files emacs | |
183 | %defattr(644,root,root,755) | |
184 | %{_datadir}/emacs/site-lisp/cmake-mode.el | |
185 | ||
186 | %files -n bash-completion-%{name} | |
187 | %defattr(644,root,root,755) | |
a9b1845f JB |
188 | %{_datadir}/bash-completion/completions/cmake |
189 | %{_datadir}/bash-completion/completions/cpack | |
190 | %{_datadir}/bash-completion/completions/ctest |