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