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