summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--cmake-findruby.patch22
-rw-r--r--cmake-init.el9
-rw-r--r--cmake-mingw-dl.patch18
-rw-r--r--cmake.attr3
-rw-r--r--cmake.prov75
-rw-r--r--cmake.req70
-rw-r--r--cmake.spec288
-rw-r--r--macros.cmake36
-rw-r--r--sources1
10 files changed, 523 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..48125d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cmake-3.26.4.tar.gz
diff --git a/cmake-findruby.patch b/cmake-findruby.patch
new file mode 100644
index 0000000..72a8b25
--- /dev/null
+++ b/cmake-findruby.patch
@@ -0,0 +1,22 @@
+Index: cmake-3.23.0-rc2/Modules/FindRuby.cmake
+===================================================================
+--- cmake-3.23.0-rc2.orig/Modules/FindRuby.cmake
++++ cmake-3.23.0-rc2/Modules/FindRuby.cmake
+@@ -315,14 +315,9 @@ if(Ruby_EXECUTABLE AND NOT Ruby_VERSION_
+ _RUBY_CONFIG_VAR("sitearchdir" Ruby_SITEARCH_DIR)
+ _RUBY_CONFIG_VAR("sitelibdir" Ruby_SITELIB_DIR)
+
+- # vendor_ruby available ?
+- execute_process(COMMAND ${Ruby_EXECUTABLE} -r vendor-specific -e "print 'true'"
+- OUTPUT_VARIABLE Ruby_HAS_VENDOR_RUBY ERROR_QUIET)
+-
+- if(Ruby_HAS_VENDOR_RUBY)
+- _RUBY_CONFIG_VAR("vendorlibdir" Ruby_VENDORLIB_DIR)
+- _RUBY_CONFIG_VAR("vendorarchdir" Ruby_VENDORARCH_DIR)
+- endif()
++ # vendor_ruby
++ _RUBY_CONFIG_VAR("vendorlibdir" Ruby_VENDORLIB_DIR)
++ _RUBY_CONFIG_VAR("vendorarchdir" Ruby_VENDORARCH_DIR)
+
+ # save the results in the cache so we don't have to run ruby the next time again
+ set(Ruby_VERSION_MAJOR ${Ruby_VERSION_MAJOR} CACHE PATH "The Ruby major version" FORCE)
diff --git a/cmake-init.el b/cmake-init.el
new file mode 100644
index 0000000..a5e0e2e
--- /dev/null
+++ b/cmake-init.el
@@ -0,0 +1,9 @@
+;;
+;; Setup cmake-mode for autoloading
+;;
+(autoload 'cmake-mode "cmake-mode" "Major mode for editing CMake listfiles." t)
+(setq auto-mode-alist
+ (append
+ '(("CMakeLists\\.txt\\'" . cmake-mode))
+ '(("\\.cmake\\'" . cmake-mode))
+ auto-mode-alist))
diff --git a/cmake-mingw-dl.patch b/cmake-mingw-dl.patch
new file mode 100644
index 0000000..9934788
--- /dev/null
+++ b/cmake-mingw-dl.patch
@@ -0,0 +1,18 @@
+Index: cmake-3.23.0-rc2/Modules/Platform/Windows-GNU.cmake
+===================================================================
+--- cmake-3.23.0-rc2.orig/Modules/Platform/Windows-GNU.cmake
++++ cmake-3.23.0-rc2/Modules/Platform/Windows-GNU.cmake
+@@ -24,11 +24,11 @@ set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+ set(CMAKE_EXTRA_LINK_EXTENSIONS ".lib") # MinGW can also link to a MS .lib
+
+ set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
+-set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
++set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
+ set(CMAKE_C_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32")
+ set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
+
+-set(CMAKE_DL_LIBS "")
++set(CMAKE_DL_LIBS "dl")
+ set(CMAKE_LIBRARY_PATH_FLAG "-L")
+ set(CMAKE_LINK_LIBRARY_FLAG "-l")
+ set(CMAKE_LINK_DEF_FILE_FLAG "") # Empty string: passing the file is enough
diff --git a/cmake.attr b/cmake.attr
new file mode 100644
index 0000000..83f3f1a
--- /dev/null
+++ b/cmake.attr
@@ -0,0 +1,3 @@
+%__cmake_provides %{_rpmconfigdir}/cmake.prov
+%__cmake_requires %{_rpmconfigdir}/cmake.req
+%__cmake_path ^(%{_libdir}|%{_datadir})/cmake/.*/.*(Config\.cmake|-config\.cmake)$
diff --git a/cmake.prov b/cmake.prov
new file mode 100644
index 0000000..f569c23
--- /dev/null
+++ b/cmake.prov
@@ -0,0 +1,75 @@
+#!/usr/bin/python
+# -*- coding:utf-8 -*-
+#
+# Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com>
+# Copyright (C) 2017 Daniel Vrátil <dvratil@fedoraproject.org>
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+import sys
+import re
+import glob
+
+class CMakeParser:
+ def __init__(self, filelist = None):
+ if filelist == None:
+ filelist = sys.stdin
+
+ paths = map(lambda x: x.rstrip(), filelist.readlines())
+ for path in paths:
+ modulePath, cmakeModule, lowercase = self.parseCmakeModuleConfig(path)
+ if modulePath and cmakeModule:
+ version = self.resolveCMakeModuleVersion(modulePath, cmakeModule, lowercase)
+
+ if version:
+ print("cmake(%s) = %s" % (cmakeModule, version))
+ else:
+ print("cmake(%s)" % cmakeModule)
+
+
+ def parseCmakeModuleConfig(self, configFile):
+ paths = configFile.rsplit("/", 3)
+
+ modulePath = "%s/cmake/%s" % (paths[0], paths[2])
+ cfgFile = paths[3]
+ if cfgFile.endswith("Config.cmake"):
+ return (modulePath, cfgFile[0:-len("Config.cmake")], False)
+ elif cfgFile.endswith("-config.cmake"):
+ return (modulePath, cfgFile[0:-len("-config.cmake")], True)
+ else:
+ return (None, None, False)
+
+ def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase):
+ versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)
+ try:
+ f = open(versionFile, 'r')
+ except:
+ return None
+
+ for line in f:
+ line = line.strip()
+
+ # set(PACKAGE_VERSION <version>)
+ version = re.match(r"^set[\ ]*\([\ ]*PACKAGE_VERSION[\ ]+[\"]*([0-9\.]+)[\"]*[\ ]*[.]*\)", line)
+ if version:
+ return version.groups(1)[0]
+
+ return None
+
+if __name__ == "__main__":
+ parser = CMakeParser()
diff --git a/cmake.req b/cmake.req
new file mode 100644
index 0000000..2a58ca3
--- /dev/null
+++ b/cmake.req
@@ -0,0 +1,70 @@
+#!/usr/bin/python
+# -*- coding:utf-8 -*-
+#
+# Copyright (C) 2017 Björn Esser <besser82@fedoraproject.org>
+#
+# based on cmake.prov, which is
+# Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com>
+# Copyright (C) 2017 Daniel Vrátil <dvratil@fedoraproject.org>
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+import sys
+import re
+import subprocess
+
+class CMakeParser:
+ def __init__(self, filelist = None):
+ if filelist == None:
+ filelist = sys.stdin
+
+ has_module = False
+ is_arched = False
+
+ isa_suf = subprocess.check_output(["/usr/bin/rpm", "-E %{?_isa}"]).decode().strip()
+
+ paths = map(lambda x: x.rstrip(), filelist.readlines())
+ for path in paths:
+ modulePath, cmakeModule, lowercase = self.parseCmakeModuleConfig(path)
+ if modulePath and cmakeModule:
+ has_module = True
+ if re.match(".*/usr/lib(64)?/cmake/.*", modulePath):
+ is_arched = True
+
+ if has_module:
+ if is_arched:
+ print("cmake-filesystem%s" % isa_suf)
+ else:
+ print("cmake-filesystem")
+
+
+ def parseCmakeModuleConfig(self, configFile):
+ paths = configFile.rsplit("/", 3)
+
+ modulePath = "%s/cmake/%s" % (paths[0], paths[2])
+ cfgFile = paths[3]
+ if cfgFile.endswith("Config.cmake"):
+ return (modulePath, cfgFile[0:-len("Config.cmake")], False)
+ elif cfgFile.endswith("-config.cmake"):
+ return (modulePath, cfgFile[0:-len("-config.cmake")], True)
+ else:
+ return (None, None, False)
+
+
+if __name__ == "__main__":
+ parser = CMakeParser()
diff --git a/cmake.spec b/cmake.spec
new file mode 100644
index 0000000..5e86930
--- /dev/null
+++ b/cmake.spec
@@ -0,0 +1,288 @@
+%define debug_package %{nil}
+%bcond_with bootstrap
+%bcond_without ncurses
+%bcond_without sphinx
+%bcond_without X11_test
+%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
+
+%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/cmake-%{version}}
+%{?rcsuf:%global relsuf .%{rcsuf}}
+%{?rcsuf:%global versuf -%{rcsuf}}
+
+Name: cmake
+Version: 3.26.4
+Release: 1
+Summary: Cross-platform make system
+License: BSD and MIT and zlib
+URL: http://www.cmake.org
+Source0: https://www.cmake.org/files/v3.26/cmake-%{version}.tar.gz
+Source1: cmake-init.el
+Source2: macros.cmake
+Source3: cmake.attr
+Source4: cmake.prov
+Source5: cmake.req
+Patch0: cmake-findruby.patch
+#Patch1: cmake-fedora-flag_release.patch
+Patch2: cmake-mingw-dl.patch
+%ifarch sw_64
+Patch3: cmake-3.22.0-sw.patch
+%endif
+
+BuildRequires: coreutils findutils gcc-c++ gcc-gfortran sed
+BuildRequires: emacs python3-devel pkgconfig(Qt5Widgets) desktop-file-utils
+%if %{with X11_test}
+BuildRequires: libX11-devel
+%endif
+%if %{with ncurses}
+BuildRequires: ncurses-devel
+%endif
+%if %{with sphinx}
+BuildRequires: python3-sphinx
+%endif
+%if %{without bootstrap}
+BuildRequires: bzip2-devel curl-devel expat-devel jsoncpp-devel libarchive-devel
+BuildRequires: libuv-devel xz-devel zlib-devel cmake-rpm-macros
+%endif
+
+Requires: cmake-data = %{version}-%{release} cmake-rpm-macros = %{version}-%{release}
+Requires: cmake-filesystem = %{version}-%{release}
+Provides: cmake3 = %{version}-%{release} bundled(md5-deutsch) bundled(kwsys)
+
+%description
+CMake is used to control the software compilation process using simple
+platform and compiler independent configuration files. CMake generates
+native makefiles and workspaces that can be used in the compiler
+environment of your choice. CMake is quite sophisticated: it is possible
+to support complex environments requiring system configuration, preprocessor
+generation, code generation, and template instantiation.
+
+%package data
+Summary: Common data-files for cmake
+Requires: cmake = %{version}-%{release} cmake-filesystem = %{version}-%{release}
+Requires: cmake-rpm-macros = %{version}-%{release}
+Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
+
+BuildArch: noarch
+
+%description data
+This package contains common data-files for cmake.
+
+%package filesystem
+Summary: Directories used by CMake modules
+
+%description filesystem
+This package owns all directories used by CMake modules.
+
+%package gui
+Summary: Qt GUI for cmake
+
+Requires: cmake = %{version}-%{release}
+Requires: hicolor-icon-theme
+Requires: shared-mime-info
+
+%description gui
+The cmake-gui package contains the Qt based GUI for cmake.
+
+%package rpm-macros
+Summary: Common RPM macros for cmake
+Requires: rpm
+Conflicts: cmake-data < 3.10.1-2
+BuildArch: noarch
+
+%description rpm-macros
+This package contains common RPM macros for cmake.
+
+%package help
+Summary: Documentation for cmake
+Provides: %{name}-doc = %{version}-%{release}
+Obsoletes: %{name}-doc < %{version}-%{release}
+BuildArch: noarch
+
+%description help
+Documentation for cmake.
+
+%prep
+%autosetup -n cmake-%{version}%{?versuf} -p 1
+sed '1c #!%{__python3}' %{SOURCE4} > cmake.prov
+sed '1c #!%{__python3}' %{SOURCE5} > cmake.req
+
+%build
+export CFLAGS=`echo %{optflags} | sed 's/-g\b/-s/g'`
+export CXXFLAGS=`echo %{optflags} | sed 's/-g\b/-s/g'`
+export LDFLAGS="%{?__global_ldflags}"
+mkdir build
+pushd build
+../bootstrap --prefix=%{_prefix} --datadir=/share/cmake \
+ --docdir=/share/doc/cmake --mandir=/share/man \
+ --%{?with_bootstrap:no-}system-libs \
+ --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \
+ --no-system-librhash \
+%if %{with sphinx}
+ --sphinx-man --sphinx-html \
+%else
+ --sphinx-build=%{_bindir}/false \
+%endif
+ --qt-gui \
+;
+%make_build VERBOSE=1
+
+%install
+install -d %{buildroot}%{_pkgdocdir}
+%make_install -C build CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir}
+find %{buildroot}%{_datadir}/cmake/Modules -type f | xargs chmod -x
+for f in ccmake cmake cpack ctest;
+do
+ ln -s $f %{buildroot}%{_bindir}/${f}3;
+done
+install -d %{buildroot}%{_datadir}/bash-completion/completions
+for f in %{buildroot}%{_datadir}/cmake/completions/*
+do
+ ln -s ../../cmake/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions
+done
+install -d %{buildroot}%{_emacs_sitelispdir}/cmake
+install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/cmake/cmake-mode.el
+%{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/cmake/cmake-mode.el
+install -d %{buildroot}%{_emacs_sitestartdir}
+install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir}
+install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.cmake
+sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|3|" %{buildroot}%{rpm_macros_dir}/macros.cmake
+touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.cmake
+install -p -m0644 -D %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/fileattrs/cmake.attr
+install -p -m0755 -D cmake.prov %{buildroot}%{_prefix}/lib/rpm/cmake.prov
+install -p -m0755 -D cmake.req %{buildroot}%{_prefix}/lib/rpm/cmake.req
+install -d %{buildroot}%{_libdir}/cmake
+find Source Utilities -type f -iname copy\*
+cp -p Source/kwsys/Copyright.txt ./Copyright_kwsys
+cp -p Utilities/KWIML/Copyright.txt ./Copyright_KWIML
+cp -p Utilities/cmlibarchive/COPYING ./COPYING_cmlibarchive
+cp -p Utilities/cmliblzma/COPYING ./COPYING_cmliblzma
+cp -p Utilities/cmcurl/COPYING ./COPYING_cmcurl
+cp -p Utilities/cmlibrhash/COPYING ./COPYING_cmlibrhash
+cp -p Utilities/cmzlib/Copyright.txt ./Copyright_cmzlib
+cp -p Utilities/cmexpat/COPYING ./COPYING_cmexpat
+install -d %{buildroot}%{_pkgdocdir}
+cp -pr %{buildroot}%{_datadir}/cmake/Help %{buildroot}%{_pkgdocdir}
+
+desktop-file-install --delete-original \
+ --dir=%{buildroot}%{_datadir}/applications \
+ %{buildroot}%{_datadir}/applications/cmake-gui.desktop
+install -d %{buildroot}%{_metainfodir}
+
+find %{buildroot}%{_datadir}/cmake -type d | sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > data_dirs.mf
+find %{buildroot}%{_datadir}/cmake -type f | sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > data_files.mf
+find %{buildroot}%{_libdir}/cmake -type d | sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > lib_dirs.mf
+find %{buildroot}%{_libdir}/cmake -type f | sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > lib_files.mf
+find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \
+ sed -e '/.*-gui$/d' -e '/^$/d' -e 's!^%{buildroot}!"!g' -e 's!$!"!g' >> lib_files.mf
+
+%check
+#cd build
+#export NO_TEST="CMake.FileDownload|CTestTestUpload|curl|RunCMake.CPack_RPM"
+#bin/ctest -V -E "$NO_TEST" %{?_smp_mflags}
+
+%post gui
+update-desktop-database &> /dev/null || :
+touch --no-create %{_datadir}/mime || :
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun gui
+update-desktop-database &> /dev/null || :
+if [ $1 -eq 0 ] ; then
+ touch --no-create %{_datadir}/mime || :
+ update-mime-database %{_datadir}/mime &> /dev/null || :
+ touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans gui
+update-mime-database %{_datadir}/mime &> /dev/null || :
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+%files -f lib_files.mf
+%doc %dir %{_pkgdocdir}
+%license Copyright_* COPYING* Copyright.txt
+
+%files data -f data_files.mf
+%{_datadir}/aclocal/cmake.m4
+%{_datadir}/bash-completion
+%{_emacs_sitelispdir}/cmake
+%{_emacs_sitelispdir}/cmake-mode.el
+%{_emacs_sitestartdir}/cmake-init.el
+%{_datadir}/vim/vimfiles/indent/%{name}.vim
+%{_datadir}/vim/vimfiles//syntax/%{name}.vim
+
+%files filesystem -f data_dirs.mf -f lib_dirs.mf
+
+%files gui
+%{_bindir}/cmake-gui
+%{_datadir}/applications/cmake-gui.desktop
+%{_datadir}/mime/packages
+%{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
+
+%files rpm-macros
+%{rpm_macros_dir}/macros.cmake
+%{_rpmconfigdir}/fileattrs/cmake.attr
+%{_rpmconfigdir}/cmake.prov
+%{_rpmconfigdir}/cmake.req
+
+%files help
+%if %{with sphinx}
+%{_mandir}/man1/ccmake.1.*
+%{_mandir}/man1/cmake.1.*
+%{_mandir}/man1/cpack.1.*
+%{_mandir}/man1/ctest.1.*
+%{_mandir}/man7/*.7.*
+%{_mandir}/man1/cmake-gui.1.*
+%endif
+%doc %{_pkgdocdir}
+%exclude %{_pkgdocdir}/Copyright.txt
+
+%changelog
+* Mon Nov 14 2022 jchzhou <zhoujiacheng@iscas.ac.cn> - 3.24.3-1
+- Update to 3.24.3
+
+* Wed Oct 19 2022 wuzx<wuzx1226@qq.com> - 3.22.0-3
+- add sw64 patch
+
+* Wed Mar 2 2022 wangchen <wangchen137@h-partners.com> - 3.22.0-2
+- Remove rhash-devel from BuildRequires
+
+* Sat Feb 12 2022 wangchen <wangchen137@h-partners.com> - 3.22.0-1
+- Update to 3.22.0
+
+* Tue Jul 20 2021 wangchen <wangchen137@huawei.com> - 3.19.2-3
+- Delete unnecessary gdb from BuildRequires
+
+* Mon Mar 22 2021 lirui <lirui130@huawei.com> - 3.19.2-2
+- Remove the -g option and the debug package
+- add the -s option
+
+* Mon Jan 25 2021 wangchen <wangchen137@huawei.com> - 3.19.2-1
+- Update to 3.19.2
+
+* Sat Aug 29 2020 wangchen <wangchen137@huawei.com> - 3.18.0-3
+- Revert macros.cmake
+
+* Tue Aug 25 2020 wangchen <wangchen137@huawei.com> - 3.18.0-2
+- Modify macros.cmake
+
+* Thu Jul 30 2020 wangchen <wangchen137@huawei.com> - 3.18.0-1
+- Update to cmake-3.18.0
+
+* Mon May 25 2020 licihua <licihua@huawei.com> - 3.17.2-1
+- Update to cmake-3.17.2
+
+* Fri Apr 03 2020 zhouyihang <zhouyihang1@huawei.com> - 3.12.1-6
+- Remove useless scriptlet
+
+* Mon Mar 23 2020 Xiangyang Yu <yuxiangyang4@huawei.com> -3.12.1-5
+- add BuildRequires:gdb to fix src.rpm build error
+
+* Thu Feb 20 2020 lijin Yang <yanglijin@huawei.com> -3.12.1-4
+- make sphinx-build enable
+
+* Wed Jan 22 2020 Yiru Wang <wangyiru1@huawei.com> - 3.12.1-3
+- Disable test
+
+* Fri Nov 29 2019 lijin Yang <yanglijin@huawei.com> - 3.12.1-2
+- init package
diff --git a/macros.cmake b/macros.cmake
new file mode 100644
index 0000000..1768aab
--- /dev/null
+++ b/macros.cmake
@@ -0,0 +1,36 @@
+#
+# Macros for cmake
+#
+%_cmake_lib_suffix64 -DLIB_SUFFIX=64
+%_cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=ON
+%_cmake_version @@CMAKE_VERSION@@
+%__cmake /usr/bin/cmake
+
+# - Set default compile flags
+# - CMAKE_*_FLAGS_RELEASE are added *after* the *FLAGS environment variables
+# and default to -O3 -DNDEBUG. Strip the -O3 so we can override with *FLAGS
+# - Turn on verbose makefiles so we can see and verify compile flags
+# - Set default install prefixes and library install directories
+# - Turn on shared libraries by default
+%cmake \
+ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
+ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
+ FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ; \
+ FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS ; \
+ %{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \
+ %__cmake \\\
+ -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
+ -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
+ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
+ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
+ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
+ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
+ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
+%if "%{?_lib}" == "lib64" \
+ %{?_cmake_lib_suffix64} \\\
+%endif \
+ -DBUILD_SHARED_LIBS:BOOL=ON
+
+%cmake@@CMAKE_MAJOR_VERSION@@ %cmake
diff --git a/sources b/sources
new file mode 100644
index 0000000..7ac67a9
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+9095556a3b268fd88c995d2bb4c90320 cmake-3.26.4.tar.gz