summaryrefslogtreecommitdiff
path: root/packaging/cmake.spec
blob: b3613a9761df06e49847fc0b24dbb6bb1b31c2c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Name:           cmake
Version:        2.8.11.2
Release:        1
License:        BSD-3-Clause
Summary:        Cross-platform make system
Url:            http://www.cmake.org
Group:          Platfrom Development/Tools
Source0:        http://www.cmake.org/files/v2.8/cmake-%{version}.tar.gz
Source1:        macros.cmake
Source2:        TizenCommon.cmake
Source1001: 	cmake.manifest
BuildRequires:  fdupes
BuildRequires:  expat-devel
BuildRequires:  pkgconfig(libarchive) >= 2.8.0
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  procps
BuildRequires:  ncurses-devel
BuildRequires:  gcc-c++

%description
CMake is used to control the software compilation process using simple platform
and compiler independent configuration files. CMake generates native makefiles
and workspaces that can be used in the compiler environment of your choice.
CMake is quite sophisticated: it is possible to support complex environments
requiring system configuration, pre-processor generation, code generation, and
template instantiation.


%prep
%setup -q -n cmake-%{version}
cp %{SOURCE1001} .

%build
export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$CXXFLAGS"
./configure \
    --prefix=%{_prefix} \
    --datadir=/share/%{name} \
    --docdir=/share/doc/packages/%{name} \
    --mandir=/share/man \
    --system-libs \
    --parallel=0%jobs \
    --no-qt-gui
make VERBOSE=1 %{?_smp_mflags}

%install
%make_install 
mkdir -p %{buildroot}%{_libdir}/cmake
find %{buildroot}/usr/share/cmake -type f -print0 | xargs -0 chmod 644
cp %{SOURCE2} %{buildroot}/%{_datadir}/%{name}/Modules

# Install cmake rpm macros
install -D -p -m 0644 %{S:1} \
  %{buildroot}%{_sysconfdir}/rpm/macros.cmake

fdupes %buildroot/usr/share/cmake

%docs_package

%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/rpm/macros.cmake
%doc %{_datadir}/doc/packages/%{name}
%{_datadir}/aclocal/cmake.m4
%{_bindir}/ccmake
%{_bindir}/cmake
%{_bindir}/cpack
%{_bindir}/ctest
%{_datadir}/%{name}