From a5405b8814600fbadff9a654ab3487fc028eded3 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: May 20 2016 18:41:21 +0000 Subject: Setting srcname variable --- diff --git a/python-PyPDF2.spec b/python-PyPDF2.spec index e854ec4..622000b 100644 --- a/python-PyPDF2.spec +++ b/python-PyPDF2.spec @@ -1,13 +1,14 @@ +%global srcname PyPDF2 %global with_python3 1 %global sum Python PDF toolkit and library -Name: python-PyPDF2 +Name: python-%{srcname} Version: 1.25.1 Release: 11%{?dist} License: BSD Summary: %{sum} Group: Development/Libraries -Source: https://pypi.python.org/packages/source/P/PyPDF2/PyPDF2-%{version}.tar.gz +Source: https://pypi.python.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz URL: https://github.com/mstamy2/PyPDF2 BuildArch: noarch @@ -28,16 +29,15 @@ dependencies on external libraries. It can also work entirely on StringIO objects rather than file streams, allowing for PDF manipulation in memory. It is therefore a useful tool for websites that manage or manipulate PDFs. -%package -n python2-PyPDF2 +%package -n python2-%{srcname} Summary: %{sum} BuildRequires: python2-devel BuildRequires: python-libs -Obsoletes: python-PyPDF2 <= 1.25.1-6 -Provides: python-PyPDF2 -%{?python_provide:%python_provide python2-PyPDF2} +Obsoletes: python-%{srcname} <= 1.25.1-6 +%{?python_provide:%python_provide python2-%{srcname}} -%description -n python2-PyPDF2 +%description -n python2-%{srcname} A pure Python library built as a PDF toolkit. It is capable of: - extracting document information (title, author, ...), @@ -52,14 +52,14 @@ dependencies on external libraries. It can also work entirely on StringIO objects rather than file streams, allowing for PDF manipulation in memory. It is therefore a useful tool for websites that manage or manipulate PDFs. -%package -n python3-PyPDF2 +%package -n python3-%{srcname} Summary: %{sum} BuildRequires: python3-devel BuildRequires: python-libs -%{?python_provide:%python_provide python3-PyPDF2} +%{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-PyPDF2 +%description -n python3-%{srcname} A pure Python library built as a PDF toolkit. It is capable of: - extracting document information (title, author, ...), @@ -74,14 +74,14 @@ dependencies on external libraries. It can also work entirely on StringIO objects rather than file streams, allowing for PDF manipulation in memory. It is therefore a useful tool for websites that manage or manipulate PDFs. -%package -n python-PyPDF2-doc -Summary: Documentation for python-PyPDF2 +%package -n python-%{srcname}-doc +Summary: Documentation for python-%{srcname} -%description -n python-PyPDF2-doc +%description -n python-%{srcname}-doc python-PyPDF2 contains documentation and examples for the python-PyPDF package %prep -%autosetup -n PyPDF2-%{version} +%autosetup -n %{srcname}-%{version} # non-executable script sed -i -e '/^#!\//, 1d' PyPDF2/pagerange.py @@ -105,21 +105,25 @@ chmod a-x Scripts/* Sample_Code/* LICENSE README.md CHANGELOG #python -m unittest Tests.tests -%files -n python2-PyPDF2 +%files -n python2-%{srcname} %defattr(-,root,root,-) %{python2_sitelib}/* %license LICENSE -%files -n python3-PyPDF2 +%files -n python3-%{srcname} %defattr(-,root,root,-) %{python3_sitelib}/* %license LICENSE -%files -n python-PyPDF2-doc +%files -n python-%{srcname}-doc %doc README.md CHANGELOG Scripts/ Sample_Code/ %license LICENSE %changelog +* Fri May 20 2016 Major Hayden - 1.25.1-12 +- Setting srcname variable so python_provide works properly +- Removing Provides tag + * Fri May 20 2016 Major Hayden - 1.25.1-11 - Adding Provides tag to fix dependency problems