]> git.pld-linux.org Git - packages/cmake.git/blame - cmake.spec
BR: automake for %_aclocaldir
[packages/cmake.git] / cmake.spec
CommitLineData
d1b2e54c 1# TODO:
6453b6ac 2# - system kwiml >= 1.0?
bdbf72c3 3# - make lib64/libx32 patch changes applicable everywhere
d1b2e54c
JB
4# - any valid CMAKE_BUILD_TYPE causes overriding of our optflags
5# (and default non-verbose makefiles are hiding it!)
6# - rpmldflags/rpmcppflags are not passed through %%cmake macro at all
7# (is there any standard way???)
02d8d7ee
JR
8# - FindJNI.cmake module is a PoS full of random incorrect paths,
9# needs lib64/libx32 awareness
ccca321d
KK
10#
11# Conditional build:
b563f9dc 12%bcond_with bootstrap # use internal versions of some libraries
c5ca293a 13%bcond_without gui # gui package
63b5fdd8 14%bcond_with tests # perform "make test"
c5ca293a 15%bcond_without doc # documentation
77f8acdd 16
efafbc62 17Summary: Cross-platform, open-source make system
ac3ea35a 18Summary(pl.UTF-8): Wieloplatformowy system make o otwartych źródłach
72a696fa 19Name: cmake
c5ca293a 20Version: 3.27.3
8df6345d 21Release: 1
efafbc62 22License: BSD
72a696fa 23Group: Development/Building
c5ca293a
JB
24Source0: https://cmake.org/files/v3.27/%{name}-%{version}.tar.gz
25# Source0-md5: 7228f5fcc8a858fdeac27e29bda0c144
6342daf8 26Patch0: %{name}-lib64.patch
834c9659 27Patch1: %{name}-libx32.patch
3d8172a7 28Patch2: %{name}-jni.patch
834c9659
JR
29Patch3: %{name}-findruby.patch
30Patch4: %{name}-findruby2.patch
8f9c22ed 31Patch5: disable-completness-check.patch
c5ca293a 32Patch6: %{name}-zlib.patch
22b75947 33URL: https://cmake.org/
17d1eb52 34# system zlib,bzip2,xz,zstd used only when without system libarchive
22b75947
JB
35%if %{with gui}
36BuildRequires: Qt5Core-devel >= 5.0
37BuildRequires: Qt5Gui-devel >= 5.0
38BuildRequires: Qt5Widgets-devel >= 5.0
39%endif
334121bd 40BuildRequires: automake
c5ca293a 41BuildRequires: cppdap-devel
a48136e8 42BuildRequires: curl-devel
a3907799 43BuildRequires: expat-devel
466fdfa1 44BuildRequires: jsoncpp-devel >= 1.6.2-2
132e0ee5 45BuildRequires: libarchive-devel >= 3.3.3
6453b6ac
JB
46BuildRequires: libstdc++-devel >= 6:4.7
47BuildRequires: libuv-devel >= 1.28.0
59917d1a 48BuildRequires: ncurses-devel > 5.9-3
17d1eb52 49BuildRequires: ncurses-ext-devel > 5.9-3
6453b6ac 50BuildRequires: nghttp2-devel
22b75947
JB
51%{?with_gui:BuildRequires: qt5-build >= 5.0}
52%{?with_gui:BuildRequires: qt5-qmake >= 5.0}
4211e02d 53BuildRequires: rhash-devel
8960e23f 54BuildRequires: rpm-build >= 4.6
ece9e155 55BuildRequires: rpmbuild(macros) >= 1.167
90b41c6c 56%{?with_doc:BuildRequires: sphinx-pdg}
6453b6ac 57BuildRequires: xz-devel
a48136e8 58BuildRequires: zlib-devel
6453b6ac 59BuildRequires: zstd-devel
75cb386f 60Requires: filesystem >= 3.0-52
132e0ee5 61Requires: libarchive >= 3.3.3
6453b6ac 62Requires: libuv >= 1.28.0
efafbc62 63BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
3fcbc09a
AG
64
65%description
efafbc62
AG
66CMake is used to control the software compilation process using simple
67platform and compiler independent configuration files. CMake generates
68native makefiles and workspaces that can be used in the compiler
69environment of your choice. CMake is quite sophisticated: it is
70possible to support complex environments requiring system
71configuration, pre-processor generation, code generation, and template
72instantiation.
3fcbc09a 73
520c9eb8
JR
74%description -l pl.UTF-8
75CMake służy do sterowania procesem kompilacji oprogramowania przy
ca760f29 76użyciu prostych plików konfiguracyjnych niezależnych od platformy i
77kompilatora. CMake generuje natywne pliki makefile i workspace,
485d9a7a 78których można używać w wybranym środowisku kompilatora. CMake jest
59787775 79dość wyrafinowany: może obsłużyć złożone środowiska wymagające
ca760f29 80konfiguracji systemu, generowanie preprocesora, generowanie kodu i
81dziedziczenie szablonów.
33042d59 82
fe46a853
JB
83%package doc-html
84Summary: CMake documentation in HTML format
85Summary(pl.UTF-8): Dokumentacja do pakietu CMake w formacie HTML
86Group: Documentation
87
88%description doc-html
89CMake documentation in HTML format.
90
91%description doc-html -l pl.UTF-8
92Dokumentacja do pakietu CMake w formacie HTML.
93
33042d59 94%package gui
b563f9dc
JB
95Summary: Qt GUI for CMake
96Summary(pl.UTF-8): Graficzny interfejs użytkownika Qt dla CMake
33042d59
KK
97Group: Development/Tools
98Requires: %{name} = %{version}-%{release}
99
b563f9dc
JB
100%description gui
101This package contains the Qt based GUI for CMake.
102
103%description gui -l pl.UTF-8
104Ten pakiet zawiera oparty na Qt graficzny interfejs użytkownika dla
105CMake.
72a696fa 106
9ec4f08d 107%package emacs
69d19c08
JB
108Summary: Emacs mode for cmake files
109Summary(pl.UTF-8): Tryb Emacsa dla plików cmake'a
9ec4f08d
KK
110Group: Development/Tools
111
112%description emacs
69d19c08
JB
113Emacs mode for cmake files.
114
115%description emacs -l pl.UTF-8
116Tryb Emacsa dla plików cmake'a.
9ec4f08d
KK
117
118%package -n bash-completion-%{name}
119Summary: bash-completion for cmake
69d19c08 120Summary(pl.UTF-8): Bashowe dopełnianie parametrów dla cmake'a
9ec4f08d 121Group: Applications/Shells
69d19c08 122Requires: %{name} = %{version}-%{release}
34fc3d72 123Requires: bash-completion >= 1:2.0
6465d90a 124BuildArch: noarch
9ec4f08d
KK
125
126%description -n bash-completion-%{name}
69d19c08
JB
127bash-completion for cmake.
128
129%description -n bash-completion-%{name} -l pl.UTF-8
130Bashowe dopełnianie parametrów dla cmake'a.
9ec4f08d 131
3fcbc09a 132%prep
923851a2 133%setup -q
286b1479 134%if "%{_lib}" == "lib64"
6342daf8 135%patch0 -p1
286b1479 136%endif
834c9659 137%if "%{_lib}" == "libx32"
9ec4f08d 138%patch1 -p1
834c9659 139%endif
3d8172a7 140%patch2 -p1
04706b61 141%patch3 -p1
834c9659 142%patch4 -p1
8f9c22ed 143%patch5 -p1
c5ca293a 144%patch6 -p1
3fcbc09a 145
c5ca293a
JB
146%{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' \
147 Modules/Compiler/XL-Fortran/cpp
4b266473 148
ece9e155 149cat > "init.cmake" <<EOF
286b1479 150SET (CURSES_INCLUDE_PATH "/usr/include/ncurses" CACHE PATH " " FORCE)
9ec4f08d
KK
151SET (CMAKE_INSTALL_SYSCONFDIR "%{_sysconfdir}" CACHE PATH " " FORCE)
152SET (CMAKE_INSTALL_DATADIR "%{_datadir}" CACHE PATH " " FORCE)
ece9e155
KK
153EOF
154
b343cdb1
JR
155# cleanup backups after patching, modules are copied as-is
156find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
157
3fcbc09a 158%build
ece9e155
KK
159export CC="%{__cc}"
160export CXX="%{__cxx}"
161export CFLAGS="%{rpmcflags}"
162export CXXFLAGS="%{rpmcxxflags}"
ccca321d 163export LDFLAGS="%{rpmldflags}"
923851a2
AG
164./bootstrap \
165 --prefix=%{_prefix} \
166 --mandir=/share/man \
167 --datadir=/share/cmake \
ece9e155 168 --init=init.cmake \
c342f103 169 %{!?with_bootstrap:--system-libs} \
33042d59 170 %{?with_gui:--qt-gui} \
22b75947 171 --qt-qmake=%{_bindir}/qmake-qt5 \
90b41c6c
JR
172 %{?with_doc:--sphinx-html} \
173 %{?with_doc:--sphinx-man} \
c749d7d4 174 %{?__jobs:--parallel=%{__jobs}} \
a48136e8 175 --verbose
923851a2 176
a48136e8
JB
177%{__make} \
178 VERBOSE=1
3fcbc09a 179
1fbe3ed6
AM
180%{?with_tests:%{__make} test}
181
3fcbc09a 182%install
efafbc62 183rm -rf $RPM_BUILD_ROOT
3d8172a7 184
72a696fa
JB
185%{__make} install \
186 DESTDIR=$RPM_BUILD_ROOT
187
3d8172a7
JB
188# just a bit more recent than packaged in vim.spec
189%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/vim
190# packaged as %doc
75cb386f 191%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc
3fcbc09a
AG
192
193%clean
194rm -rf $RPM_BUILD_ROOT
195
196%files
efafbc62 197%defattr(644,root,root,755)
fe46a853 198%doc Copyright.txt README.rst *.gif
72a696fa
JB
199%attr(755,root,root) %{_bindir}/ccmake
200%attr(755,root,root) %{_bindir}/cmake
08b6790a 201%attr(755,root,root) %{_bindir}/cpack
72a696fa 202%attr(755,root,root) %{_bindir}/ctest
90b41c6c 203%if %{with doc}
08bb5e07
JB
204%{_mandir}/man1/ccmake.1*
205%{_mandir}/man1/cmake.1*
08bb5e07
JB
206%{_mandir}/man1/cpack.1*
207%{_mandir}/man1/ctest.1*
a8099d1a 208%{_mandir}/man7/cpack-generators.7*
fe46a853
JB
209%{_mandir}/man7/cmake-buildsystem.7*
210%{_mandir}/man7/cmake-commands.7*
cda7a827 211%{_mandir}/man7/cmake-compile-features.7*
c5ca293a 212%{_mandir}/man7/cmake-configure-log.7*
fe46a853 213%{_mandir}/man7/cmake-developer.7*
bac58766 214%{_mandir}/man7/cmake-env-variables.7*
b094c172 215%{_mandir}/man7/cmake-file-api.7*
fe46a853
JB
216%{_mandir}/man7/cmake-generator-expressions.7*
217%{_mandir}/man7/cmake-generators.7*
218%{_mandir}/man7/cmake-language.7*
219%{_mandir}/man7/cmake-modules.7*
220%{_mandir}/man7/cmake-packages.7*
221%{_mandir}/man7/cmake-policies.7*
4b266473 222%{_mandir}/man7/cmake-presets.7*
fe46a853
JB
223%{_mandir}/man7/cmake-properties.7*
224%{_mandir}/man7/cmake-qt.7*
da1ef5d3 225%{_mandir}/man7/cmake-server.7*
fe46a853
JB
226%{_mandir}/man7/cmake-toolchains.7*
227%{_mandir}/man7/cmake-variables.7*
0278e558 228%{_datadir}/cmake/Help
90b41c6c 229%endif
b24a2e64
JB
230# top cmake/Modules dirs belong to filesystem
231%{_datadir}/cmake/Modules/.NoDartCoverage
232%{_datadir}/cmake/Modules/*
233%{_datadir}/cmake/Templates
234%{_datadir}/cmake/include
09f5d631 235%{_aclocaldir}/cmake.m4
33042d59 236
90b41c6c 237%if %{with doc}
fe46a853
JB
238%files doc-html
239%defattr(644,root,root,755)
240%doc Utilities/Sphinx/html/*
90b41c6c 241%endif
fe46a853 242
1a3a9dcd 243%if %{with gui}
33042d59
KK
244%files gui
245%defattr(644,root,root,755)
246%attr(755,root,root) %{_bindir}/cmake-gui
247%{_datadir}/mime/packages/cmakecache.xml
af122c88 248%{_desktopdir}/cmake-gui.desktop
466fdfa1
AM
249%{_iconsdir}/hicolor/128x128/apps/CMakeSetup.png
250%{_iconsdir}/hicolor/32x32/apps/CMakeSetup.png
49e2a1c9 251%if %{with doc}
08bb5e07 252%{_mandir}/man1/cmake-gui.1*
1a3a9dcd 253%endif
49e2a1c9 254%endif
9ec4f08d
KK
255
256%files emacs
257%defattr(644,root,root,755)
258%{_datadir}/emacs/site-lisp/cmake-mode.el
259
260%files -n bash-completion-%{name}
261%defattr(644,root,root,755)
466fdfa1
AM
262%{bash_compdir}/cmake
263%{bash_compdir}/cpack
264%{bash_compdir}/ctest
This page took 0.455515 seconds and 4 git commands to generate.