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