Cleanup spec file conditionals
This commit is contained in:
parent
4f0bbce777
commit
88274670e9
@ -1,11 +1,14 @@
|
|||||||
%global upstream_name Pygments
|
%global upstream_name Pygments
|
||||||
%global srcname pygments
|
%global srcname pygments
|
||||||
%global sum Syntax highlighting engine written in Python
|
%global sum Syntax highlighting engine written in Python
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
|
%global with_python3 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
Name: python-pygments
|
Name: python-pygments
|
||||||
Version: 2.2.0
|
Version: 2.2.0
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -51,8 +54,7 @@ need to prettify source code. Highlights are:
|
|||||||
* it is usable as a command-line tool and as a library
|
* it is usable as a command-line tool and as a library
|
||||||
* ... and it highlights even Brainf*ck!
|
* ... and it highlights even Brainf*ck!
|
||||||
|
|
||||||
# python3 packages are only built on Fedora
|
%if 0%{?with_python3}
|
||||||
%if 0%{?fedora}
|
|
||||||
%package -n python3-%{srcname}
|
%package -n python3-%{srcname}
|
||||||
BuildRequires: python3-devel, python3-setuptools, python3-nose
|
BuildRequires: python3-devel, python3-setuptools, python3-nose
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
@ -81,8 +83,7 @@ need to prettify source code. Highlights are:
|
|||||||
%{__sed} -i 's/\r//' LICENSE
|
%{__sed} -i 's/\r//' LICENSE
|
||||||
%py2_build
|
%py2_build
|
||||||
|
|
||||||
# python3 packages are only built on Fedora
|
%if 0%{?with_python3}
|
||||||
%if 0%{?fedora}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -97,8 +98,7 @@ mv pygmentize.1 $RPM_BUILD_ROOT%{_mandir}/man1/pygmentize.1
|
|||||||
popd
|
popd
|
||||||
cp -r doc/docs doc/reST
|
cp -r doc/docs doc/reST
|
||||||
|
|
||||||
# python3 packages are only built on Fedora
|
%if 0%{?with_python3}
|
||||||
%if 0%{?fedora}
|
|
||||||
# Python 3 install
|
# Python 3 install
|
||||||
%py3_install
|
%py3_install
|
||||||
%endif
|
%endif
|
||||||
@ -113,13 +113,12 @@ make test || :
|
|||||||
# For noarch packages: sitelib
|
# For noarch packages: sitelib
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
# Fix build on EL7
|
# Fix build on EL7
|
||||||
%if !0%{?fedora}
|
%if !0%{?fedora} && 0%{?rhel} <= 7
|
||||||
%{_bindir}/pygmentize
|
%{_bindir}/pygmentize
|
||||||
%lang(en) %{_mandir}/man1/pygmentize.1*
|
%lang(en) %{_mandir}/man1/pygmentize.1*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# python3 packages are only built on Fedora
|
%if 0%{?with_python3}
|
||||||
%if 0%{?fedora}
|
|
||||||
%files -n python3-pygments
|
%files -n python3-pygments
|
||||||
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
|
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -129,6 +128,9 @@ make test || :
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 2.2.0-9
|
||||||
|
- Cleanup spec file conditionals
|
||||||
|
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-8
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-8
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user