cmake.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ##
  2. ## cmake.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_major 2.8
  25. %define V_opkg 2.8.3
  26. %define V_dist 2.8.3
  27. # package information
  28. Name: cmake
  29. Summary: Cross-Platform Build System
  30. URL: http://www.cmake.org/
  31. Vendor: Kitware Inc., Insight Consortium
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: Building
  36. License: MIT-style
  37. Version: %{V_opkg}
  38. Release: 20101106
  39. # list of sources
  40. Source0: http://www.cmake.org/files/v%{V_major}/cmake-%{V_dist}.tar.gz
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, make
  43. PreReq: OpenPKG, openpkg >= 20100101
  44. %description
  45. CMake is an extensible, open-source system that manages the build
  46. process in an operating system and compiler independent manner.
  47. Unlike many cross-platform systems, CMake is designed to be used in
  48. conjunction with the native build environment. Simple configuration
  49. files placed in each source directory (called CMakeLists.txt files)
  50. are used to generate standard build files (e.g., makefiles on Unix
  51. and projects/workspaces in Windows MSVC) which are used in the usual
  52. way. CMake can compile source code, create libraries, generate
  53. wrappers, and build executables in arbitrary combinations. CMake
  54. supports in-place and out-of-place builds, and can therefore support
  55. multiple builds from a single source tree. CMake also supports
  56. static and dynamic library builds. Another nice feature of CMake is
  57. that it generates a cache file that is designed to be used with a
  58. graphical editor. For example, when CMake runs, it locates include
  59. files, libraries, and executable, and may encounter optional build
  60. directives. This information is gathered into the cache, which may
  61. be changed by the user prior to the generation of the native build
  62. files.
  63. %track
  64. prog cmake = {
  65. version = %{V_dist}
  66. url = http://www.cmake.org/cmake/resources/software.html
  67. regex = cmake-(__VER__)\.tar\.gz
  68. }
  69. %prep
  70. %setup -q -n cmake-%{V_dist}
  71. %build
  72. CC="%{l_cc}" \
  73. CXX="%{l_cxx}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. CXXFLAGS="%{l_cxxflags -O}" \
  76. ./configure \
  77. --prefix=%{l_prefix} \
  78. --datadir=/share/cmake \
  79. --docdir=/share/cmake/doc
  80. %{l_make} %{l_mflags}
  81. %install
  82. bin/cmake -D CMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{l_prefix} -P cmake_install.cmake
  83. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  84. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1
  85. %{l_shtool} install -c -m 644 Docs/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  86. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/cmake/doc
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  88. %files -f files
  89. %clean