cmake/cmake.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 520
35bba3448acd
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

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

mercurial