Igor Gnatenko e23b6ac
%global modname rpmfluff
e9e2dbe
Igor Gnatenko e23b6ac
Name:          python-%{modname}
544ff92
Version:       0.5.6
Igor Gnatenko e23b6ac
Release:       1%{?dist}
e9e2dbe
Summary:       Lightweight way of building RPMs, and sabotaging them
e9e2dbe
Igor Gnatenko e23b6ac
License:       GPLv2+
Igor Gnatenko e23b6ac
URL:           https://pagure.io/rpmfluff
Igor Gnatenko 13d9d63
Source0:       https://pagure.io/releases/%{modname}/%{modname}-%{version}.tar.xz
e9e2dbe
Igor Gnatenko e23b6ac
BuildArch:     noarch
e9e2dbe
6d4e47f
%if 0%{?rhel} && 0%{?rhel} <= 7
6d4e47f
%bcond_with python3
4596760
%else
4596760
%bcond_without python3
6d4e47f
%endif
4596760
Igor Gnatenko e23b6ac
%global _description \
Igor Gnatenko e23b6ac
rpmfluff provides a python library for building RPM packages, and\
Igor Gnatenko e23b6ac
sabotaging them so they are broken in controlled ways.\
Igor Gnatenko e23b6ac
\
Igor Gnatenko e23b6ac
It is intended for use when validating package analysis tools such as RPM lint.\
Igor Gnatenko e23b6ac
It can also be used to construct test cases for package management software\
e9e2dbe
such as rpm and yum.
e9e2dbe
Igor Gnatenko e23b6ac
%description %{_description}
e9e2dbe
Igor Gnatenko e23b6ac
%package -n python2-%{modname}
Igor Gnatenko e23b6ac
Summary:        %{summary}
Igor Gnatenko e23b6ac
%{?python_provide:%python_provide python2-%{modname}}
Igor Gnatenko e23b6ac
BuildRequires:  python2-devel
03308ae
BuildRequires:  rpm-python
Igor Gnatenko e23b6ac
Requires:       rpm-build
Igor Gnatenko e23b6ac
Requires:       createrepo_c
3ae1045
Provides:       python-%{modname}
3ae1045
Obsoletes:      python-%{modname}
cc27437
Igor Gnatenko e23b6ac
%description -n python2-%{modname} %{_description}
cc27437
Igor Gnatenko e23b6ac
Python 2 version.
cc27437
6d4e47f
%if %{with python3}
Igor Gnatenko e23b6ac
%package -n python3-%{modname}
Igor Gnatenko e23b6ac
Summary:        %{summary}
Igor Gnatenko e23b6ac
%{?python_provide:%python_provide python3-%{modname}}
Igor Gnatenko e23b6ac
BuildRequires:  python3-devel
03308ae
BuildRequires:  rpm-python3
Igor Gnatenko e23b6ac
Requires:       rpm-build
Igor Gnatenko 88a83fc
Requires:       createrepo_c
cc27437
Igor Gnatenko e23b6ac
%description -n python3-%{modname} %{_description}
cc27437
Igor Gnatenko e23b6ac
Python 3 version.
6d4e47f
%endif
e9e2dbe
Igor Gnatenko e23b6ac
%prep
Igor Gnatenko e23b6ac
%autosetup -n %{modname}-%{version}
e9e2dbe
e9e2dbe
%build
Igor Gnatenko e23b6ac
%py2_build
6d4e47f
%if %{with python3}
Igor Gnatenko e23b6ac
%py3_build
6d4e47f
%endif
e9e2dbe
e9e2dbe
%install
Igor Gnatenko e23b6ac
%py2_install
6d4e47f
%if %{with python3}
Igor Gnatenko e23b6ac
%py3_install
6d4e47f
%endif
Igor Gnatenko e23b6ac
Igor Gnatenko e23b6ac
%check
03308ae
python2 %{modname}.py
6d4e47f
%if %{with python3}
03308ae
python3 %{modname}.py
6d4e47f
%endif
Igor Gnatenko e23b6ac
Igor Gnatenko e23b6ac
%files -n python2-%{modname}
Igor Gnatenko e23b6ac
%license LICENSE
Igor Gnatenko e23b6ac
%doc README.md
Igor Gnatenko e23b6ac
%{python2_sitelib}/%{modname}.py*
Igor Gnatenko e23b6ac
%{python2_sitelib}/%{modname}-*.egg-info
Igor Gnatenko e23b6ac
6d4e47f
%if %{with python3}
Igor Gnatenko e23b6ac
%files -n python3-%{modname}
Igor Gnatenko e23b6ac
%license LICENSE
Igor Gnatenko e23b6ac
%doc README.md
Igor Gnatenko e23b6ac
%{python3_sitelib}/%{modname}.py
Igor Gnatenko e23b6ac
%{python3_sitelib}/__pycache__/%{modname}.*
Igor Gnatenko e23b6ac
%{python3_sitelib}/%{modname}-*.egg-info
6d4e47f
%endif
cc27437
e9e2dbe
%changelog
544ff92
* Thu Jan 31 2019 David Shea <dshea@redhat.com> - 0.5.6-1
544ff92
- dshea: Add a add_manpage function
544ff92
- dshea: Sanitize the base directory name
544ff92
- dshea: Support subpackage scriptlets
544ff92
- dshea: Allow file directives to be added to symlinks
544ff92
- dshea: Use valid images for the test PNG and GIF data
544ff92
03308ae
* Wed Jun 28 2017 Jan Hutar <jhutar@redhat.com> - 0.5.3-1
03308ae
- Support mixing noarch and archful packages in a yum repo build by Dan Callaghan <dcallagh@redhat.com>
b5d6639
02d8a39
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-3
02d8a39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
02d8a39
f5273b9
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.5.2-2
f5273b9
- Rebuild for Python 3.6
f5273b9
b9fc71e
* Thu Sep 29 2016 Jan Hutar <jhutar@redhat.com> - 0.5.2-1
b9fc71e
- Lots of fixes by Dan Callaghan <dcallagh@redhat.com>
b9fc71e
Igor Gnatenko 88a83fc
* Fri Jul 22 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.5.1-1
Igor Gnatenko 88a83fc
- Fix Requires for createrepo_c in py3 subpkg
Igor Gnatenko 88a83fc
- Fix crash on python2 due to non-existing shutil.which()
Igor Gnatenko 88a83fc
Igor Gnatenko e23b6ac
* Fri Jul 22 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.5-1
Igor Gnatenko e23b6ac
- Make package following guidelines
Igor Gnatenko e23b6ac
- Replace usage of obsolete createrepo_c with createrepo
76ede61
82b829e
* Thu Aug 20 2015 Jan Hutar <jhutar@redhat.com> - 0.4.2-1
82b829e
- John Dulaney implemented weak dependencies
82b829e
cc27437
* Thu Jul 09 2015 Jan Hutar <jhutar@redhat.com> - 0.4-1
cc27437
- David Shea did a lots of work to support Python 3
cc27437
- RHEL5 (i.e. Python 2.4) support dropped
cc27437
c27f310
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-14
c27f310
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c27f310
fdb7510
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 0.3-13
fdb7510
- Replace pyhton-setuptools-devel BR with python-setuptools
fdb7510
68e9e9d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-12
68e9e9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
68e9e9d
c9ded54
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-11
c9ded54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c9ded54
a35e655
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-10
a35e655
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a35e655
c82d6d8
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-9
c82d6d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c82d6d8
9112765
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-8
9112765
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9112765
aa5cfe1
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-7
aa5cfe1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
aa5cfe1
bf9ff9c
* Fri Jul 30 2010 David Malcolm <dmalcolm@redhat.com> - 0.3-6
bf9ff9c
- rebuild for python 2.7
bf9ff9c
e9e2dbe
* Fri Feb 12 2010 Jan Hutar <jhutar@redhat.com> - 0.3-5
e9e2dbe
- Now version is in the separate file
e9e2dbe
cc27437
* Tue Jan 26 2010 Jan Hutar <jhutar@redhat.com> - 0.3-4
e9e2dbe
- Fix for deprecated popen2 module
e9e2dbe
e9e2dbe
* Thu Jan 7 2010 Jan Hutar <jhutar@redhat.com> - 0.3-3
e9e2dbe
- Moved to use EGGs for distribution
e9e2dbe
e9e2dbe
* Mon Dec 21 2009 Jan Hutar <jhutar@redhat.com> - 0.3-2
e9e2dbe
- Added separate LICENSE file
e9e2dbe
e9e2dbe
* Fri Dec 18 2009 Jan Hutar <jhutar@redhat.com> - 0.3-1
e9e2dbe
- New version, first attempt to get to Fedora
e9e2dbe
e9e2dbe
* Tue Jul 08 2008 Jan Hutar <jhutar@redhat.com> - 0.1-1
e9e2dbe
- Initial version
e9e2dbe
- spec-file based on python-html2text.spec