cmake.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ##
  2. ## cmake.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 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.6
  25. %define V_minor 3
  26. # package information
  27. Name: cmake
  28. Summary: Cross-Platform Build System
  29. URL: http://www.cmake.org/
  30. Vendor: Kitware Inc., Insight Consortium
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Building
  35. License: MIT-style
  36. Version: %{V_major}.%{V_minor}
  37. Release: 20090223
  38. # list of sources
  39. Source0: http://www.cmake.org/files/v%{V_major}/cmake-%{V_major}.%{V_minor}.tar.gz
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, gcc::with_cxx = yes, make
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. CMake is an extensible, open-source system that manages the build
  49. process in an operating system and compiler independent manner.
  50. Unlike many cross-platform systems, CMake is designed to be used in
  51. conjunction with the native build environment. Simple configuration
  52. files placed in each source directory (called CMakeLists.txt files)
  53. are used to generate standard build files (e.g., makefiles on Unix
  54. and projects/workspaces in Windows MSVC) which are used in the usual
  55. way. CMake can compile source code, create libraries, generate
  56. wrappers, and build executables in arbitrary combinations. CMake
  57. supports in-place and out-of-place builds, and can therefore support
  58. multiple builds from a single source tree. CMake also supports
  59. static and dynamic library builds. Another nice feature of CMake is
  60. that it generates a cache file that is designed to be used with a
  61. graphical editor. For example, when CMake runs, it locates include
  62. files, libraries, and executable, and may encounter optional build
  63. directives. This information is gathered into the cache, which may
  64. be changed by the user prior to the generation of the native build
  65. files.
  66. %track
  67. prog cmake = {
  68. version = %{version}
  69. url = http://www.cmake.org/HTML/Download.html
  70. regex = cmake-(__VER__)\.tar\.gz
  71. }
  72. %prep
  73. %setup -q
  74. %build
  75. CC="%{l_cc}" \
  76. CXX="%{l_cxx}" \
  77. CFLAGS="%{l_cflags -O}" \
  78. CXXFLAGS="%{l_cxxflags -O}" \
  79. ./configure \
  80. --prefix=%{l_prefix} \
  81. --datadir=/share/cmake \
  82. --docdir=/share/cmake/doc
  83. %{l_make} %{l_mflags}
  84. %install
  85. rm -rf $RPM_BUILD_ROOT
  86. bin/cmake -D CMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{l_prefix} -P cmake_install.cmake
  87. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  88. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1
  89. %{l_shtool} install -c -m 644 Docs/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  90. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/cmake/doc
  91. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  92. %files -f files
  93. %clean
  94. rm -rf $RPM_BUILD_ROOT