]> git.pld-linux.org Git - packages/cmake.git/blob - cmake.spec
- added fix for ruby 2.x b/c of moved RUBY_CONFIG_INCLUDE_DIR
[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:        1
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 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 %{!?with_bootstrap:BuildRequires:       xmlrpc-c-devel >= 1.4.12-2}
36 Requires:       filesystem >= 3.0-52
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 CMake is used to control the software compilation process using simple
41 platform and compiler independent configuration files. CMake generates
42 native makefiles and workspaces that can be used in the compiler
43 environment of your choice. CMake is quite sophisticated: it is
44 possible to support complex environments requiring system
45 configuration, pre-processor generation, code generation, and template
46 instantiation.
47
48 %description -l pl.UTF-8
49 CMake służy do sterowania procesem kompilacji oprogramowania przy
50 użyciu prostych plików konfiguracyjnych niezależnych od platformy i
51 kompilatora. CMake generuje natywne pliki makefile i workspace,
52 których można używać w wybranym środowisku kompilatora. CMake jest
53 dość wyrafinowany: może obsłużyć złożone środowiska wymagające
54 konfiguracji systemu, generowanie preprocesora, generowanie kodu i
55 dziedziczenie szablonów.
56
57 %package gui
58 Summary:        Qt GUI for CMake
59 Summary(pl.UTF-8):      Graficzny interfejs użytkownika Qt dla CMake
60 Group:          Development/Tools
61 Requires:       %{name} = %{version}-%{release}
62
63 %description gui
64 This package contains the Qt based GUI for CMake.
65
66 %description gui -l pl.UTF-8
67 Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla
68 CMake.
69
70 %package emacs
71 Summary:        Emacs mode for cmake files
72 Summary(pl.UTF-8):      Tryb Emacsa dla plików cmake'a
73 Group:          Development/Tools
74
75 %description emacs
76 Emacs mode for cmake files.
77
78 %description emacs -l pl.UTF-8
79 Tryb Emacsa dla plików cmake'a.
80
81 %package -n bash-completion-%{name}
82 Summary:        bash-completion for cmake
83 Summary(pl.UTF-8):      Bashowe dopełnianie parametrów dla cmake'a
84 Group:          Applications/Shells
85 Requires:       %{name} = %{version}-%{release}
86 Requires:       bash-completion >= 2.0
87 %if "%{_rpmversion}" >= "5"
88 BuildArch:      noarch
89 %endif
90
91 %description -n bash-completion-%{name}
92 bash-completion for cmake.
93
94 %description -n bash-completion-%{name} -l pl.UTF-8
95 Bashowe dopełnianie parametrów dla cmake'a.
96
97 %prep
98 %setup -q
99 %if "%{_lib}" == "lib64"
100 %patch0 -p1
101 %endif
102 %patch1 -p1
103 %patch2 -p1
104 %patch3 -p1
105 %patch4 -p1
106 %patch5 -p1
107
108 cat > "init.cmake" <<EOF
109 SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE)
110 SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE)
111 SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE)
112 EOF
113
114 %build
115 export CC="%{__cc}"
116 export CXX="%{__cxx}"
117 export CFLAGS="%{rpmcflags}"
118 export CXXFLAGS="%{rpmcxxflags}"
119 export LDFLAGS="%{rpmldflags}"
120 ./bootstrap \
121         --prefix=%{_prefix} \
122         --mandir=/share/man \
123         --datadir=/share/cmake \
124         --init=init.cmake \
125         %{!?with_bootstrap:--system-libs} \
126         %{?with_gui:--qt-gui} \
127         --qt-qmake=/usr/bin/qmake-qt4 \
128         --verbose
129
130 %{__make} VERBOSE=1
131
132 %{?with_tests:%{__make} test}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 %{__make} install \
137         DESTDIR=$RPM_BUILD_ROOT
138
139 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %files
145 %defattr(644,root,root,755)
146 %doc ChangeLog.* Copyright.txt *.gif Docs/{cmake,ctest}.{txt,html}
147 %attr(755,root,root) %{_bindir}/ccmake
148 %attr(755,root,root) %{_bindir}/cmake
149 %attr(755,root,root) %{_bindir}/cpack
150 %attr(755,root,root) %{_bindir}/ctest
151 %{_mandir}/man1/ccmake.1*
152 %{_mandir}/man1/cmake.1*
153 %{_mandir}/man1/cmakecommands.1*
154 %{_mandir}/man1/cmakecompat.1*
155 %{_mandir}/man1/cmakemodules.1*
156 %{_mandir}/man1/cmakepolicies.1*
157 %{_mandir}/man1/cmakeprops.1*
158 %{_mandir}/man1/cmakevars.1*
159 %{_mandir}/man1/cpack.1*
160 %{_mandir}/man1/ctest.1*
161 # top cmake/Modules dirs belong to filesystem
162 %{_datadir}/cmake/Modules/.NoDartCoverage
163 %{_datadir}/cmake/Modules/*
164 %{_datadir}/cmake/Templates
165 %{_datadir}/cmake/editors
166 %{_datadir}/cmake/include
167 %{_aclocaldir}/cmake.m4
168
169 %if %{with gui}
170 %files gui
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_bindir}/cmake-gui
173 %{_datadir}/mime/packages/cmakecache.xml
174 %{_desktopdir}/CMake.desktop
175 %{_pixmapsdir}/CMakeSetup32.png
176 %{_mandir}/man1/cmake-gui.1*
177 %endif
178
179 %files emacs
180 %defattr(644,root,root,755)
181 %{_datadir}/emacs/site-lisp/cmake-mode.el
182
183 %files -n bash-completion-%{name}
184 %defattr(644,root,root,755)
185 %{_datadir}/bash-completion/completions/cmake
186 %{_datadir}/bash-completion/completions/cpack
187 %{_datadir}/bash-completion/completions/ctest
This page took 0.044047 seconds and 3 git commands to generate.