File cmake.spec of Package cmake
#
# spec file for package cmake
#
Name: cmake
Summary: Cross-platform, open-source make system
Version: 3.30.4
Release: 1
Url: http://www.cmake.org/
License: BSD-3-Clause
Group: Development/Tools/Building
Source0: http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz
Source1: cmake.macros
Source2: opensuse_rules.cmake
Patch2: cmake-fix-ruby-test.patch
# PATCH-FIX-UPSTREAM fix-check-for-freetype251.patch -- http://www.cmake.org/Bug/view.php?id=13959, http://www.cmake.org/Bug/view.php?id=14601
Patch3: fix-check-for-freetype251.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1100
BuildRequires: -post-build-checks
%endif
%if 0%{?suse_version}
%if 0%{?suse_version} > 1010
BuildRequires: fdupes
%endif
%if 0%{?sles_version} != 10
BuildRequires: libarchive-devel
%endif
BuildRequires: libexpat-devel
%else
BuildRequires: expat-devel
%endif
BuildRequires: curl-devel
BuildRequires: gcc-c++
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: zlib-devel
Requires: make
%description
CMake is a cross-platform, open-source make system
%prep
%setup -q -n %{name}-%{version}
#%patch2
#%patch3 -p1
%build
export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$CXXFLAGS"
./configure \
--prefix=%{_prefix} \
--datadir=/share/%{name} \
--docdir=/share/doc/packages/%{name} \
--mandir=/share/man \
%if 0%{?suse_version} && !0%{?sles_version}
--system-libs \
%else
--system-curl \
--system-expat \
--system-zlib \
--system-bzip2 \
--no-system-libarchive \
%endif
--parallel=0%jobs \
--no-qt-gui
make VERBOSE=1 %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}%{_libdir}/cmake
find %{buildroot}/usr/share/cmake -type f -print0 | xargs -0 chmod 644
# rpm macros
install -m644 %{SOURCE1} -D %{buildroot}%{_sysconfdir}/rpm/macros.cmake
# buildrules
install -m644 %{SOURCE2} -D %{buildroot}%{_datadir}/cmake/Modules/opensuse_rules.cmake
sed -i \
-e 's:OPTFLAGS:%{optflags}:g' \
%{buildroot}%{_datadir}/cmake/Modules/opensuse_rules.cmake
%if 0%{?suse_version} > 1010
%fdupes %{buildroot}/usr/share/cmake
%endif
%files
%defattr(-,root,root)
%{_sysconfdir}/rpm/macros.cmake
%{_bindir}/cpack
%{_bindir}/cmake
%{_bindir}/ctest
%{_bindir}/ccmake
%{_datadir}/cmake
%{_datadir}/bash-completion
%{_datadir}/emacs
%{_datadir}/vim
%{_libdir}/cmake
%{_datadir}/aclocal/cmake.m4
%doc %{_datadir}/doc/packages/%{name}
%changelog
* Mon Oct 07 2024 Dennis Hampe <dennis.hampe@bertelsmann.de>
- use version 3.30.4
* Fri Sep 04 2020 Dennis Hampe <dennis.hampe@bertelsmann.de>
- use version 3.0.2
* Thu Jan 23 2014 Holger Manthey <holger.manthey@bertelsmann.de>
- inital version