/[packages]/cauldron/cmake/current/SPECS/cmake.spec
ViewVC logotype

Contents of /cauldron/cmake/current/SPECS/cmake.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1379278 - (show annotations) (download)
Wed Mar 20 19:09:37 2019 UTC (5 years, 1 month ago) by shlomif
File size: 5855 byte(s)
- New version 3.14.0
1 %define shortVersion %(echo %{version} | cut -d. -f1,2)
2 %define majorVersion %(echo %{version} | cut -d. -f1)
3
4 %bcond_with bootstrap
5
6 %bcond_without qt
7 %bcond_with tests
8
9 #comment out if not prerel
10 #define prerel rc4
11
12 #release for bumping
13 %define rel 1
14
15 Name: cmake
16 Summary: Cross-platform, open-source make system
17 Epoch: 1
18 Version: 3.14.0
19 Release: %mkrel %{?prerel:0.%prerel.}%{rel}
20 License: BSD
21 Group: Development/Other
22 Url: https://www.cmake.org/
23 Source0: https://www.cmake.org/files/v%{shortVersion}/%{name}-%{version}%{?prerel:-%prerel}.tar.gz
24 Source1: cmake.macros
25 # See https://bugzilla.redhat.com/show_bug.cgi?id=1202899
26 Source3: cmake.attr
27 Source4: cmake.prov
28 #Patch3: 0003-Disable-Test198.patch
29 %if %{without bootstrap}
30 BuildRequires: bzip2-devel
31 BuildRequires: pkgconfig(Coin)
32 BuildRequires: pkgconfig(expat)
33 BuildRequires: gcc-gfortran
34 BuildRequires: pkgconfig(libidn)
35 BuildRequires: pkgconfig(jsoncpp)
36 BuildRequires: pkgconfig(libarchive)
37 BuildRequires: pkgconfig(libcurl)
38 BuildRequires: pkgconfig(libuv)
39 BuildRequires: pkgconfig(ncurses)
40 BuildRequires: perl
41 BuildRequires: xz
42 BuildRequires: pkgconfig(zlib)
43 BuildRequires: rhash-devel
44
45 %if %{with qt}
46 BuildRequires: pkgconfig(Qt5Widgets)
47 %endif
48
49 %if %{with tests}
50 # Needed for test suite.
51 BuildRequires: cxxtest
52 %endif
53 %endif
54
55 Requires: rpm-mageia-setup
56 Requires: %{name}-rpm-macros
57 Conflicts: %{name}-rpm-macros < 1:3.5.2-4
58
59 Provides: %{name}%{majorVersion} = %{version}-%{release}
60
61 %description
62 CMake is used to control the software compilation process using
63 simple platform and compiler independent configuration files.
64 CMake generates native makefiles and workspaces that can be
65 used in the compiler environment of your choice. CMake is quite
66 sophisticated: it is possible to support complex environments
67 requiring system configuration, pre-processor generation, code
68 generation, and template instantiation.
69
70 %files
71 %_bindir/cmake
72 %_bindir/ccmake
73 %_bindir/ctest
74 %_bindir/cpack
75 %_datadir/%{name}
76 %_datadir/aclocal/cmake.m4
77 %_datadir/bash-completion/completions/*
78 %_sysconfdir/emacs/site-start.d/%{name}.el
79 %_datadir/vim/*/*
80 %_datadir/emacs/site-lisp/cmake-mode.el
81 %dir %_libdir/%name
82
83 #-----------------------------------------------------------------------------
84
85 %package -n %{name}-rpm-macros
86 Summary: Rpms macros for cmake
87 Group: Development/Other
88 Conflicts: %{name} < 1:3.5.2-3
89
90 %description -n %{name}-rpm-macros
91 Rpms macros for cmake. This package provide rpm autoprovide script.
92
93 %files -n %{name}-rpm-macros
94 %_sysconfdir/rpm/macros.d/*
95 %{_prefix}/lib/rpm/fileattrs/cmake.attr
96 %{_prefix}/lib/rpm/cmake.prov
97
98 #-----------------------------------------------------------------------------
99
100 %if %{without bootstrap}
101 %if %{with qt}
102 %package -n %{name}-qtgui
103 Summary: Qt GUI Dialog for CMake - the Cross-platform, open-source make system
104 Group: Development/Other
105 Requires: %name
106
107 %description -n %{name}-qtgui
108 CMake is used to control the software compilation process using
109 simple platform and compiler independent configuration files.
110
111 This is the Qt GUI.
112
113 %files -n %{name}-qtgui
114 %_bindir/cmake-gui
115 %_datadir/applications/cmake-gui.desktop
116 %_datadir/mime/packages/cmakecache.xml
117 %_iconsdir/*/*/*/*.png
118 %endif
119 %endif
120 #-----------------------------------------------------------------------------
121
122 %prep
123 %setup -q -n %{name}-%{version}%{?prerel:-%prerel}
124 %autopatch -p1
125
126 # Don't try to automagically find files in /usr/X11R6
127 # But also don't change a prefix if it is not /usr
128 perl -pi -e 's@^\s+/usr/X11R6/.*\n@@' Modules/*.cmake
129
130 %ifarch %arm
131 # bootstrap test is taking ages on arm
132 sed -i -e 's!SET(CMAKE_LONG_TEST_TIMEOUT 1500)!SET(CMAKE_LONG_TEST_TIMEOUT 7200)!g' Tests/CMakeLists.txt
133 %endif
134
135 %build
136 mkdir -p build
137 cd build
138 %setup_compile_flags
139 ../configure \
140 %if %{with bootstrap}
141 --no-system-libs \
142 %else
143 --system-libs \
144 %endif
145 --parallel="%_smp_mflags" \
146 --prefix=%{_prefix} \
147 --datadir=/share/%{name} \
148 --mandir=/share/man \
149 --docdir=/share/doc/%{name} \
150 %if %{without bootstrap}
151 %if %{with qt}
152 --qt-gui
153 %endif
154 %endif
155
156 %make_build
157
158 %install
159 %make_install -C build
160
161 # cmake mode for emacs
162 install -m644 Auxiliary/cmake-mode.el -D %buildroot%_datadir/emacs/site-lisp/cmake-mode.el
163 install -d %buildroot%_sysconfdir/emacs/site-start.d
164 cat <<EOF >%buildroot%_sysconfdir/emacs/site-start.d/%{name}.el
165 (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path))
166 (require 'cmake-mode)
167 (setq auto-mode-alist
168 (append '(("CMakeLists\\\\.txt\\\\'" . cmake-mode)
169 ("\\\\.cmake\\\\'" . cmake-mode))
170 auto-mode-alist))
171 EOF
172
173 # Create/Own this dir as this is used in cmake dependant rpms but not own by any
174 mkdir -p %buildroot%_libdir/%name
175
176 # RPM macros
177 install -D -p -m644 %{_sourcedir}/cmake.macros %buildroot%_sysconfdir/rpm/macros.d/cmake.macros
178
179 # RPM auto provides
180 install -D -p -m644 %{_sourcedir}/cmake.attr %{buildroot}%{_prefix}/lib/rpm/fileattrs/cmake.attr
181 install -D -p -m755 %{_sourcedir}/cmake.prov %{buildroot}%{_prefix}/lib/rpm/cmake.prov
182
183 # cmake mode for vim
184 install -D -p -m644 Auxiliary/vim/syntax/cmake.vim %buildroot%_datadir/vim/syntax/cmake.vim
185 install -D -p -m644 Auxiliary/vim/indent/cmake.vim %buildroot%_datadir/vim/indent/cmake.vim
186
187 # bash-completion
188 install -D -p -m644 Auxiliary/bash-completion/cmake %buildroot%_datadir/bash-completion/completions/cmake
189 install -D -p -m644 Auxiliary/bash-completion/cpack %buildroot%_datadir/bash-completion/completions/cpack
190 install -D -p -m644 Auxiliary/bash-completion/ctest %buildroot%_datadir/bash-completion/completions/ctest
191
192 # There are some stray Copyright.txt files there sometimes.
193 rm -fr %buildroot/usr/share/doc/cmake
194
195 %if %{with tests}
196 %check
197 unset DISPLAY
198 cd build
199 bin/ctest -V -E ModuleNotices -E 'CMake.(HTML|FileDownload)' -E CTestTestUpload %{?_smp_mflags}
200 %endif

  ViewVC Help
Powered by ViewVC 1.1.30