michael@519: ## michael@519: ## cmake.spec -- OpenPKG RPM Package Specification michael@519: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@519: ## michael@519: ## Permission to use, copy, modify, and distribute this software for michael@519: ## any purpose with or without fee is hereby granted, provided that michael@519: ## the above copyright notice and this permission notice appear in all michael@519: ## copies. michael@519: ## michael@519: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@519: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@519: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@519: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@519: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@519: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@519: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@519: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@519: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@519: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@519: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@519: ## SUCH DAMAGE. michael@519: ## michael@519: michael@519: # package version michael@519: %define V_major 2.8 michael@519: %define V_opkg 2.8.9 michael@519: %define V_dist 2.8.9 michael@519: michael@519: # package information michael@519: Name: cmake michael@519: Summary: Cross-Platform Build System michael@519: URL: http://www.cmake.org/ michael@519: Vendor: Kitware Inc., Insight Consortium michael@519: Packager: OpenPKG Foundation e.V. michael@519: Distribution: OpenPKG Community michael@519: Class: EVAL michael@519: Group: Building michael@519: License: MIT-style michael@519: Version: %{V_opkg} michael@520: Release: 20120800 michael@519: michael@519: # list of sources michael@519: Source0: http://www.cmake.org/files/v%{V_major}/cmake-%{V_dist}.tar.gz michael@519: michael@519: # build information michael@519: BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, make michael@519: PreReq: OpenPKG, openpkg >= 20100101 michael@519: michael@519: %description michael@519: CMake is an extensible, open-source system that manages the build michael@519: process in an operating system and compiler independent manner. michael@519: Unlike many cross-platform systems, CMake is designed to be used in michael@519: conjunction with the native build environment. Simple configuration michael@519: files placed in each source directory (called CMakeLists.txt files) michael@519: are used to generate standard build files (e.g., makefiles on Unix michael@519: and projects/workspaces in Windows MSVC) which are used in the usual michael@519: way. CMake can compile source code, create libraries, generate michael@519: wrappers, and build executables in arbitrary combinations. CMake michael@519: supports in-place and out-of-place builds, and can therefore support michael@519: multiple builds from a single source tree. CMake also supports michael@519: static and dynamic library builds. Another nice feature of CMake is michael@519: that it generates a cache file that is designed to be used with a michael@519: graphical editor. For example, when CMake runs, it locates include michael@519: files, libraries, and executable, and may encounter optional build michael@519: directives. This information is gathered into the cache, which may michael@519: be changed by the user prior to the generation of the native build michael@519: files. michael@519: michael@519: %track michael@519: prog cmake = { michael@519: version = %{V_dist} michael@519: url = http://www.cmake.org/cmake/resources/software.html michael@519: regex = cmake-(__VER__)\.tar\.gz michael@519: } michael@519: michael@519: %prep michael@519: %setup -q -n cmake-%{V_dist} michael@519: michael@519: %build michael@519: CC="%{l_cc}" \ michael@519: CXX="%{l_cxx}" \ michael@519: CFLAGS="%{l_cflags -O}" \ michael@519: CXXFLAGS="%{l_cxxflags -O}" \ michael@519: ./configure \ michael@519: --prefix=%{l_prefix} \ michael@519: --datadir=/share/cmake \ michael@519: --docdir=/share/cmake/doc michael@520: %{l_make} %{l_mflags -O} michael@519: michael@519: %install michael@519: bin/cmake -D CMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{l_prefix} -P cmake_install.cmake michael@519: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true michael@519: %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1 michael@519: %{l_shtool} install -c -m 644 Docs/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ michael@519: rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/cmake/doc michael@519: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@519: michael@519: %files -f files michael@519: michael@519: %clean michael@519: