File cmake.spec of Package cmake

%define name	cmake
%define version	3.27.4
%define release	38.1

%define _prefix	/usr

%if %{defined fedora}
%global debug_package %{nil}
%endif

Summary:	Cross-platform make system
Group:		Development/Libraries/C and C++
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	BSD-3-Clause
Source0:	%{name}-%{version}.tar.gz
Source1:    cmake.macros
URL:		https://www.cmake.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
Packager:	rncbc.org
Provides:	%{name}-full
Obsoletes:	%{name}-full <= %{version}, %{name} <= %{version}

BuildRequires:	coreutils
BuildRequires:	pkgconfig
BuildRequires:	gcc-c++
BuildRequires:	openssl-devel
BuildRequires:	fdupes

%description
CMake is a cross-platform build system.

%prep
%setup -q

%build
./bootstrap --prefix=%{_prefix} \
 --docdir=/share/doc/%{name} \
 --mandir=/share/man \
 --no-system-libs \
 --no-qt-gui \
 --parallel=0%{jobs}
%__make

%install
%__make DESTDIR="%{buildroot}" install
%fdupes %{buildroot}%{_datadir}

%if !0%{?mageia}
install -m644 %{SOURCE1} -D %{buildroot}%{_rpmconfigdir}/macros.d/macros.cmake
%endif

%clean
[ -d "%{buildroot}" -a "%{buildroot}" != "/" ] && %__rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_bindir}/cpack
%{_bindir}/cmake
%{_bindir}/ctest
%if 0%{?mageia}
%{_bindir}/ccmake
%endif
%dir %{_datadir}/cmake*
%{_datadir}/cmake*
#dir %{_datadir}/doc
%dir %{_datadir}/doc/cmake
%{_datadir}/doc/cmake/*
%dir %{_datadir}/{vim,emacs,aclocal,bash-completion}
%dir %{_datadir}/vim
%dir %{_datadir}/vim/vimfiles
%dir %{_datadir}/vim/vimfiles/indent
%{_datadir}/vim/vimfiles/indent/*
%dir %{_datadir}/vim/vimfiles/syntax
%{_datadir}/vim/vimfiles/syntax/*
%dir %{_datadir}/emacs
%dir %{_datadir}/emacs/site-lisp
%{_datadir}/emacs/site-lisp/*
%dir %{_datadir}/aclocal
%{_datadir}/aclocal/*
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/{cmake,cpack,ctest}
%if !0%{?mageia}
%{_rpmconfigdir}/macros.d/macros.cmake
%endif

%changelog
* Tue Sep 21 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.21.3-15.1
- OBS Snapshot (cmake-3.21.3-15.1).
* Fri Aug 27 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.21.2-14.1
- OBS Snapshot (cmake-3.21.2-14.1).
* Wed Jul 28 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.21.1-13.1
- OBS Snapshot (cmake-3.21.1-13.1).
* Sun Jul 18 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.21.0-12.1
- OBS Snapshot (cmake-3.21.0-12.1).
* Wed Jun 23 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.20.5-11.1
- OBS Snapshot (cmake-3.20.5-11.1).
* Thu Jun 15 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.20.4-10.1
- OBS Snapshot (cmake-3.20.4-10.1).
* Thu May 27 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.20.3-9.1
- OBS Snapshot (cmake-3.20.3-9.1).
* Fri Apr 30 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.20.2-8
- OBS Snapshot (cmake-3.20.2-8).
* Fri Apr  9 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.20.1-7
- OBS Snapshot (cmake-3.20.1-7).
* Thu Mar 25 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.20.0-6
- OBS Snapshot (cmake-3.20.0-6).
* Wed Mar 17 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.19.7-5
- OBS Snapshot (cmake-3.19.7-5).
* Fri Mar 12 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.19.6-4
- OBS Snapshot (cmake-3.19.6-4).
* Sat Feb 20 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.19.5-3
- OBS Snapshot (cmake-3.19.5-3).
* Tue Feb 16 2021 Rui Nuno Capela <rncbc@rncbc.org> 3.19.5-1
- OBS Snapshot (cmake-3.19.5-1).
openSUSE Build Service is sponsored by