/[packages]/cauldron/cmake/current/SPECS/cmake.spec
ViewVC logotype

Contents of /cauldron/cmake/current/SPECS/cmake.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6287 - (show annotations) (download)
Tue Jan 11 21:00:03 2011 UTC (10 years, 10 months ago) by dmorgan
File size: 4129 byte(s)
Do not build qtgui for now
1 %define shortVersion %(echo %{version} | cut -d. -f1,2)
2
3 %bcond_without bootstrap
4
5 Name: cmake
6 Summary: Cross-platform, open-source make system
7 Version: 2.8.3
8 Release: %mkrel 1
9 License: BSD
10 Group: Development/Other
11 Epoch: 1
12 Url: http://www.cmake.org/HTML/index.html
13 Source0: http://www.cmake.org/files/v%{shortVersion}/%name-%{version}.tar.gz
14 Source1: cmake.macros
15 # fix ftlk detection
16 Patch1: cmake-fltk-path.patch
17 Patch2: cmake-2.8.2-xz-support.patch
18 Patch3: cmake-2.8.2-py27.patch
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
20 BuildRequires: perl
21 BuildRequires: ncurses-devel
22 BuildRequires: libcurl-devel
23 BuildRequires: idn-devel
24 BuildRequires: zlib-devel
25 BuildRequires: xz
26 BuildRequires: expat-devel
27 BuildRequires: bzip2-devel
28 BuildRequires: libarchive-devel
29 %if ! %with bootstrap
30 BuildRequires: qt4-devel >= 4.4.0
31 %endif
32 BuildRequires: gcc-gfortran
33 Requires: rpm-mageia-setup
34
35 %description
36 CMake is used to control the software compilation process using
37 simple platform and compiler independent configuration files.
38 CMake generates native makefiles and workspaces that can be
39 used in the compiler environment of your choice. CMake is quite
40 sophisticated: it is possible to support complex environments
41 requiring system configuration, pre-processor generation, code
42 generation, and template instantiation.
43
44 %files
45 %defattr(-,root,root)
46 %_bindir/cmake
47 %_bindir/ccmake
48 %_bindir/ctest
49 %_bindir/cpack
50 %_mandir/man1/*
51 %_datadir/%{name}
52 %_sysconfdir/emacs/site-start.d/%{name}.el
53 %_sysconfdir/rpm/macros.d/*
54 %_datadir/emacs/site-lisp/cmake-mode.el
55 %_datadir/vim/*/*
56 %doc CMakeLogo.gif Example mydocs/*
57
58 #-----------------------------------------------------------------------------
59
60 %if ! %with bootstrap
61 %package -n %{name}-qtgui
62 Summary: Qt GUI Dialog for CMake - the Cross-platform, open-source make system
63 Group: Development/Other
64 Requires: %name
65
66 %description -n %{name}-qtgui
67 CMake is used to control the software compilation process using
68 simple platform and compiler independent configuration files.
69
70 This is the Qt GUI.
71
72 %files -n %{name}-qtgui
73 %_bindir/cmake-gui
74 %_datadir/applications/CMake.desktop
75 %_datadir/mime/packages/cmakecache.xml
76 %_datadir/pixmaps/CMakeSetup32.png
77 %endif
78
79 #-----------------------------------------------------------------------------
80
81 %prep
82 %setup -q -n %name-%{version}
83 %patch1
84 #%patch2 -p1 -b .xz
85 #%patch3 -p1 -b .py27
86
87 # Don't try to automagically find files in /usr/X11R6
88 # But also don't change a prefix if it is not /usr
89 perl -pi -e 's@^\s+/usr/X11R6/.*\n@@' Modules/*.cmake
90
91 %ifarch %arm
92 # bootstrap test is taking ages on arm
93 sed -i -e 's!SET(CMAKE_LONG_TEST_TIMEOUT 1500)!SET(CMAKE_LONG_TEST_TIMEOUT 7200)!g' Tests/CMakeLists.txt
94 %endif
95
96 %build
97 mkdir -p build
98 cd build
99 %setup_compile_flags
100 ../configure \
101 --system-libs \
102 --parallel=%_smp_mflags \
103 --prefix=%{_prefix} \
104 --datadir=/share/%{name} \
105 --mandir=/share/man \
106 --docdir=/share/doc/%{name} \
107 %if ! %with bootstrap
108 --qt-gui
109 %endif
110
111 %make
112
113 %install
114 rm -rf %buildroot
115 pushd build
116 %makeinstall_std
117 popd
118
119 # cmake mode for emacs
120 install -m644 Docs/cmake-mode.el -D %buildroot%_datadir/emacs/site-lisp/cmake-mode.el
121 install -d %buildroot%_sysconfdir/emacs/site-start.d
122 cat <<EOF >%buildroot%_sysconfdir/emacs/site-start.d/%{name}.el
123 (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path))
124 (require 'cmake-mode)
125 (setq auto-mode-alist
126 (append '(("CMakeLists\\\\.txt\\\\'" . cmake-mode)
127 ("\\\\.cmake\\\\'" . cmake-mode))
128 auto-mode-alist))
129 EOF
130
131 # cmake mode for vim
132 install -m644 Docs/cmake-syntax.vim -D %buildroot%_datadir/vim/syntax/cmake.vim
133 install -m644 Docs/cmake-indent.vim -D %buildroot%_datadir/vim/indent/cmake.vim
134
135 # RPM macros
136 install -m644 %SOURCE1 -D %buildroot%_sysconfdir/rpm/macros.d/cmake.macros
137
138 # %doc wipes out files in doc dir, fixed in cooker svn for rpm package, though
139 # not submitted yet, so we'll just work around this by moving it for now..
140 rm -rf mydocs
141 mv %buildroot%_datadir/doc/%{name} mydocs
142
143 %check
144 unset DISPLAY
145 cd build
146 bin/ctest -E SubDirSpaces -V %{_smp_mflags}
147
148 %clean
149 rm -rf %buildroot
150
151

  ViewVC Help
Powered by ViewVC 1.1.28