cmake/cmake.spec

changeset 519
eb13d07d5435
child 520
35bba3448acd
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cmake/cmake.spec	Fri Aug 10 14:45:16 2012 +0200
     1.3 @@ -0,0 +1,101 @@
     1.4 +##
     1.5 +##  cmake.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package version
    1.28 +%define       V_major  2.8
    1.29 +%define       V_opkg   2.8.9
    1.30 +%define       V_dist   2.8.9
    1.31 +
    1.32 +#   package information
    1.33 +Name:         cmake
    1.34 +Summary:      Cross-Platform Build System
    1.35 +URL:          http://www.cmake.org/
    1.36 +Vendor:       Kitware Inc., Insight Consortium
    1.37 +Packager:     OpenPKG Foundation e.V.
    1.38 +Distribution: OpenPKG Community
    1.39 +Class:        EVAL
    1.40 +Group:        Building
    1.41 +License:      MIT-style
    1.42 +Version:      %{V_opkg}
    1.43 +Release:      20120810
    1.44 +
    1.45 +#   list of sources
    1.46 +Source0:      http://www.cmake.org/files/v%{V_major}/cmake-%{V_dist}.tar.gz
    1.47 +
    1.48 +#   build information
    1.49 +BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, make
    1.50 +PreReq:       OpenPKG, openpkg >= 20100101
    1.51 +
    1.52 +%description
    1.53 +    CMake is an extensible, open-source system that manages the build
    1.54 +    process in an operating system and compiler independent manner.
    1.55 +    Unlike many cross-platform systems, CMake is designed to be used in
    1.56 +    conjunction with the native build environment. Simple configuration
    1.57 +    files placed in each source directory (called CMakeLists.txt files)
    1.58 +    are used to generate standard build files (e.g., makefiles on Unix
    1.59 +    and projects/workspaces in Windows MSVC) which are used in the usual
    1.60 +    way. CMake can compile source code, create libraries, generate
    1.61 +    wrappers, and build executables in arbitrary combinations. CMake
    1.62 +    supports in-place and out-of-place builds, and can therefore support
    1.63 +    multiple builds from a single source tree. CMake also supports
    1.64 +    static and dynamic library builds. Another nice feature of CMake is
    1.65 +    that it generates a cache file that is designed to be used with a
    1.66 +    graphical editor. For example, when CMake runs, it locates include
    1.67 +    files, libraries, and executable, and may encounter optional build
    1.68 +    directives. This information is gathered into the cache, which may
    1.69 +    be changed by the user prior to the generation of the native build
    1.70 +    files.
    1.71 +
    1.72 +%track
    1.73 +    prog cmake = {
    1.74 +        version   = %{V_dist}
    1.75 +        url       = http://www.cmake.org/cmake/resources/software.html
    1.76 +        regex     = cmake-(__VER__)\.tar\.gz
    1.77 +    }
    1.78 +
    1.79 +%prep
    1.80 +    %setup -q -n cmake-%{V_dist}
    1.81 +
    1.82 +%build
    1.83 +    CC="%{l_cc}" \
    1.84 +    CXX="%{l_cxx}" \
    1.85 +    CFLAGS="%{l_cflags -O}" \
    1.86 +    CXXFLAGS="%{l_cxxflags -O}" \
    1.87 +    ./configure \
    1.88 +        --prefix=%{l_prefix} \
    1.89 +        --datadir=/share/cmake \
    1.90 +        --docdir=/share/cmake/doc
    1.91 +    %{l_make} %{l_mflags}
    1.92 +
    1.93 +%install
    1.94 +    bin/cmake -D CMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT%{l_prefix} -P cmake_install.cmake
    1.95 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
    1.96 +    %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1
    1.97 +    %{l_shtool} install -c -m 644 Docs/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
    1.98 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/cmake/doc
    1.99 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   1.100 +
   1.101 +%files -f files
   1.102 +
   1.103 +%clean
   1.104 +

mercurial