diff --git a/.gitignore b/.gitignore index e69de29..0309162 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/cvss-1.3.tar.gz diff --git a/python-cvss.spec b/python-cvss.spec new file mode 100644 index 0000000..6e2372a --- /dev/null +++ b/python-cvss.spec @@ -0,0 +1,86 @@ +%global srcname cvss +%global summary CVSS2/3 library with interactive calculator + +Name: python-%{srcname} +Version: 1.3 +Release: 1%{?dist} +Summary: %{summary} + +License: GPLv3+ +URL: https://github.com/skontar/cvss +Source0: https://github.com/skontar/cvss/archive/v%{version}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python3-devel +BuildRequires: python2-setuptools +BuildRequires: python3-setuptools + + +%description +This Python package contains CVSS v2 and v3 computation utilities and +interactive calculator compatible with both Python v2 and v3. + +%package -n python2-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{name}} + +%description -n python2-%{srcname} +This Python package contains CVSS v2 and v3 computation utilities and +interactive calculator compatible with Python v2. + +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} +This python package contains CVSS v2 and v3 computation utilities and +interactive calculator compatible with Python v3. + +%prep +%setup -q -n %{srcname}-%{version} + +%build +%py2_build +%py3_build + + +%install +%py2_install +%py3_install +sed -i '/^#!.*bin/ d' $RPM_BUILD_ROOT/%{python2_sitelib}/cvss/cvss_calculator.py + +%check +%{__python2} setup.py test +%{__python3} setup.py test + + +%files -n python2-%{srcname} +%license LICENSE +%doc README.rst +%{python2_sitelib}/cvss* + + +%files -n python3-%{srcname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/cvss* +%{_bindir}/cvss_calculator + + +%changelog +* Wed Aug 24 2016 pjp - 1.3-1 +- Update to new release. + +* Wed Aug 17 2016 pjp - 1.2-4 +- Updated Source0 URL BZ#1334611#c6. + +* Wed Aug 17 2016 pjp - 1.2-3 +- Added BuildRequires and summary macro as per BZ#1334611#c4. + +* Wed Aug 17 2016 pjp - 1.2-2 +- Separated Python v2 and v3 builds in respective packages as + suggested in BZ#1334611#c1. + +* Tue May 10 2016 pjp - 1.2-1 +- Initial build of Python cvss package. diff --git a/sources b/sources index e69de29..1c9c807 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +23e96368900e447540901c20ac3ab76e cvss-1.3.tar.gz