Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 ##
2 ## cmake.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2012 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 ##
24 # package version
25 %define V_major 2.8
26 %define V_opkg 2.8.9
27 %define V_dist 2.8.9
29 # package information
30 Name: cmake
31 Summary: Cross-Platform Build System
32 URL: http://www.cmake.org/
33 Vendor: Kitware Inc., Insight Consortium
34 Packager: OpenPKG Foundation e.V.
35 Distribution: OpenPKG Community
36 Class: EVAL
37 Group: Building
38 License: MIT-style
39 Version: %{V_opkg}
40 Release: 20120800
42 # list of sources
43 Source0: http://www.cmake.org/files/v%{V_major}/cmake-%{V_dist}.tar.gz
45 # build information
46 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, make
47 PreReq: OpenPKG, openpkg >= 20100101
48 BuildPreReq: ncurses
49 PreReq: ncurses
51 %description
52 CMake is an extensible, opensource system that manages the build
53 process in an operating system and compiler independent manner.
54 Unlike many cross platform systems, CMake is designed to be used in
55 conjunction with the native build environment. Simple configuration
56 files placed in each source directory (called CMakeLists.txt files)
57 are used to generate standard build files (e.g., makefiles on Unix
58 and projects/workspaces in Windows MSVC) which are used in the usual
59 way. CMake can compile source code, create libraries, generate
60 wrappers, and build executables in arbitrary combinations. CMake
61 supports in place and out of place builds, and can therefore support
62 multiple builds from a single source tree. CMake also supports
63 static and dynamic library builds. Another nice feature of CMake is
64 that it generates a cache file that is designed to be used with a
65 graphical editor. For example, when CMake runs, it locates include
66 files, libraries, and executable, and may encounter optional build
67 directives. This information is gathered into the cache, which may
68 be changed by the user prior to the generation of the native build
69 files.
71 %track
72 prog cmake = {
73 version = %{V_dist}
74 url = http://www.cmake.org/cmake/resources/software.html
75 regex = cmake-(__VER__)\.tar\.gz
76 }
78 %prep
79 %setup -q -n cmake-%{V_dist}
80 %{l_shtool} subst \
81 -e 's;FIND_FILE(CURSES_HAVE_NCURSES_H *ncurses.h);;' \
82 -e 's;FIND_FILE(CURSES_HAVE_CURSES_H *curses.h);;' \
83 -e 's; ncurses.h ncurses/ncurses.h; ncurses/ncurses.h;' \
84 -e 's;\(CURSES_NCURSES_INCLUDE_PATH\) *\(curses.h\);\1 ncurses/\2;' \
85 Modules/FindCurses.cmake
87 %build
88 CC="%{l_cc}" \
89 CXX="%{l_cxx}" \
90 CFLAGS="%{l_cflags -O}" \
91 CXXFLAGS="%{l_cxxflags -O}" \
92 ./configure \
93 --prefix=%{l_prefix} \
94 --datadir=/share/cmake \
95 --docdir=/share/cmake/doc
96 %{l_make} %{l_mflags -O}
98 %install
99 bin/cmake -D CMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{l_prefix} -P cmake_install.cmake
100 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
101 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1
102 %{l_shtool} install -c -m 644 Docs/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
103 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/cmake/doc
104 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
106 %files -f files
108 %clean