]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - any valid CMAKE_BUILD_TYPE causes overriding of our optflags | |
3 | # (and default non-verbose makefiles are hiding it!) | |
4 | # - rpmldflags/rpmcppflags are not passed through %%cmake macro at all | |
5 | # (is there any standard way???) | |
6 | # | |
7 | # Conditional build: | |
8 | %bcond_with bootstrap # use internal versions of some libraries | |
9 | %bcond_without gui # don't build gui package | |
10 | ||
11 | Summary: Cross-platform, open-source make system | |
12 | Summary(pl.UTF-8): Wieloplatformowy system make o otwartych źródłach | |
13 | Name: cmake | |
14 | Version: 2.8.2 | |
15 | Release: 2 | |
16 | License: BSD | |
17 | Group: Development/Building | |
18 | Source0: http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz | |
19 | # Source0-md5: 8c967d5264657a798f22ee23976ff0d9 | |
20 | Patch0: %{name}-lib64.patch | |
21 | Patch1: %{name}-tinfo.patch | |
22 | Patch2: python-2.7.patch | |
23 | URL: http://www.cmake.org/ | |
24 | %{?with_gui:BuildRequires: QtGui-devel} | |
25 | BuildRequires: libstdc++-devel | |
26 | BuildRequires: ncurses-devel | |
27 | %{?with_gui:BuildRequires: qt4-build} | |
28 | %{?with_gui:BuildRequires: qt4-qmake} | |
29 | BuildRequires: rpmbuild(macros) >= 1.167 | |
30 | %{!?with_bootstrap:BuildRequires: xmlrpc-c-devel >= 1.4.12-2} | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | CMake is used to control the software compilation process using simple | |
35 | platform and compiler independent configuration files. CMake generates | |
36 | native makefiles and workspaces that can be used in the compiler | |
37 | environment of your choice. CMake is quite sophisticated: it is | |
38 | possible to support complex environments requiring system | |
39 | configuration, pre-processor generation, code generation, and template | |
40 | instantiation. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | CMake służy do sterowania procesem kompilacji oprogramowania przy | |
44 | użyciu prostych plików konfiguracyjnych niezależnych od platformy i | |
45 | kompilatora. CMake generuje natywne pliki makefile i workspace, | |
46 | których można używać w wybranym środowisku kompilatora. CMake jest | |
47 | dość wyrafinowany: może obsłużyć złożone środowiska wymagające | |
48 | konfiguracji systemu, generowanie preprocesora, generowanie kodu i | |
49 | dziedziczenie szablonów. | |
50 | ||
51 | %package gui | |
52 | Summary: Qt GUI for CMake | |
53 | Summary(pl.UTF-8): Graficzny interfejs użytkownika Qt dla CMake | |
54 | Group: Development/Tools | |
55 | Requires: %{name} = %{version}-%{release} | |
56 | ||
57 | %description gui | |
58 | This package contains the Qt based GUI for CMake. | |
59 | ||
60 | %description gui -l pl.UTF-8 | |
61 | Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla | |
62 | CMake. | |
63 | ||
64 | %prep | |
65 | %setup -q | |
66 | %if "%{_lib}" == "lib64" | |
67 | %patch0 -p1 | |
68 | %endif | |
69 | %patch1 -p0 | |
70 | %patch2 -p1 | |
71 | ||
72 | cat > "init.cmake" <<EOF | |
73 | SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE) | |
74 | EOF | |
75 | ||
76 | %build | |
77 | export CC="%{__cc}" | |
78 | export CXX="%{__cxx}" | |
79 | export CFLAGS="%{rpmcflags}" | |
80 | export CXXFLAGS="%{rpmcxxflags}" | |
81 | export LDFLAGS="%{rpmldflags}" | |
82 | ./bootstrap \ | |
83 | --prefix=%{_prefix} \ | |
84 | --mandir=/share/man \ | |
85 | --datadir=/share/cmake \ | |
86 | --init=init.cmake \ | |
87 | %{!?with_bootstrap:--system-libs} \ | |
88 | %{?with_gui:--qt-gui} \ | |
89 | --verbose | |
90 | ||
91 | %{__make} VERBOSE=1 | |
92 | ||
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | install -d $RPM_BUILD_ROOT%{_libdir}/cmake | |
96 | %{__make} install \ | |
97 | DESTDIR=$RPM_BUILD_ROOT | |
98 | ||
99 | rm -r $RPM_BUILD_ROOT%{_prefix}/doc | |
100 | ||
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %files | |
105 | %defattr(644,root,root,755) | |
106 | %doc ChangeLog.* Copyright.txt *.gif Docs/{cmake,ctest}.{txt,html} | |
107 | %attr(755,root,root) %{_bindir}/ccmake | |
108 | %attr(755,root,root) %{_bindir}/cmake | |
109 | %attr(755,root,root) %{_bindir}/cpack | |
110 | %attr(755,root,root) %{_bindir}/ctest | |
111 | %{_mandir}/man1/*.1* | |
112 | %{_datadir}/cmake | |
113 | %dir %{_libdir}/cmake | |
114 | ||
115 | %if %{with gui} | |
116 | %files gui | |
117 | %defattr(644,root,root,755) | |
118 | %attr(755,root,root) %{_bindir}/cmake-gui | |
119 | %{_datadir}/mime/packages/cmakecache.xml | |
120 | %{_desktopdir}/CMake.desktop | |
121 | %{_pixmapsdir}/CMakeSetup32.png | |
122 | %endif |