cmake/cmake.spec

Mon, 17 Sep 2012 19:13:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:13:34 +0200
changeset 692
67831a9de168
parent 519
eb13d07d5435
child 716
b45328b0ff26
permissions
-rw-r--r--

Correct pathnames and generally migrate buildconf from version 2 to 3.

     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
    49 %description
    50     CMake is an extensible, open-source system that manages the build
    51     process in an operating system and compiler independent manner.
    52     Unlike many cross-platform systems, CMake is designed to be used in
    53     conjunction with the native build environment. Simple configuration
    54     files placed in each source directory (called CMakeLists.txt files)
    55     are used to generate standard build files (e.g., makefiles on Unix
    56     and projects/workspaces in Windows MSVC) which are used in the usual
    57     way. CMake can compile source code, create libraries, generate
    58     wrappers, and build executables in arbitrary combinations. CMake
    59     supports in-place and out-of-place builds, and can therefore support
    60     multiple builds from a single source tree. CMake also supports
    61     static and dynamic library builds. Another nice feature of CMake is
    62     that it generates a cache file that is designed to be used with a
    63     graphical editor. For example, when CMake runs, it locates include
    64     files, libraries, and executable, and may encounter optional build
    65     directives. This information is gathered into the cache, which may
    66     be changed by the user prior to the generation of the native build
    67     files.
    69 %track
    70     prog cmake = {
    71         version   = %{V_dist}
    72         url       = http://www.cmake.org/cmake/resources/software.html
    73         regex     = cmake-(__VER__)\.tar\.gz
    74     }
    76 %prep
    77     %setup -q -n cmake-%{V_dist}
    79 %build
    80     CC="%{l_cc}" \
    81     CXX="%{l_cxx}" \
    82     CFLAGS="%{l_cflags -O}" \
    83     CXXFLAGS="%{l_cxxflags -O}" \
    84     ./configure \
    85         --prefix=%{l_prefix} \
    86         --datadir=/share/cmake \
    87         --docdir=/share/cmake/doc
    88     %{l_make} %{l_mflags -O}
    90 %install
    91     bin/cmake -D CMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{l_prefix} -P cmake_install.cmake
    92     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
    93     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1
    94     %{l_shtool} install -c -m 644 Docs/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
    95     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/cmake/doc
    96     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
    98 %files -f files
   100 %clean

mercurial