]> git.pld-linux.org Git - packages/cmake.git/blob - cmake.spec
- rel 3; look for python 3.5 and 3.4, too
[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:        2.8.12.2
16 Release:        3
17 License:        BSD
18 Group:          Development/Building
19 Source0:        http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz
20 # Source0-md5:  17c6513483d23590cbce6957ec6d1e66
21 Patch0:         %{name}-lib64.patch
22 Patch1:         %{name}-helpers.patch
23 Patch2:         %{name}-findruby.patch
24 Patch3:         %{name}-tests.patch
25 Patch4:         %{name}-freetype2.patch
26 Patch5:         %{name}-findruby2.patch
27 Patch6:         %{name}-findpython.patch
28 URL:            http://www.cmake.org/
29 %{?with_gui:BuildRequires:      QtGui-devel}
30 BuildRequires:  libarchive-devel
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  ncurses-devel > 5.9-3
33 %{?with_gui:BuildRequires:      qt4-build}
34 %{?with_gui:BuildRequires:      qt4-qmake}
35 BuildRequires:  rpmbuild(macros) >= 1.167
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 gui
59 Summary:        Qt GUI for CMake
60 Summary(pl.UTF-8):      Graficzny interfejs użytkownika Qt dla CMake
61 Group:          Development/Tools
62 Requires:       %{name} = %{version}-%{release}
63
64 %description gui
65 This package contains the Qt based GUI for CMake.
66
67 %description gui -l pl.UTF-8
68 Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla
69 CMake.
70
71 %package emacs
72 Summary:        Emacs mode for cmake files
73 Summary(pl.UTF-8):      Tryb Emacsa dla plików cmake'a
74 Group:          Development/Tools
75
76 %description emacs
77 Emacs mode for cmake files.
78
79 %description emacs -l pl.UTF-8
80 Tryb Emacsa dla plików cmake'a.
81
82 %package -n bash-completion-%{name}
83 Summary:        bash-completion for cmake
84 Summary(pl.UTF-8):      Bashowe dopełnianie parametrów dla cmake'a
85 Group:          Applications/Shells
86 Requires:       %{name} = %{version}-%{release}
87 Requires:       bash-completion >= 2.0
88 %if "%{_rpmversion}" >= "5"
89 BuildArch:      noarch
90 %endif
91
92 %description -n bash-completion-%{name}
93 bash-completion for cmake.
94
95 %description -n bash-completion-%{name} -l pl.UTF-8
96 Bashowe dopełnianie parametrów dla cmake'a.
97
98 %prep
99 %setup -q
100 %if "%{_lib}" == "lib64"
101 %patch0 -p1
102 %endif
103 %patch1 -p1
104 %patch2 -p1
105 %patch3 -p1
106 %patch4 -p1
107 %patch5 -p1
108 %patch6 -p1
109
110 cat > "init.cmake" <<EOF
111 SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE)
112 SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE)
113 SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE)
114 EOF
115
116 # cleanup backups after patching, modules are copied as-is
117 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
118
119 %build
120 export CC="%{__cc}"
121 export CXX="%{__cxx}"
122 export CFLAGS="%{rpmcflags}"
123 export CXXFLAGS="%{rpmcxxflags}"
124 export LDFLAGS="%{rpmldflags}"
125 ./bootstrap \
126         --prefix=%{_prefix} \
127         --mandir=/share/man \
128         --datadir=/share/cmake \
129         --init=init.cmake \
130         %{!?with_bootstrap:--system-libs} \
131         %{?with_gui:--qt-gui} \
132         --qt-qmake=/usr/bin/qmake-qt4 \
133         --verbose
134
135 %{__make} VERBOSE=1
136
137 %{?with_tests:%{__make} test}
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141 %{__make} install \
142         DESTDIR=$RPM_BUILD_ROOT
143
144 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %files
150 %defattr(644,root,root,755)
151 %doc ChangeLog.* Copyright.txt *.gif Docs/{cmake,ctest}.{txt,html}
152 %attr(755,root,root) %{_bindir}/ccmake
153 %attr(755,root,root) %{_bindir}/cmake
154 %attr(755,root,root) %{_bindir}/cpack
155 %attr(755,root,root) %{_bindir}/ctest
156 %{_mandir}/man1/ccmake.1*
157 %{_mandir}/man1/cmake.1*
158 %{_mandir}/man1/cmakecommands.1*
159 %{_mandir}/man1/cmakecompat.1*
160 %{_mandir}/man1/cmakemodules.1*
161 %{_mandir}/man1/cmakepolicies.1*
162 %{_mandir}/man1/cmakeprops.1*
163 %{_mandir}/man1/cmakevars.1*
164 %{_mandir}/man1/cpack.1*
165 %{_mandir}/man1/ctest.1*
166 # top cmake/Modules dirs belong to filesystem
167 %{_datadir}/cmake/Modules/.NoDartCoverage
168 %{_datadir}/cmake/Modules/*
169 %{_datadir}/cmake/Templates
170 %{_datadir}/cmake/editors
171 %{_datadir}/cmake/include
172 %{_aclocaldir}/cmake.m4
173
174 %if %{with gui}
175 %files gui
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_bindir}/cmake-gui
178 %{_datadir}/mime/packages/cmakecache.xml
179 %{_desktopdir}/CMake.desktop
180 %{_pixmapsdir}/CMakeSetup32.png
181 %{_mandir}/man1/cmake-gui.1*
182 %endif
183
184 %files emacs
185 %defattr(644,root,root,755)
186 %{_datadir}/emacs/site-lisp/cmake-mode.el
187
188 %files -n bash-completion-%{name}
189 %defattr(644,root,root,755)
190 %{_datadir}/bash-completion/completions/cmake
191 %{_datadir}/bash-completion/completions/cpack
192 %{_datadir}/bash-completion/completions/ctest
This page took 0.078378 seconds and 4 git commands to generate.