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