c8e46813a0f7173f1eba8d8dc5e3439911a5e2d8
[platform/upstream/cmake.git] / packaging / cmake.spec
1 Name:           cmake
2 Version:        3.25.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:        %{name}-%{version}.tar.gz
9 Source1:        macros.cmake
10 Source2:        TizenCommon.cmake
11 Source1001:     cmake.manifest
12
13 BuildRequires:  fdupes
14 BuildRequires:  pkgconfig(ncurses)
15 BuildRequires:  pkgconfig(expat)
16 BuildRequires:  pkgconfig(zlib)
17 BuildRequires:  pkgconfig(bzip2)
18 BuildRequires:  pkgconfig(liblzma)
19 BuildRequires:  pkgconfig(libzstd)
20 BuildRequires:  pkgconfig(libarchive)
21 BuildRequires:  pkgconfig(openssl1.1)
22
23 %description
24 CMake is used to control the software compilation process using simple platform
25 and compiler independent configuration files. CMake generates native makefiles
26 and workspaces that can be used in the compiler environment of your choice.
27 CMake is quite sophisticated: it is possible to support complex environments
28 requiring system configuration, pre-processor generation, code generation, and
29 template instantiation.
30
31
32 %prep
33 %setup -q -n cmake-%{version}
34 cp %{SOURCE1001} .
35
36 %build
37 export CXXFLAGS="$RPM_OPT_FLAGS -fPIC -pie"
38 export CFLAGS="$CXXFLAGS"
39 ./configure \
40     --prefix=%{_prefix} \
41     --datadir=/share/%{name} \
42     --docdir=/share/doc/packages/%{name} \
43     --mandir=/share/man \
44     --system-libs \
45     --parallel=0%jobs \
46     --no-qt-gui \
47     --no-system-curl \
48     --no-system-librhash \
49     --no-system-nghttp2 \
50     --no-system-jsoncpp \
51     --no-system-libuv
52 %__make VERBOSE=1 %{?_smp_mflags}
53
54 %install
55 %make_install
56 mkdir -p %{buildroot}%{_libdir}/%{name}
57 find %{buildroot}%{_datadir}/%{name} -type f -print0 | xargs -0 chmod 644
58 cp %{SOURCE2} %{buildroot}%{_datadir}/%{name}/Modules
59
60 # Install cmake rpm macros
61 install -D -p -m 0644 %{S:1} \
62   %{buildroot}%{_sysconfdir}/rpm/macros.cmake
63
64 fdupes %{buildroot}%{_datadir}/%{name}
65
66 rm -rf %{buildroot}%{_datadir}/bash-completion
67 rm -rf %{buildroot}%{_datadir}/emacs
68 rm -rf %{buildroot}%{_datadir}/vim
69 %docs_package
70
71 %files
72 %manifest %{name}.manifest
73 %defattr(-,root,root,-)
74 %config(noreplace) %{_sysconfdir}/rpm/macros.cmake
75 %doc %{_datadir}/doc/packages/%{name}
76 %{_datadir}/aclocal/cmake.m4
77 %{_bindir}/cmake
78 %{_bindir}/ccmake
79 %{_bindir}/cpack
80 %{_bindir}/ctest
81 %{_datadir}/%{name}