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