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