Name: distro-info
Version: 0.14
Release: 5%{?dist}
Summary: Provides information about releases of Debian and Ubuntu
License: ISC
URL: https://tracker.debian.org/pkg/distro-info
Source0: http://httpredir.debian.org/debian/pool/main/d/%{name}/%{name}_%{version}.tar.xz
# Remove incompatible --install-layout=deb.
Patch0: 0001-Remove-install-layout.patch
# Adapt Perl path for Fedora.
Patch1: 0002-Fix-Perl-path.patch
# Do not install symlink as there is no fedora-distro-info.
Patch2: 0003-Do-not-install-distro-info-symlink.patch
BuildRequires: distro-info-data
BuildRequires: dpkg-dev
BuildRequires: perl
BuildRequires: perl-generators
BuildRequires: perl(Test::Simple)
BuildRequires: perl(Time::Piece)
BuildRequires: python2-devel
BuildRequires: python3-devel
BuildRequires: python2-setuptools
BuildRequires: python3-setuptools
BuildRequires: shunit2
Requires: distro-info-data
%description
Information about all releases of Debian and Ubuntu. The distro-info script
will give you the codename for e.g. the latest stable release of your
distribution. To get information about a specific distribution there are the
debian-distro-info and the ubuntu-distro-info scripts.
%package -n perl-distro-info
Summary: Perl module for distro-info
BuildArch: noarch
Requires: perl
Requires: perl(Time::Piece)
Requires: distro-info-data
%description -n perl-distro-info
This package contains a Perl module for parsing the data in distro-info-data.
%package -n python2-distro-info
Summary: Python 2 module for distro-info
BuildArch: noarch
Requires: python2
Requires: distro-info-data
%{?python_provide:%python_provide python2-distro-info}
%description -n python2-distro-info
This package contains a Python 2 module for parsing the data in
distro-info-data.
%package -n python3-distro-info
Summary: Python 3 module for distro-info
BuildArch: noarch
Requires: python3
Requires: distro-info-data
%{?python_provide:%python_provide python3-distro-info}
%description -n python3-distro-info
This package contains a Python 3 module for parsing the data in
distro-info-data.
%prep
%setup -q
%patch0 -p1 -b .install-layout
%patch1 -p1 -b .perl-path
%patch2 -p1 -b .symlink
%build
make %{?_smp_mflags}
%install
%make_install
%check
PATH="/usr/share/shunit2:${PATH}" make test
%files
%license debian/copyright
%{_bindir}/*
%{_datadir}/%{name}
%{_mandir}/*/*
%files -n perl-distro-info
%license debian/copyright
%{perl_vendorlib}/Debian
%files -n python2-distro-info
%license debian/copyright
%{python2_sitelib}/distro_info*
%files -n python3-distro-info
%license debian/copyright
%{python3_sitelib}/distro_info*
%{python3_sitelib}/__pycache__/*
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Jan 04 2016 Michael Kuhn <suraia@ikkoku.de> - 0.14-3
- Explicitly require python2.
- Rename python-* packages to python2-*.
- Provide python-distro-info.
* Tue Dec 29 2015 Michael Kuhn <suraia@ikkoku.de> - 0.14-2
- Add license text.
- Own perl directory.
- Do not install distro-info symlink.
* Fri Nov 06 2015 Michael Kuhn <suraia@ikkoku.de> - 0.14-1
- Initial package.