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???)
8 %bcond_with bootstrap # use internal versions of some libraries
9 %bcond_without gui # don't build gui package
10 %bcond_without tests # do not perform "make test"
12 Summary: Cross-platform, open-source make system
13 Summary(pl.UTF-8): Wieloplatformowy system make o otwartych źródłach
18 Group: Development/Building
19 Source0: http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz
20 # Source0-md5: 17c6513483d23590cbce6957ec6d1e66
21 Patch0: %{name}-lib64.patch
22 Patch1: %{name}-helpers.patch
23 Patch2: %{name}-findruby.patch
24 Patch3: %{name}-tests.patch
25 Patch4: %{name}-freetype2.patch
26 Patch5: %{name}-findruby2.patch
27 Patch6: %{name}-findpython.patch
28 URL: http://www.cmake.org/
29 %{?with_gui:BuildRequires: QtGui-devel}
30 BuildRequires: libarchive-devel
31 BuildRequires: libstdc++-devel
32 BuildRequires: ncurses-devel > 5.9-3
33 %{?with_gui:BuildRequires: qt4-build}
34 %{?with_gui:BuildRequires: qt4-qmake}
35 BuildRequires: rpmbuild(macros) >= 1.167
36 %{!?with_bootstrap:BuildRequires: xmlrpc-c-devel >= 1.4.12-2}
37 Requires: filesystem >= 3.0-52
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 CMake is used to control the software compilation process using simple
42 platform and compiler independent configuration files. CMake generates
43 native makefiles and workspaces that can be used in the compiler
44 environment of your choice. CMake is quite sophisticated: it is
45 possible to support complex environments requiring system
46 configuration, pre-processor generation, code generation, and template
49 %description -l pl.UTF-8
50 CMake służy do sterowania procesem kompilacji oprogramowania przy
51 użyciu prostych plików konfiguracyjnych niezależnych od platformy i
52 kompilatora. CMake generuje natywne pliki makefile i workspace,
53 których można używać w wybranym środowisku kompilatora. CMake jest
54 dość wyrafinowany: może obsłużyć złożone środowiska wymagające
55 konfiguracji systemu, generowanie preprocesora, generowanie kodu i
56 dziedziczenie szablonów.
59 Summary: Qt GUI for CMake
60 Summary(pl.UTF-8): Graficzny interfejs użytkownika Qt dla CMake
61 Group: Development/Tools
62 Requires: %{name} = %{version}-%{release}
65 This package contains the Qt based GUI for CMake.
67 %description gui -l pl.UTF-8
68 Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla
72 Summary: Emacs mode for cmake files
73 Summary(pl.UTF-8): Tryb Emacsa dla plików cmake'a
74 Group: Development/Tools
77 Emacs mode for cmake files.
79 %description emacs -l pl.UTF-8
80 Tryb Emacsa dla plików cmake'a.
82 %package -n bash-completion-%{name}
83 Summary: bash-completion for cmake
84 Summary(pl.UTF-8): Bashowe dopełnianie parametrów dla cmake'a
85 Group: Applications/Shells
86 Requires: %{name} = %{version}-%{release}
87 Requires: bash-completion >= 2.0
88 %if "%{_rpmversion}" >= "5"
92 %description -n bash-completion-%{name}
93 bash-completion for cmake.
95 %description -n bash-completion-%{name} -l pl.UTF-8
96 Bashowe dopełnianie parametrów dla cmake'a.
100 %if "%{_lib}" == "lib64"
110 cat > "init.cmake" <<EOF
111 SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE)
112 SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE)
113 SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE)
116 # cleanup backups after patching, modules are copied as-is
117 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
121 export CXX="%{__cxx}"
122 export CFLAGS="%{rpmcflags}"
123 export CXXFLAGS="%{rpmcxxflags}"
124 export LDFLAGS="%{rpmldflags}"
126 --prefix=%{_prefix} \
127 --mandir=/share/man \
128 --datadir=/share/cmake \
130 %{!?with_bootstrap:--system-libs} \
131 %{?with_gui:--qt-gui} \
132 --qt-qmake=/usr/bin/qmake-qt4 \
137 %{?with_tests:%{__make} test}
140 rm -rf $RPM_BUILD_ROOT
142 DESTDIR=$RPM_BUILD_ROOT
144 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc
147 rm -rf $RPM_BUILD_ROOT
150 %defattr(644,root,root,755)
151 %doc ChangeLog.* Copyright.txt *.gif Docs/{cmake,ctest}.{txt,html}
152 %attr(755,root,root) %{_bindir}/ccmake
153 %attr(755,root,root) %{_bindir}/cmake
154 %attr(755,root,root) %{_bindir}/cpack
155 %attr(755,root,root) %{_bindir}/ctest
156 %{_mandir}/man1/ccmake.1*
157 %{_mandir}/man1/cmake.1*
158 %{_mandir}/man1/cmakecommands.1*
159 %{_mandir}/man1/cmakecompat.1*
160 %{_mandir}/man1/cmakemodules.1*
161 %{_mandir}/man1/cmakepolicies.1*
162 %{_mandir}/man1/cmakeprops.1*
163 %{_mandir}/man1/cmakevars.1*
164 %{_mandir}/man1/cpack.1*
165 %{_mandir}/man1/ctest.1*
166 # top cmake/Modules dirs belong to filesystem
167 %{_datadir}/cmake/Modules/.NoDartCoverage
168 %{_datadir}/cmake/Modules/*
169 %{_datadir}/cmake/Templates
170 %{_datadir}/cmake/editors
171 %{_datadir}/cmake/include
172 %{_aclocaldir}/cmake.m4
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_bindir}/cmake-gui
178 %{_datadir}/mime/packages/cmakecache.xml
179 %{_desktopdir}/CMake.desktop
180 %{_pixmapsdir}/CMakeSetup32.png
181 %{_mandir}/man1/cmake-gui.1*
185 %defattr(644,root,root,755)
186 %{_datadir}/emacs/site-lisp/cmake-mode.el
188 %files -n bash-completion-%{name}
189 %defattr(644,root,root,755)
190 %{_datadir}/bash-completion/completions/cmake
191 %{_datadir}/bash-completion/completions/cpack
192 %{_datadir}/bash-completion/completions/ctest