21acd779118d2698df8ec973029af7af26918013
[platform/upstream/cmake.git] / packaging / cmake.spec
1 Name:           cmake
2 Version:        2.8.12.2
3 Release:        0
4 License:        BSD-3-Clause
5 Summary:        Cross-platform make system
6 Url:            http://www.cmake.org
7 Group:          Platfrom Development/Tools
8 Source0:        http://www.cmake.org/files/v2.8/cmake-%{version}.tar.gz
9 Source1:        macros.cmake
10 Source2:        TizenCommon.cmake
11 Source1001:     cmake.manifest
12 BuildRequires:  fdupes
13 BuildRequires:  expat-devel
14 BuildRequires:  pkgconfig(libarchive) >= 2.8.0
15 BuildRequires:  pkgconfig(libcurl)
16 BuildRequires:  pkgconfig(zlib)
17 BuildRequires:  procps
18 BuildRequires:  ncurses-devel
19 BuildRequires:  gcc-c++
20
21 %description
22 CMake is used to control the software compilation process using simple platform
23 and compiler independent configuration files. CMake generates native makefiles
24 and workspaces that can be used in the compiler environment of your choice.
25 CMake is quite sophisticated: it is possible to support complex environments
26 requiring system configuration, pre-processor generation, code generation, and
27 template instantiation.
28
29
30 %prep
31 %setup -q -n cmake-%{version}
32 cp %{SOURCE1001} .
33
34 %build
35 export CXXFLAGS="$RPM_OPT_FLAGS"
36 export CFLAGS="$CXXFLAGS"
37 ./configure \
38     --prefix=%{_prefix} \
39     --datadir=/share/%{name} \
40     --docdir=/share/doc/packages/%{name} \
41     --mandir=/share/man \
42     --system-libs \
43     --parallel=0%jobs \
44     --no-qt-gui
45 %__make VERBOSE=1 %{?_smp_mflags}
46
47 %install
48 %make_install 
49 mkdir -p %{buildroot}%{_libdir}/%{name}
50 find %{buildroot}%{_datadir}/%{name} -type f -print0 | xargs -0 chmod 644
51 cp %{SOURCE2} %{buildroot}%{_datadir}/%{name}/Modules
52
53 # Install cmake rpm macros
54 install -D -p -m 0644 %{S:1} \
55   %{buildroot}%{_sysconfdir}/rpm/macros.cmake
56
57 fdupes %{buildroot}%{_datadir}/%{name}
58
59 %docs_package
60
61 %files
62 %manifest %{name}.manifest
63 %defattr(-,root,root,-)
64 %config(noreplace) %{_sysconfdir}/rpm/macros.cmake
65 %doc %{_datadir}/doc/packages/%{name}
66 %{_datadir}/aclocal/cmake.m4
67 %{_bindir}/ccmake
68 %{_bindir}/cmake
69 %{_bindir}/cpack
70 %{_bindir}/ctest
71 %{_datadir}/%{name}