remove cmake_enables_ prefix from options
All options are local and no need to do this monkey job. Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
fe6880366b
commit
deed0a56c7
92
cmake.spec
92
cmake.spec
@ -1,8 +1,8 @@
|
|||||||
# Do we add appdata-files?
|
# Do we add appdata-files?
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
%bcond_without cmake_enables_appdata
|
%bcond_without appdata
|
||||||
%else
|
%else
|
||||||
%bcond_with cmake_enables_appdata
|
%bcond_with appdata
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Set to bcond_without or use --with bootstrap if bootstrapping a new release
|
# Set to bcond_without or use --with bootstrap if bootstrapping a new release
|
||||||
@ -10,42 +10,42 @@
|
|||||||
%bcond_with bootstrap
|
%bcond_with bootstrap
|
||||||
|
|
||||||
# Build with Emacs support
|
# Build with Emacs support
|
||||||
%bcond_without cmake_enables_emacs
|
%bcond_without emacs
|
||||||
|
|
||||||
# Use foreign cmake-filesystem package instead of building it here
|
# Use foreign cmake-filesystem package instead of building it here
|
||||||
%bcond_with cmake_enables_foreign_filesystem
|
%bcond_with foreign_filesystem
|
||||||
|
|
||||||
# Run git tests
|
# Run git tests
|
||||||
%bcond_without cmake_enables_git_test
|
%bcond_without git_test
|
||||||
|
|
||||||
# Set to bcond_with or use --without gui to disable qt4 gui build
|
# Set to bcond_with or use --without gui to disable qt4 gui build
|
||||||
%bcond_without cmake_enables_gui
|
%bcond_without gui
|
||||||
|
|
||||||
# Use ncurses for colorful output
|
# Use ncurses for colorful output
|
||||||
%bcond_without cmake_enables_ncurses
|
%bcond_without ncurses
|
||||||
|
|
||||||
# Setting the Python-version used by default
|
# Setting the Python-version used by default
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||||
%bcond_with cmake_enables_python3
|
%bcond_with python3
|
||||||
%else
|
%else
|
||||||
%bcond_without cmake_enables_python3
|
%bcond_without python3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Enable RPM dependency generators for cmake files written in Python
|
# Enable RPM dependency generators for cmake files written in Python
|
||||||
%bcond_without cmake_enables_rpm
|
%bcond_without rpm
|
||||||
|
|
||||||
# Sphinx-build cannot import CMakeLexer on EPEL <= 6
|
# Sphinx-build cannot import CMakeLexer on EPEL <= 6
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||||
%bcond_with cmake_enables_sphin
|
%bcond_with sphin
|
||||||
%else
|
%else
|
||||||
%bcond_without cmake_enables_sphinx
|
%bcond_without sphinx
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
%bcond_without cmake_enables_test
|
%bcond_without test
|
||||||
|
|
||||||
# Enable X11 tests
|
# Enable X11 tests
|
||||||
%bcond_without cmake_enables_X11_test
|
%bcond_without X11_test
|
||||||
|
|
||||||
# Place rpm-macros into proper location
|
# Place rpm-macros into proper location
|
||||||
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||||
@ -115,19 +115,19 @@ BuildRequires: findutils
|
|||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gcc-gfortran
|
BuildRequires: gcc-gfortran
|
||||||
BuildRequires: sed
|
BuildRequires: sed
|
||||||
%if %{with cmake_enables_git_test}
|
%if %{with git_test}
|
||||||
# Tests fail if only git-core is installed, bug #1488830
|
# Tests fail if only git-core is installed, bug #1488830
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
%else
|
%else
|
||||||
BuildConflicts: git-core
|
BuildConflicts: git-core
|
||||||
%endif
|
%endif
|
||||||
%if %{with cmake_enables_X11_test}
|
%if %{with X11_test}
|
||||||
BuildRequires: libX11-devel
|
BuildRequires: libX11-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with cmake_enables_ncurses}
|
%if %{with ncurses}
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with cmake_enables_sphinx}
|
%if %{with sphinx}
|
||||||
BuildRequires: %{_bindir}/sphinx-build
|
BuildRequires: %{_bindir}/sphinx-build
|
||||||
%endif
|
%endif
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
@ -145,11 +145,11 @@ BuildRequires: rhash-devel
|
|||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with cmake_enables_emacs}
|
%if %{with emacs}
|
||||||
BuildRequires: emacs
|
BuildRequires: emacs
|
||||||
%endif
|
%endif
|
||||||
%if %{with cmake_enables_rpm}
|
%if %{with rpm}
|
||||||
%if %{with cmake_enables_python3}
|
%if %{with python3}
|
||||||
%{!?python3_pkgversion: %global python3_pkgversion 3}
|
%{!?python3_pkgversion: %global python3_pkgversion 3}
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
%else
|
%else
|
||||||
@ -157,7 +157,7 @@ BuildRequires: python2-devel
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
#BuildRequires: xmlrpc-c-devel
|
#BuildRequires: xmlrpc-c-devel
|
||||||
%if %{with cmake_enables_gui}
|
%if %{with gui}
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
BuildRequires: pkgconfig(Qt5)
|
BuildRequires: pkgconfig(Qt5)
|
||||||
%else
|
%else
|
||||||
@ -174,7 +174,7 @@ BuildRequires: %{name}-rpm-macros
|
|||||||
Requires: %{name}-data = %{version}-%{release}
|
Requires: %{name}-data = %{version}-%{release}
|
||||||
Requires: %{name}-rpm-macros = %{version}-%{release}
|
Requires: %{name}-rpm-macros = %{version}-%{release}
|
||||||
|
|
||||||
%if %{with cmake_enables_foreign_filesystem}
|
%if %{with foreign_filesystem}
|
||||||
Requires: %{name}-filesystem%{?_isa}
|
Requires: %{name}-filesystem%{?_isa}
|
||||||
%else
|
%else
|
||||||
Requires: %{name}-filesystem%{?_isa} = %{version}-%{release}
|
Requires: %{name}-filesystem%{?_isa} = %{version}-%{release}
|
||||||
@ -202,13 +202,13 @@ generation, code generation, and template instantiation.
|
|||||||
%package data
|
%package data
|
||||||
Summary: Common data-files for %{name}
|
Summary: Common data-files for %{name}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
%if %{with cmake_enables_foreign_filesystem}
|
%if %{with foreign_filesystem}
|
||||||
Requires: %{name}-filesystem
|
Requires: %{name}-filesystem
|
||||||
%else
|
%else
|
||||||
Requires: %{name}-filesystem = %{version}-%{release}
|
Requires: %{name}-filesystem = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
Requires: %{name}-rpm-macros = %{version}-%{release}
|
Requires: %{name}-rpm-macros = %{version}-%{release}
|
||||||
%if %{with cmake_enables_emacs}
|
%if %{with emacs}
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
|
Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
|
||||||
%endif
|
%endif
|
||||||
@ -228,7 +228,7 @@ BuildArch: noarch
|
|||||||
This package contains documentation for %{name}.
|
This package contains documentation for %{name}.
|
||||||
|
|
||||||
|
|
||||||
%if !%{with cmake_enables_foreign_filesystem}
|
%if !%{with foreign_filesystem}
|
||||||
%package filesystem
|
%package filesystem
|
||||||
Summary: Directories used by CMake modules
|
Summary: Directories used by CMake modules
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ This package owns all directories used by CMake modules.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with cmake_enables_gui}
|
%if %{with gui}
|
||||||
%package gui
|
%package gui
|
||||||
Summary: Qt GUI for %{name}
|
Summary: Qt GUI for %{name}
|
||||||
|
|
||||||
@ -265,8 +265,8 @@ This package contains common RPM macros for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -n %{orig_name}-%{version}%{?versuf} -p 1
|
%autosetup -n %{orig_name}-%{version}%{?versuf} -p 1
|
||||||
|
|
||||||
%if %{with cmake_enables_rpm}
|
%if %{with rpm}
|
||||||
%if %{with cmake_enables_python3}
|
%if %{with python3}
|
||||||
echo '#!%{__python3}' > %{name}.prov
|
echo '#!%{__python3}' > %{name}.prov
|
||||||
echo '#!%{__python3}' > %{name}.req
|
echo '#!%{__python3}' > %{name}.req
|
||||||
%else
|
%else
|
||||||
@ -288,12 +288,12 @@ pushd build
|
|||||||
--docdir=/share/doc/%{name} --mandir=/share/man \
|
--docdir=/share/doc/%{name} --mandir=/share/man \
|
||||||
--%{?with_bootstrap:no-}system-libs \
|
--%{?with_bootstrap:no-}system-libs \
|
||||||
--parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \
|
--parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \
|
||||||
%if %{with cmake_enables_sphinx}
|
%if %{with sphinx}
|
||||||
--sphinx-man --sphinx-html \
|
--sphinx-man --sphinx-html \
|
||||||
%else
|
%else
|
||||||
--sphinx-build=%{_bindir}/false \
|
--sphinx-build=%{_bindir}/false \
|
||||||
%endif
|
%endif
|
||||||
--%{!?with_cmake_enables_gui:no-}qt-gui \
|
--%{!?with_gui:no-}qt-gui \
|
||||||
;
|
;
|
||||||
%make_build VERBOSE=1
|
%make_build VERBOSE=1
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ for f in %{buildroot}%{_datadir}/%{name}/completions/*
|
|||||||
do
|
do
|
||||||
ln -s ../../%{name}/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions
|
ln -s ../../%{name}/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
done
|
done
|
||||||
%if %{with cmake_enables_emacs}
|
%if %{with emacs}
|
||||||
# Install emacs cmake mode
|
# Install emacs cmake mode
|
||||||
mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name}
|
mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name}
|
||||||
install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el
|
install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el
|
||||||
@ -325,7 +325,7 @@ install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir}
|
|||||||
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}|" -e "s|@@CMAKE_MAJOR_VERSION@@|%{major_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 %{with cmake_enables_rpm} && 0%{?_rpmconfigdir:1}
|
%if %{with rpm} && 0%{?_rpmconfigdir:1}
|
||||||
# RPM auto provides
|
# RPM auto provides
|
||||||
install -p -m0644 -D %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/fileattrs/%{name}.attr
|
install -p -m0644 -D %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/fileattrs/%{name}.attr
|
||||||
install -p -m0755 -D %{name}.prov %{buildroot}%{_prefix}/lib/rpm/%{name}.prov
|
install -p -m0755 -D %{name}.prov %{buildroot}%{_prefix}/lib/rpm/%{name}.prov
|
||||||
@ -341,7 +341,7 @@ do
|
|||||||
cp -p $f ./${fname}_${dname}
|
cp -p $f ./${fname}_${dname}
|
||||||
done
|
done
|
||||||
# Cleanup pre-installed documentation
|
# Cleanup pre-installed documentation
|
||||||
%if %{with cmake_enables_sphinx}
|
%if %{with sphinx}
|
||||||
mv %{buildroot}%{_docdir}/%{name}/html .
|
mv %{buildroot}%{_docdir}/%{name}/html .
|
||||||
%endif
|
%endif
|
||||||
rm -rf %{buildroot}%{_docdir}/%{name}
|
rm -rf %{buildroot}%{_docdir}/%{name}
|
||||||
@ -349,17 +349,17 @@ rm -rf %{buildroot}%{_docdir}/%{name}
|
|||||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||||
cp -pr %{buildroot}%{_datadir}/%{name}/Help %{buildroot}%{_pkgdocdir}
|
cp -pr %{buildroot}%{_datadir}/%{name}/Help %{buildroot}%{_pkgdocdir}
|
||||||
mv %{buildroot}%{_pkgdocdir}/Help %{buildroot}%{_pkgdocdir}/rst
|
mv %{buildroot}%{_pkgdocdir}/Help %{buildroot}%{_pkgdocdir}/rst
|
||||||
%if %{with cmake_enables_sphinx}
|
%if %{with sphinx}
|
||||||
mv html %{buildroot}%{_pkgdocdir}
|
mv html %{buildroot}%{_pkgdocdir}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with cmake_enables_gui}
|
%if %{with gui}
|
||||||
# Desktop file
|
# Desktop file
|
||||||
desktop-file-install --delete-original \
|
desktop-file-install --delete-original \
|
||||||
--dir=%{buildroot}%{_datadir}/applications \
|
--dir=%{buildroot}%{_datadir}/applications \
|
||||||
%{buildroot}%{_datadir}/applications/%{name}-gui.desktop
|
%{buildroot}%{_datadir}/applications/%{name}-gui.desktop
|
||||||
|
|
||||||
%if %{with cmake_enables_appdata}
|
%if %{with appdata}
|
||||||
# Register as an application to be visible in the software center
|
# Register as an application to be visible in the software center
|
||||||
#
|
#
|
||||||
# NOTE: It would be *awesome* if this file was maintained by the upstream
|
# NOTE: It would be *awesome* if this file was maintained by the upstream
|
||||||
@ -412,7 +412,7 @@ 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
|
sed -e '/.*-gui$/d' -e '/^$/d' -e 's!^%{buildroot}!"!g' -e 's!$!"!g' >> lib_files.mf
|
||||||
|
|
||||||
|
|
||||||
%if %{with cmake_enables_test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||||
mv -f Modules/FindLibArchive.cmake Modules/FindLibArchive.disabled
|
mv -f Modules/FindLibArchive.cmake Modules/FindLibArchive.disabled
|
||||||
@ -434,7 +434,7 @@ mv -f Modules/FindLibArchive.disabled Modules/FindLibArchive.cmake
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with cmake_enables_gui}
|
%if %{with gui}
|
||||||
%post gui
|
%post gui
|
||||||
update-desktop-database &> /dev/null || :
|
update-desktop-database &> /dev/null || :
|
||||||
/bin/touch --no-create %{_datadir}/mime || :
|
/bin/touch --no-create %{_datadir}/mime || :
|
||||||
@ -459,7 +459,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
%doc %dir %{_pkgdocdir}
|
%doc %dir %{_pkgdocdir}
|
||||||
%license Copyright.txt*
|
%license Copyright.txt*
|
||||||
%license COPYING*
|
%license COPYING*
|
||||||
%if %{with cmake_enables_sphinx}
|
%if %{with sphinx}
|
||||||
%{_mandir}/man1/c%{name}.1.*
|
%{_mandir}/man1/c%{name}.1.*
|
||||||
%{_mandir}/man1/%{name}.1.*
|
%{_mandir}/man1/%{name}.1.*
|
||||||
%{_mandir}/man1/cpack%{?name_suffix}.1.*
|
%{_mandir}/man1/cpack%{?name_suffix}.1.*
|
||||||
@ -471,7 +471,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
%files data -f data_files.mf
|
%files data -f data_files.mf
|
||||||
%{_datadir}/aclocal/%{name}.m4
|
%{_datadir}/aclocal/%{name}.m4
|
||||||
%{_datadir}/bash-completion
|
%{_datadir}/bash-completion
|
||||||
%if %{with cmake_enables_emacs}
|
%if %{with emacs}
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
%{_emacs_sitelispdir}/%{name}
|
%{_emacs_sitelispdir}/%{name}
|
||||||
%{_emacs_sitestartdir}/%{name}-init.el
|
%{_emacs_sitestartdir}/%{name}-init.el
|
||||||
@ -489,21 +489,21 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
%doc %{_pkgdocdir}
|
%doc %{_pkgdocdir}
|
||||||
|
|
||||||
|
|
||||||
%if !%{with cmake_enables_foreign_filesystem}
|
%if !%{with foreign_filesystem}
|
||||||
%files filesystem -f data_dirs.mf -f lib_dirs.mf
|
%files filesystem -f data_dirs.mf -f lib_dirs.mf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with cmake_enables_gui}
|
%if %{with gui}
|
||||||
%files gui
|
%files gui
|
||||||
%{_bindir}/%{name}-gui
|
%{_bindir}/%{name}-gui
|
||||||
%if %{with cmake_enables_appdata}
|
%if %{with appdata}
|
||||||
%{_datadir}/appdata/*.appdata.xml
|
%{_datadir}/appdata/*.appdata.xml
|
||||||
%endif
|
%endif
|
||||||
%{_datadir}/applications/%{name}-gui.desktop
|
%{_datadir}/applications/%{name}-gui.desktop
|
||||||
%{_datadir}/mime/packages
|
%{_datadir}/mime/packages
|
||||||
%{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
|
%{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
|
||||||
%if %{with cmake_enables_sphinx}
|
%if %{with sphinx}
|
||||||
%{_mandir}/man1/%{name}-gui.1.*
|
%{_mandir}/man1/%{name}-gui.1.*
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -511,7 +511,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
|
|
||||||
%files rpm-macros
|
%files rpm-macros
|
||||||
%{rpm_macros_dir}/macros.%{name}
|
%{rpm_macros_dir}/macros.%{name}
|
||||||
%if %{with cmake_enables_rpm} && 0%{?_rpmconfigdir:1}
|
%if %{with rpm} && 0%{?_rpmconfigdir:1}
|
||||||
%{_rpmconfigdir}/fileattrs/%{name}.attr
|
%{_rpmconfigdir}/fileattrs/%{name}.attr
|
||||||
%{_rpmconfigdir}/%{name}.prov
|
%{_rpmconfigdir}/%{name}.prov
|
||||||
%{_rpmconfigdir}/%{name}.req
|
%{_rpmconfigdir}/%{name}.req
|
||||||
|
Loading…
Reference in New Issue
Block a user