Ship symlinks to binaries with major version in name
- Provide %cmakeX macro, where X is cmake major version
This commit is contained in:
parent
f6068065ea
commit
3bac96b089
28
cmake.spec
28
cmake.spec
@ -6,14 +6,14 @@
|
|||||||
%bcond_without gui
|
%bcond_without gui
|
||||||
|
|
||||||
# Setting the Python-version used by default
|
# Setting the Python-version used by default
|
||||||
%if ( 0%{?fedora} && 0%{?fedora} < 23 ) || ( 0%{?rhel} && 0%{?rhel} < 8 )
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||||
%bcond_with python3
|
%bcond_with python3
|
||||||
%else
|
%else
|
||||||
%bcond_without python3
|
%bcond_without python3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Do we add appdata-files?
|
# Do we add appdata-files?
|
||||||
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
%bcond_without appdata
|
%bcond_without appdata
|
||||||
%else
|
%else
|
||||||
%bcond_with appdata
|
%bcond_with appdata
|
||||||
@ -32,15 +32,17 @@
|
|||||||
# Setup _pkgdocdir if not defined already
|
# Setup _pkgdocdir if not defined already
|
||||||
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||||
|
|
||||||
|
%global major_version 3
|
||||||
|
%global minor_version 6
|
||||||
# Set to RC version if building RC, else %{nil}
|
# Set to RC version if building RC, else %{nil}
|
||||||
#global rcver rc1
|
#global rcver rc1
|
||||||
|
|
||||||
# Uncomment if building for EPEL
|
# Uncomment if building for EPEL
|
||||||
#global name_suffix 3
|
#global name_suffix %{major_version}
|
||||||
%global orig_name cmake
|
%global orig_name cmake
|
||||||
|
|
||||||
Name: %{orig_name}%{?name_suffix}
|
Name: %{orig_name}%{?name_suffix}
|
||||||
Version: 3.6.1
|
Version: %{major_version}.%{minor_version}.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Cross-platform make system
|
Summary: Cross-platform make system
|
||||||
|
|
||||||
@ -51,7 +53,7 @@ Summary: Cross-platform make system
|
|||||||
# exception granting redistribution under terms of your choice
|
# exception granting redistribution under terms of your choice
|
||||||
License: BSD and MIT and zlib
|
License: BSD and MIT and zlib
|
||||||
URL: http://www.cmake.org
|
URL: http://www.cmake.org
|
||||||
Source0: http://www.cmake.org/files/v3.6/%{orig_name}-%{version}%{?rcver:-%rcver}.tar.gz
|
Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{orig_name}-%{version}%{?rcver:-%rcver}.tar.gz
|
||||||
Source1: %{name}-init.el
|
Source1: %{name}-init.el
|
||||||
Source2: macros.%{name}
|
Source2: macros.%{name}
|
||||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1202899
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=1202899
|
||||||
@ -98,7 +100,7 @@ BuildRequires: python2-devel
|
|||||||
#BuildRequires: xmlrpc-c-devel
|
#BuildRequires: xmlrpc-c-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with gui}
|
%if %{with gui}
|
||||||
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
BuildRequires: pkgconfig(Qt5)
|
BuildRequires: pkgconfig(Qt5)
|
||||||
%else
|
%else
|
||||||
BuildRequires: qt-devel
|
BuildRequires: qt-devel
|
||||||
@ -117,6 +119,8 @@ Provides: bundled(md5-deutsch)
|
|||||||
# https://fedorahosted.org/fpc/ticket/555
|
# https://fedorahosted.org/fpc/ticket/555
|
||||||
Provides: bundled(kwsys)
|
Provides: bundled(kwsys)
|
||||||
|
|
||||||
|
%{?name_suffix:Provides: %{orig_name} = %{version}}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
CMake is used to control the software compilation process using simple
|
CMake is used to control the software compilation process using simple
|
||||||
platform and compiler independent configuration files. CMake generates
|
platform and compiler independent configuration files. CMake generates
|
||||||
@ -204,6 +208,8 @@ find %{buildroot}/%{_datadir}/%{name}/Modules -type f | xargs chmod -x
|
|||||||
echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" &&
|
echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" &&
|
||||||
exit 1
|
exit 1
|
||||||
popd
|
popd
|
||||||
|
# Install major_version name links
|
||||||
|
%{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s $f %{buildroot}%{_bindir}/${f}%{major_version}; done}
|
||||||
# Install bash completion symlinks
|
# Install bash completion symlinks
|
||||||
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
for f in %{buildroot}%{_datadir}/%{name}/completions/*
|
for f in %{buildroot}%{_datadir}/%{name}/completions/*
|
||||||
@ -218,7 +224,7 @@ mkdir -p %{buildroot}%{_emacs_sitestartdir}
|
|||||||
install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir}/
|
install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir}/
|
||||||
# RPM macros
|
# RPM macros
|
||||||
install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
||||||
sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|%{major_version}|" %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
||||||
touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name}
|
||||||
%if 0%{?_rpmconfigdir:1}
|
%if 0%{?_rpmconfigdir:1}
|
||||||
# RPM auto provides
|
# RPM auto provides
|
||||||
@ -327,9 +333,13 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
%license Copyright.txt*
|
%license Copyright.txt*
|
||||||
%license COPYING*
|
%license COPYING*
|
||||||
%{_bindir}/c%{name}
|
%{_bindir}/c%{name}
|
||||||
|
%{!?name_suffix:%{_bindir}/c%{name}%{major_version}}
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
|
%{!?name_suffix:%{_bindir}/%{name}%{major_version}}
|
||||||
%{_bindir}/cpack%{?name_suffix}
|
%{_bindir}/cpack%{?name_suffix}
|
||||||
|
%{!?name_suffix:%{_bindir}/cpack%{major_version}}
|
||||||
%{_bindir}/ctest%{?name_suffix}
|
%{_bindir}/ctest%{?name_suffix}
|
||||||
|
%{!?name_suffix:%{_bindir}/ctest%{major_version}}
|
||||||
%if 0%{?with_sphinx:1}
|
%if 0%{?with_sphinx:1}
|
||||||
%{_mandir}/man1/c%{name}.1.*
|
%{_mandir}/man1/c%{name}.1.*
|
||||||
%{_mandir}/man1/%{name}.1.*
|
%{_mandir}/man1/%{name}.1.*
|
||||||
@ -381,6 +391,10 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 16 2016 Orion Poplawski <orion@cora.nwra.com> - 3.6.1-2
|
||||||
|
- Ship symlinks to binaries with major version in name
|
||||||
|
- Provide %%cmakeX macro, where X is cmake major version
|
||||||
|
|
||||||
* Mon Jul 25 2016 Orion Poplawski <orion@cora.nwra.com> - 3.6.1-1
|
* Mon Jul 25 2016 Orion Poplawski <orion@cora.nwra.com> - 3.6.1-1
|
||||||
- Update to 3.6.1
|
- Update to 3.6.1
|
||||||
|
|
||||||
|
@ -32,3 +32,5 @@
|
|||||||
%{?_cmake_lib_suffix64} \\\
|
%{?_cmake_lib_suffix64} \\\
|
||||||
%endif \
|
%endif \
|
||||||
-DBUILD_SHARED_LIBS:BOOL=ON
|
-DBUILD_SHARED_LIBS:BOOL=ON
|
||||||
|
|
||||||
|
%cmake@@CMAKE_MAJOR_VERSION@@ %cmake
|
||||||
|
Loading…
Reference in New Issue
Block a user