]>
Commit | Line | Data |
---|---|---|
1 | # TODO: any valid CMAKE_BUILD_TYPE causes overriding of our optflags | |
2 | # (and default non-verbose makefiles are hiding it!) | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_with bootstrap # use internal versions of some libraries | |
6 | # | |
7 | Summary: Cross-platform, open-source make system | |
8 | Summary(pl.UTF-8): Wieloplatformowy system make o otwartych źródłach | |
9 | Name: cmake | |
10 | Version: 2.6.0 | |
11 | Release: 0.1 | |
12 | License: BSD | |
13 | Group: Development/Building | |
14 | Source0: http://www.cmake.org/files/v2.6/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: e95ae003672dfc6c8151a1ee49a0d4a6 | |
16 | Patch1: %{name}-lib64.patch | |
17 | URL: http://www.cmake.org/HTML/Index.html | |
18 | BuildRequires: libstdc++-devel | |
19 | BuildRequires: ncurses-devel | |
20 | BuildRequires: rpmbuild(macros) >= 1.167 | |
21 | %{!?with_bootstrap:BuildRequires: xmlrpc-c-devel} | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | CMake is used to control the software compilation process using simple | |
26 | platform and compiler independent configuration files. CMake generates | |
27 | native makefiles and workspaces that can be used in the compiler | |
28 | environment of your choice. CMake is quite sophisticated: it is | |
29 | possible to support complex environments requiring system | |
30 | configuration, pre-processor generation, code generation, and template | |
31 | instantiation. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | CMake służy do sterowania procesem kompilacji oprogramowania przy | |
35 | użyciu prostych plików konfiguracyjnych niezależnych od platformy i | |
36 | kompilatora. CMake generuje natywne pliki makefile i workspace, | |
37 | których można używać w wybranym środowisku kompilatora. CMake jest | |
38 | dość przemyślany: może obsłużyć złożone środowiska wymagające | |
39 | konfiguracji systemu, generowanie preprocesora, generowanie kodu i | |
40 | dziedziczenie szablonów. | |
41 | ||
42 | %prep | |
43 | %setup -q | |
44 | %if "%{_lib}" == "lib64" | |
45 | %patch1 -p1 | |
46 | %endif | |
47 | ||
48 | cat > "init.cmake" <<EOF | |
49 | SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE) | |
50 | SET (CMAKE_AR "%{__ar}" CACHE FILEPATH " " FORCE) | |
51 | EOF | |
52 | ||
53 | %build | |
54 | export CC="%{__cc}" | |
55 | export CXX="%{__cxx}" | |
56 | export CFLAGS="%{rpmcflags}" | |
57 | export CXXFLAGS="%{rpmcxxflags}" | |
58 | export LDFLAGS="%{rpmldflags}" | |
59 | ./bootstrap \ | |
60 | --prefix=%{_prefix} \ | |
61 | --mandir=/share/man \ | |
62 | --datadir=/share/cmake \ | |
63 | --init=init.cmake \ | |
64 | %{!?with_bootstrap:--system-libs} \ | |
65 | --verbose | |
66 | ||
67 | %{__make} | |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %{__make} install \ | |
73 | DESTDIR=$RPM_BUILD_ROOT | |
74 | ||
75 | rm -rf $RPM_BUILD_ROOT%{_prefix}/doc | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %files | |
81 | %defattr(644,root,root,755) | |
82 | %doc ChangeLog.* Copyright.txt *.gif Docs/{cmake,ctest}.{txt,html} | |
83 | %attr(755,root,root) %{_bindir}/ccmake | |
84 | %attr(755,root,root) %{_bindir}/cmake | |
85 | %attr(755,root,root) %{_bindir}/cpack | |
86 | %attr(755,root,root) %{_bindir}/ctest | |
87 | %{_mandir}/man1/*.1* | |
88 | %{_datadir}/cmake |