Changeset 1695 for spec/trunk/SPECS/cmake.spec
- Timestamp:
- Apr 7, 2020, 8:01:09 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/cmake.spec
r936 r1695 1 #define svn_url e:/trees/cmake/trunk 2 %define svn_url http://svn.netlabs.org/repos/ports/cmake/trunk 3 %define svn_rev 1949 4 1 # Do we add appdata-files? (disabled) 2 # consider conditional on whether %%_metainfodir is defined or not instead -- rex 3 %bcond_with appdata 4 5 # Set to bcond_without or use --with bootstrap if bootstrapping a new release 6 # or architecture 7 %bcond_without bootstrap 8 9 # Build with Emacs support (disabled) 10 %bcond_with emacs 11 12 # Run git tests (disabled) 13 %bcond_with git_test 5 14 6 15 # Set to bcond_with or use --without gui to disable qt4 gui build 7 16 %bcond_without gui 8 17 9 # Set to bcond_without or use --with desktop to enable desktopn stuff 10 %bcond_with desktop 18 # Use ncurses for colorful output 19 %bcond_without ncurses 20 21 # Setting the Python-version used by default 22 %bcond_with python3 23 24 # Enable RPM dependency generators for cmake files written in Python 25 %bcond_without rpm 26 27 # enable this when we have Sphinx-build (disabled) 28 %bcond_with sphinx 29 30 # Run tests (disabled) 31 %bcond_with test 32 33 # Enable X11 tests (disabled) 34 %bcond_with X11_test 11 35 12 36 # Place rpm-macros into proper location … … 16 40 %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} 17 41 18 # enable this when we have Sphinx-build19 %bcond_with sphinx20 21 42 %global major_version 3 22 %global minor_version 7 43 %global minor_version 10 44 # Set to RC version if building RC, else %%{nil} 45 #global rcsuf rc3 46 %{?rcsuf:%global relsuf .%{rcsuf}} 47 %{?rcsuf:%global versuf -%{rcsuf}} 48 49 # Uncomment if building for EPEL 50 #global name_suffix %%{major_version} 23 51 %global orig_name cmake 24 52 25 53 26 54 Name: %{orig_name}%{?name_suffix} 27 Version: %{major_version}.%{minor_version}. 028 Release: 2%{?dist}55 Version: %{major_version}.%{minor_version}.3 56 Release: 1%{?dist} 29 57 Summary: Cross-platform make system 30 58 … … 37 65 URL: http://www.cmake.org 38 66 Vendor: bww bitwise works GmbH 39 Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip 67 %scm_source github http://github.com/bitwiseworks/cmake-os2 master 40 68 Source2: macros.%{name} 41 42 69 # See https://bugzilla.redhat.com/show_bug.cgi?id=1202899 70 Source3: %{name}.attr 71 Source4: %{name}.prov 72 Source5: %{name}.req 73 74 BuildRequires: coreutils 75 BuildRequires: findutils 76 BuildRequires: gcc 43 77 #BuildRequires: gcc-gfortran 44 #BuildRequires: ncurses-devel, libX11-devel 78 BuildRequires: sed 79 BuildRequires: git 80 %if %{with X11_test} 81 BuildRequires: libX11-devel 82 %endif 83 %if %{with ncurses} 84 BuildRequires: ncurses-devel 85 %endif 86 %if %{with sphinx} 87 BuildRequires: %{_bindir}/sphinx-build 88 %endif 89 %if %{without bootstrap} 45 90 BuildRequires: bzip2-devel 46 91 BuildRequires: curl-devel … … 49 94 #BuildRequires: libarchive-devel 50 95 #BuildRequires: libuv-devel 51 %if 0%{?with_sphinx:1} 52 BuildRequires: /@unixroot/usr/bin/sphinx-build 53 %endif 96 #BuildRequires: rhash-devel 54 97 BuildRequires: xz-devel 55 98 BuildRequires: zlib-devel 56 #BuildRequires: emacs 99 %endif 100 %if %{with emacs} 101 BuildRequires: emacs 102 %endif 103 %if %{with rpm} 104 %if %{with python3} 105 %{!?python3_pkgversion: %global python3_pkgversion 3} 106 BuildRequires: python%{python3_pkgversion}-devel 107 %else 57 108 BuildRequires: python2-devel 109 %endif 110 %endif 58 111 %if %{with gui} 59 BuildRequires: libqt4-devel 60 #BuildRequires: desktop-file-utils 61 %global qt_gui --qt-gui 112 BuildRequires: pkgconfig(Qt5Widgets) 113 %if %{with appdata} 114 BuildRequires: desktop-file-utils 115 %endif 116 %endif 117 118 %if %{without bootstrap} 119 # Ensure we have our own rpm-macros in place during build. 120 BuildRequires: %{name}-rpm-macros 62 121 %endif 63 122 64 123 Requires: %{name}-data = %{version}-%{release} 65 Requires: rpm 124 Requires: %{name}-rpm-macros = %{version}-%{release} 125 Requires: %{name}-filesystem = %{version}-%{release} 66 126 67 127 # Provide the major version name … … 81 141 Summary: Common data-files for %{name} 82 142 Requires: %{name} = %{version}-%{release} 143 Requires: %{name}-filesystem = %{version}-%{release} 144 Requires: %{name}-rpm-macros = %{version}-%{release} 145 %if %{with emacs} 146 Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}} 147 %endif 148 83 149 BuildArch: noarch 84 150 … … 95 161 96 162 163 %package filesystem 164 Summary: Directories used by CMake modules 165 166 %description filesystem 167 This package owns all directories used by CMake modules. 168 169 170 %if %{with gui} 97 171 %package gui 98 172 Summary: Qt GUI for %{name} 99 173 100 174 Requires: %{name} = %{version}-%{release} 101 #Requires: hicolor-icon-theme 102 #Requires: shared-mime-info 175 %if %{with appdata} 176 Requires: hicolor-icon-theme 177 Requires: shared-mime-info 178 %endif 103 179 104 180 %description gui 105 181 The %{name}-gui package contains the Qt based GUI for %{name}. 182 %endif 183 184 185 %package rpm-macros 186 Summary: Common RPM macros for %{name} 187 Requires: rpm 188 # when subpkg introduced 189 Conflicts: cmake-data < 3.10.1-2 190 191 BuildArch: noarch 192 193 %description rpm-macros 194 This package contains common RPM macros for %{name}. 106 195 107 196 … … 110 199 111 200 %prep 112 %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} 113 %setup -q 201 %scm_setup 202 203 %if %{with rpm} 204 %if %{with python3} 205 echo '#!%{__python3}' > %{name}.prov 206 echo '#!%{__python3}' > %{name}.req 114 207 %else 115 %setup -n "%{name}-%{version}" -Tc 116 svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force 117 rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" 118 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") 208 echo '#!%{__python2}' > %{name}.prov 209 echo '#!%{__python2}' > %{name}.req 210 %endif 211 tail -n +2 %{SOURCE4} >> %{name}.prov 212 tail -n +2 %{SOURCE5} >> %{name}.req 119 213 %endif 120 214 … … 128 222 cd build 129 223 # --%{?with_bootstrap:no-}system-libs \ 224 # --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \ 130 225 ../bootstrap --prefix=%{_prefix} --datadir=/share/%{name} \ 131 226 --docdir=/share/doc/%{name} --mandir=/share/man \ 132 227 --verbose --system-bzip2 --system-curl --system-expat \ 133 228 --system-liblzma --system-zlib \ 134 %{?with_sphinx:--sphinx-man --sphinx-html} \ 135 %{?qt_gui} -- \ 136 -DCMAKE_USE_OPENSSL:BOOL=ON 137 138 make 229 %if %{with sphinx} 230 --sphinx-man --sphinx-html} \ 231 %else 232 --sphinx-build=%{_bindir}/false \ 233 %endif 234 --%{!?with_gui:no-}qt-gui \ 235 -- -DCMAKE_USE_OPENSSL:BOOL=ON \ 236 ; 237 make VERBOSE=1 139 238 140 239 141 240 %install 142 cd build 143 make install DESTDIR=%{buildroot} 241 rm -rf %{buildroot} 242 mkdir -p %{buildroot}%{_pkgdocdir} 243 %make_install -C build CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir} 144 244 find %{buildroot}/%{_datadir}/%{name}/Modules -type f | xargs chmod -x 145 245 [ -n "$(find %{buildroot}/%{_datadir}/%{name}/Modules -name \*.orig)" ] && 146 246 echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" && 147 247 exit 1 148 cd .. 149 248 # Install major_version name links 249 %{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s ${f}.exe %{buildroot}%{_bindir}/${f}%{major_version}; done} 250 # Install bash completion symlinks 251 #mkdir -p %{buildroot}%{_datadir}/bash-completion/completions 252 #for f in %{buildroot}%{_datadir}/%{name}/completions/* 253 #do 254 # ln -s ../../%{name}/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions 255 #done 256 %if %{with emacs} 257 # Install emacs cmake mode 258 mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name} 259 install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el 260 %{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el 261 mkdir -p %{buildroot}%{_emacs_sitestartdir} 262 install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir} 263 %endif 150 264 # RPM macros 151 265 install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name} 152 266 sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|%{major_version}|" %{buildroot}%{rpm_macros_dir}/macros.%{name} 153 267 touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name} 154 155 mkdir -p %{buildroot}%{_libdir}/%{name} 268 %if %{with rpm} && 0%{?_rpmconfigdir:1} 269 # RPM auto provides 270 install -p -m0644 -D %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/fileattrs/%{name}.attr 271 install -p -m0755 -D %{name}.prov %{buildroot}%{_prefix}/lib/rpm/%{name}.prov 272 install -p -m0755 -D %{name}.req %{buildroot}%{_prefix}/lib/rpm/%{name}.req 273 %endif 274 mkdir -p %{buildroot}%{_libdir}/%{orig_name} 156 275 # Install copyright files for main package 157 276 find Source Utilities -type f -iname copy\* | while read f … … 162 281 cp -p $f ./${fname}_${dname} 163 282 done 164 165 283 # Cleanup pre-installed documentation 166 %if 0%{?with_sphinx:1}284 %if %{with sphinx} 167 285 mv %{buildroot}%{_docdir}/%{name}/html . 168 286 %endif … … 172 290 cp -pr %{buildroot}%{_datadir}/%{name}/Help %{buildroot}%{_pkgdocdir} 173 291 mv %{buildroot}%{_pkgdocdir}/Help %{buildroot}%{_pkgdocdir}/rst 174 %if 0%{?with_sphinx:1}292 %if %{with sphinx} 175 293 mv html %{buildroot}%{_pkgdocdir} 176 294 %endif 177 295 178 %if %{with desktop}296 %if %{with gui} 179 297 # Desktop file 298 %if %{with appdata} 180 299 desktop-file-install --delete-original \ 181 300 --dir=%{buildroot}%{_datadir}/applications \ 182 %{buildroot}/%{_datadir}/applications/CMake%{?name_suffix}.desktop 183 %endif 184 185 301 %{buildroot}%{_datadir}/applications/%{name}-gui.desktop 302 303 # Register as an application to be visible in the software center 304 # 305 # NOTE: It would be *awesome* if this file was maintained by the upstream 306 # project, translated and installed into the right place during `make install`. 307 # 308 # See http://www.freedesktop.org/software/appstream/docs/ for more details. 309 # 310 mkdir -p %{buildroot}%{_metainfodir} 311 cat > %{buildroot}%{_metainfodir}/cmake-gui.appdata.xml <<EOF 312 <?xml version="1.0" encoding="UTF-8"?> 313 <!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> --> 314 <!-- 315 EmailAddress: kitware@kitware.com 316 SentUpstream: 2014-09-17 317 --> 318 <application> 319 <id type="desktop">cmake-gui.desktop</id> 320 <metadata_license>CC0-1.0</metadata_license> 321 <name>CMake GUI</name> 322 <summary>Create new CMake projects</summary> 323 <description> 324 <p> 325 CMake is an open source, cross platform build system that can build, test, 326 and package software. CMake GUI is a graphical user interface that can 327 create and edit CMake projects. 328 </p> 329 </description> 330 <url type="homepage">http://www.cmake.org</url> 331 <screenshots> 332 <screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png</screenshot> 333 </screenshots> 334 <!-- FIXME: change this to an upstream email address for spec updates 335 <updatecontact>someone_who_cares@upstream_project.org</updatecontact> 336 --> 337 </application> 338 EOF 339 %endif 340 %endif 341 342 # create manifests for splitting files and directories for filesystem-package 343 find %{buildroot}%{_datadir}/%{name} -type d | \ 344 sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > data_dirs.mf 345 find %{buildroot}%{_datadir}/%{name} -type f | \ 346 sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > data_files.mf 347 find %{buildroot}%{_libdir}/%{orig_name} -type d | \ 348 sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > lib_dirs.mf 349 find %{buildroot}%{_libdir}/%{orig_name} -type f | \ 350 sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > lib_files.mf 351 find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \ 352 sed -e '/.*-gui.exe$/d' -e '/^$/d' -e 's!^%{buildroot}!"!g' -e 's!$!"!g' >> lib_files.mf 353 354 355 %if %{with test} 186 356 %check 187 #cd build 188 #CMake.FileDownload, and CTestTestUpload require internet access 189 #bin/ctest%{?name_suffix} -V -E 'CMake.FileDownload|CTestTestUpload' %{?_smp_mflags} 190 #cd .. 191 192 193 %if %{with desktop} 194 %post gui 195 update-desktop-database &> /dev/null || : 196 /bin/touch --no-create %{_datadir}/mime || : 197 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : 198 199 %postun gui 200 update-desktop-database &> /dev/null || : 201 if [ $1 -eq 0 ] ; then 202 /bin/touch --no-create %{_datadir}/mime || : 203 update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : 204 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : 205 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : 206 fi 207 208 %posttrans gui 209 update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : 210 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : 211 %endif 212 213 214 %files 357 cd build 358 #CMake.FileDownload, CTestTestUpload, and curl require internet access 359 # RunCMake.CPack_RPM is broken if disttag contains "+", bug #1499151 360 NO_TEST="CMake.FileDownload|CTestTestUpload|curl|RunCMake.CPack_RPM" 361 NO_TEST="$NO_TEST|CPackComponentsForAll-RPM-IgnoreGroup" 362 # RunCMake.File_Generate fails on S390X 363 %ifarch s390x 364 NO_TEST="$NO_TEST|RunCMake.File_Generate" 365 %endif 366 export NO_TEST 367 bin/ctest%{?name_suffix} -V -E "$NO_TEST" %{?_smp_mflags} 368 cd .. 369 %endif 370 371 372 %files -f lib_files.mf 215 373 %doc %dir %{_pkgdocdir} 216 374 %license Copyright.txt* 217 375 %license COPYING* 218 #%{_bindir}/c%{name}.exe 219 %{_bindir}/%{name}.exe 220 %{_bindir}/cpack.exe 221 %{_bindir}/ctest.exe 222 %if 0%{?with_sphinx:1} 223 #%{_mandir}/man1/c%{name}.1.* 376 %if %{with sphinx} 377 %{_mandir}/man1/c%{name}.1.* 224 378 %{_mandir}/man1/%{name}.1.* 225 %{_mandir}/man1/cpack .1.*226 %{_mandir}/man1/ctest .1.*379 %{_mandir}/man1/cpack%{?name_suffix}.1.* 380 %{_mandir}/man1/ctest%{?name_suffix}.1.* 227 381 %{_mandir}/man7/*.7.* 228 382 %endif 229 %{_libdir}/%{name}/ 230 231 232 %files data 383 384 385 %files data -f data_files.mf 233 386 %{_datadir}/aclocal/%{name}.m4 234 %{_datadir}/%{name}/ 235 %{rpm_macros_dir}/macros.%{name} 387 #%{_datadir}/bash-completion 388 %if %{with emacs} 389 %{_emacs_sitelispdir} 390 %{_emacs_sitestartdir} 391 %endif 236 392 237 393 … … 239 395 # Pickup license-files from main-pkg's license-dir 240 396 # If there's no license-dir they are picked up by %%doc previously 241 %{?_licensedir:%license %{_datadir}/licenses/%{name}*} 242 %doc %{_pkgdocdir}/ 397 #%{?_licensedir:%license %{_datadir}/licenses/%{name}*} 398 %doc %{_pkgdocdir} 399 400 401 %files filesystem -f data_dirs.mf -f lib_dirs.mf 243 402 244 403 … … 246 405 %files gui 247 406 %{_bindir}/%{name}-gui.exe 248 %if %{with desktop} 407 %if %{with appdata} 408 %{_metainfodir}/*.appdata.xml 249 409 %{_datadir}/applications/CMake%{?name_suffix}.desktop 250 410 %{_datadir}/mime/packages/ 251 411 %{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png 252 412 %endif 253 %if 0%{?with_sphinx:1}413 %if %{with sphinx} 254 414 %{_mandir}/man1/%{name}-gui.1.* 255 415 %endif … … 257 417 258 418 419 %files rpm-macros 420 %{rpm_macros_dir}/macros.%{name} 421 %if %{with rpm} && 0%{?_rpmconfigdir:1} 422 %{_rpmconfigdir}/fileattrs/%{name}.attr 423 %{_rpmconfigdir}/%{name}.prov 424 %{_rpmconfigdir}/%{name}.req 425 %endif 426 427 259 428 %changelog 429 * Mon Sep 16 2019 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.10.3-1 430 - update to vendor version 3.10.3 431 260 432 * Wed Jan 25 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.7.0-2 261 433 - adjust def file creation
Note:
See TracChangeset
for help on using the changeset viewer.