diff --git a/.gitignore b/.gitignore index 0d20a0b..0bfe337 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /python-copr-common-0.2.tar.gz +/python-copr-common-0.5.git.1.4586fcbd.tar.gz diff --git a/python-copr-common.spec b/python-copr-common.spec index 22083fe..e5d8ff1 100644 --- a/python-copr-common.spec +++ b/python-copr-common.spec @@ -1,44 +1,44 @@ + %global srcname copr-common -%if 0%{?rhel} < 7 && 0%{?rhel} > 0 +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?_licensedir:%global license %%doc} %global _pkgdocdir %{_docdir}/%{name}-%{version} -%global __python2 %{__python} %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 +%if 0%{?fedora} || 0%{?rhel} > 7 %global with_python3 1 -%else -%global with_python3 0 %endif -%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 -%global with_python2 0 -%else +%if 0%{?fedora} < 28 || 0%{?rhel} && 0%{?rhel} <= 7 %global with_python2 1 %endif -Name: python-%{srcname} -Version: 0.2 -Release: 4%{?dist} +Name: python-copr-common +Version: 0.5.git.1.4586fcbd +Release: 1%{?dist} Summary: Python code used by Copr License: GPLv2+ URL: https://pagure.io/copr/copr # Source is created by # git clone https://pagure.io/copr/copr.git +# git checkout python-copr-common-0.5.git.1.4586fcbd # cd copr/common -# tito build --tgz -Source0: %{name}-%{version}.tar.gz +# rpkg spec --sources +Source0: python-copr-common-0.5.git.1.4586fcbd.tar.gz BuildArch: noarch -%if 0%{?with_python2} +%if %{with python2} BuildRequires: python2-devel -%endif # with_python2 +BuildRequires: python-setuptools +%endif -%if 0%{?with_python3} +%if %{with python3} BuildRequires: python3-devel -%endif # with_python3 +BuildRequires: python3-setuptools +%endif %global _description\ COPR is lightweight build system. It allows you to create new project in WebUI,\ @@ -50,63 +50,75 @@ useful for developers only.\ %description %_description -%if 0%{?with_python2} + +%if %{with python2} %package -n python2-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} %_description -%endif # with_python2 +%endif + -%if 0%{?with_python3} +%if %{with python3} %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %_description -%endif # with_python3 +%endif -%prep -rm -rf *.pyc *.pyo +%prep %setup -q + + %build -%if 0%{?with_python3} -%py3_build -%endif # with_python3 +%if %{with python3} +version="%version" %py3_build +%endif + +%if %{with python2} +version="%version" %py2_build +%endif -%if 0%{?with_python2} -%py2_build -%endif # with_python2 %install -%if 0%{?with_python2} -%py2_install -%endif # with_python2 +%if %{with python3} +version=%version %py3_install +%endif + +%if %{with python2} +version=%version %py2_install +%endif -%if 0%{?with_python3} -%py3_install -%endif # with_python3 -%if 0%{?with_python3} +%if %{with python3} %files -n python3-%{srcname} %license LICENSE %{python3_sitelib}/* -%endif # with_python3 +%endif -%if 0%{?with_python2} + +%if %{with python2} %files -n python2-%{srcname} %license LICENSE %{python2_sitelib}/* -%endif # with_python2 - -%changelog -* Sat Feb 02 2019 Fedora Release Engineering - 0.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild +%endif -* Fri Jul 13 2018 Fedora Release Engineering - 0.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild -* Tue Jun 19 2018 Miro Hrončok - 0.2-2 -- Rebuilt for Python 3.7 +%changelog +* Mon Feb 11 2019 Jakub Kadlčík 0.5-1 +- Add splitFilename function + +* Fri Oct 19 2018 Miroslav Suchý 0.4-1 +- sync common.BuildSourceEnum with helpers.BuildSourceEnum +- use git_dir_archive instead of git_dir_pack +- packaging: Python 2/3, RHEL/Fedora fixes + +* Mon Aug 06 2018 clime 0.3-1 +- %%{python_sitelib} → %%{python2_sitelib} +- fix git packing for python-copr, copr-common +- fix reading spec file values from setup.py +- rpkg deployment into COPR * Thu Mar 22 2018 Dominik Turecek 0.2-1 - [common] fix spec file diff --git a/sources b/sources index d226def..7f3787b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-copr-common-0.2.tar.gz) = c24609a687ceda4db5e01e384ff2645b2d9fab189e2768eb469576a02b63d3604b4225e404f44d68cc6e1c032c664907663874916c183a0a2b6fe43d0fea68c4 +SHA512 (python-copr-common-0.5.git.1.4586fcbd.tar.gz) = 771d6e5f62ec9105109fbba3a4dd787fdb2f8d1390c19354dcf4dad5dbcf6ac6dd79d0527f86e117e14616722654c64ab6adab925e4178be4940c7b8640f7912