]> git.pld-linux.org Git - packages/cmake.git/blob - cmake.spec
- updated to 3.0.2
[packages/cmake.git] / cmake.spec
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             # don't build gui package
10 %bcond_without  tests           # do not perform "make test"
11
12 Summary:        Cross-platform, open-source make system
13 Summary(pl.UTF-8):      Wieloplatformowy system make o otwartych źródłach
14 Name:           cmake
15 Version:        3.0.2
16 Release:        1
17 License:        BSD
18 Group:          Development/Building
19 Source0:        http://www.cmake.org/files/v3.0/%{name}-%{version}.tar.gz
20 # Source0-md5:  db4c687a31444a929d2fdc36c4dfb95f
21 Patch0:         %{name}-lib64.patch
22 Patch1:         %{name}-helpers.patch
23 Patch2:         %{name}-findruby.patch
24 Patch3:         %{name}-tests.patch
25 Patch5:         %{name}-findruby2.patch
26 Patch6:         %{name}-findpython.patch
27 URL:            http://www.cmake.org/
28 %{?with_gui:BuildRequires:      QtGui-devel}
29 BuildRequires:  libarchive-devel
30 BuildRequires:  libstdc++-devel
31 BuildRequires:  ncurses-devel > 5.9-3
32 %{?with_gui:BuildRequires:      qt4-build}
33 %{?with_gui:BuildRequires:      qt4-qmake}
34 BuildRequires:  rpmbuild(macros) >= 1.167
35 BuildRequires:  sphinx-pdg
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)
39
40 %description
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
47 instantiation.
48
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.
57
58 %package doc-html
59 Summary:        CMake documentation in HTML format
60 Summary(pl.UTF-8):      Dokumentacja do pakietu CMake w formacie HTML
61 Group:          Documentation
62
63 %description doc-html
64 CMake documentation in HTML format.
65
66 %description doc-html -l pl.UTF-8
67 Dokumentacja do pakietu CMake w formacie HTML.
68
69 %package gui
70 Summary:        Qt GUI for CMake
71 Summary(pl.UTF-8):      Graficzny interfejs użytkownika Qt dla CMake
72 Group:          Development/Tools
73 Requires:       %{name} = %{version}-%{release}
74
75 %description gui
76 This package contains the Qt based GUI for CMake.
77
78 %description gui -l pl.UTF-8
79 Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla
80 CMake.
81
82 %package emacs
83 Summary:        Emacs mode for cmake files
84 Summary(pl.UTF-8):      Tryb Emacsa dla plików cmake'a
85 Group:          Development/Tools
86
87 %description emacs
88 Emacs mode for cmake files.
89
90 %description emacs -l pl.UTF-8
91 Tryb Emacsa dla plików cmake'a.
92
93 %package -n bash-completion-%{name}
94 Summary:        bash-completion for cmake
95 Summary(pl.UTF-8):      Bashowe dopełnianie parametrów dla cmake'a
96 Group:          Applications/Shells
97 Requires:       %{name} = %{version}-%{release}
98 Requires:       bash-completion >= 2.0
99 %if "%{_rpmversion}" >= "5"
100 BuildArch:      noarch
101 %endif
102
103 %description -n bash-completion-%{name}
104 bash-completion for cmake.
105
106 %description -n bash-completion-%{name} -l pl.UTF-8
107 Bashowe dopełnianie parametrów dla cmake'a.
108
109 %prep
110 %setup -q
111 %if "%{_lib}" == "lib64"
112 %patch0 -p1
113 %endif
114 %patch1 -p1
115 %patch2 -p1
116 %patch3 -p1
117 %patch5 -p1
118 %patch6 -p1
119
120 cat > "init.cmake" <<EOF
121 SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE)
122 SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE)
123 SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE)
124 EOF
125
126 # cleanup backups after patching, modules are copied as-is
127 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
128
129 %build
130 export CC="%{__cc}"
131 export CXX="%{__cxx}"
132 export CFLAGS="%{rpmcflags}"
133 export CXXFLAGS="%{rpmcxxflags}"
134 export LDFLAGS="%{rpmldflags}"
135 ./bootstrap \
136         --prefix=%{_prefix} \
137         --mandir=/share/man \
138         --datadir=/share/cmake \
139         --init=init.cmake \
140         %{!?with_bootstrap:--system-libs} \
141         %{?with_gui:--qt-gui} \
142         --qt-qmake=/usr/bin/qmake-qt4 \
143         --sphinx-html \
144         --sphinx-man \
145         --verbose
146
147 %{__make} VERBOSE=1
148
149 %{?with_tests:%{__make} test}
150
151 %install
152 rm -rf $RPM_BUILD_ROOT
153 %{__make} install \
154         DESTDIR=$RPM_BUILD_ROOT
155
156 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc
157
158 %clean
159 rm -rf $RPM_BUILD_ROOT
160
161 %files
162 %defattr(644,root,root,755)
163 %doc Copyright.txt README.rst *.gif
164 %attr(755,root,root) %{_bindir}/ccmake
165 %attr(755,root,root) %{_bindir}/cmake
166 %attr(755,root,root) %{_bindir}/cpack
167 %attr(755,root,root) %{_bindir}/ctest
168 %{_mandir}/man1/ccmake.1*
169 %{_mandir}/man1/cmake.1*
170 %{_mandir}/man1/cpack.1*
171 %{_mandir}/man1/ctest.1*
172 %{_mandir}/man7/cmake-buildsystem.7*
173 %{_mandir}/man7/cmake-commands.7*
174 %{_mandir}/man7/cmake-developer.7*
175 %{_mandir}/man7/cmake-generator-expressions.7*
176 %{_mandir}/man7/cmake-generators.7*
177 %{_mandir}/man7/cmake-language.7*
178 %{_mandir}/man7/cmake-modules.7*
179 %{_mandir}/man7/cmake-packages.7*
180 %{_mandir}/man7/cmake-policies.7*
181 %{_mandir}/man7/cmake-properties.7*
182 %{_mandir}/man7/cmake-qt.7*
183 %{_mandir}/man7/cmake-toolchains.7*
184 %{_mandir}/man7/cmake-variables.7*
185 # top cmake/Modules dirs belong to filesystem
186 %{_datadir}/cmake/Modules/.NoDartCoverage
187 %{_datadir}/cmake/Modules/*
188 %{_datadir}/cmake/Templates
189 %{_datadir}/cmake/editors
190 %{_datadir}/cmake/include
191 %{_aclocaldir}/cmake.m4
192
193 %files doc-html
194 %defattr(644,root,root,755)
195 %doc Utilities/Sphinx/html/*
196
197 %if %{with gui}
198 %files gui
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/cmake-gui
201 %{_datadir}/cmake/Help
202 %{_datadir}/mime/packages/cmakecache.xml
203 %{_desktopdir}/CMake.desktop
204 %{_pixmapsdir}/CMakeSetup32.png
205 %{_mandir}/man1/cmake-gui.1*
206 %endif
207
208 %files emacs
209 %defattr(644,root,root,755)
210 %{_datadir}/emacs/site-lisp/cmake-mode.el
211
212 %files -n bash-completion-%{name}
213 %defattr(644,root,root,755)
214 %{_datadir}/bash-completion/completions/cmake
215 %{_datadir}/bash-completion/completions/cpack
216 %{_datadir}/bash-completion/completions/ctest
This page took 0.087255 seconds and 4 git commands to generate.