Blob Blame History Raw
%global with_python3 1

Summary:       Langpacks plugin for dnf
Name:          dnf-langpacks
Version:       0.8.1
Release:       2%{?dist}
License:       GPLv2+
URL:           https://github.com/pnemade/dnf-langpacks
Source0:       https://github.com/pnemade/%{name}/archive/%{version}.tar.gz
BuildArch:     noarch
BuildRequires: python-setuptools
BuildRequires: python2-devel
Requires:      dnf
Requires:      python-dnf-plugins-core
Requires:      langtable-python

%description
dnf-langpacks is a plugin for DNF that looks for langpacks for your native
language for packages you install.

%if 0%{?with_python3}
%package -n python3-%{name}
Summary:       Langpacks plugin for dnf-3
License:       GPLv2+
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires:      python3-dnf
Requires:      python3-dnf-plugins-core
Requires:      langtable-python3
%endif

%if 0%{?with_python3}
%description -n python3-%{name}
dnf-langpacks is a plugin for DNF that looks for langpacks for your native
language for packages you install.
%endif

%prep
%setup -q
rm -rf *.egg-info

sed -i 's|, 0755||g' langpacks.py

rm -rf py3
mkdir ../py3
cp -a . ../py3/
mv ../py3 ./
sed -i 's|2.7|3.4|g' py3/setup.py

%build

%install
%if 0%{?with_python3}
pwd
pushd py3
%{__python3} setup.py install --skip-build --root=%{buildroot}
popd
%endif

%{__python2} setup.py install --skip-build --root=%{buildroot}

%files
%doc README.md NEWS
%license LICENSE
%config(noreplace) %{_sysconfdir}/dnf/plugins/langpacks.conf
%{python2_sitelib}/dnf-plugins/*
%{python2_sitelib}/*egg-info*
%{_mandir}/man8/dnf-langpacks.8.gz

%if 0%{?with_python3}
%files -n python3-%{name}
%doc README.md NEWS
%license LICENSE
%config(noreplace) %{_sysconfdir}/dnf/plugins/langpacks.conf
%{python3_sitelib}/dnf-plugins/*
%{python3_sitelib}/*egg-info*
%{_mandir}/man8/dnf-langpacks.8.gz
%endif

%changelog
* Sun Mar 08 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.8.1-2
- Fix dependency dnf-plugins-core to python-dnf-plugins-core

* Thu Feb 12 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.8.1-1
- update to 0.8.1 release

* Thu Feb 12 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.8.0-1
- update to 0.8.0 release

* Tue Feb 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.7.0-2
- Added python3-dnf-langpacks sub-package

* Mon Feb 02 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.7.0-1
- update to 0.7.0 release

* Fri Jan 09 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.6.1-1
- update to 0.6.1 release

* Tue Dec 23 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.6.0-1
- update to 0.6.0 release

* Fri Nov 21 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.5.1-1
- update to 0.5.1 release

* Sun Oct 12 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.5.0-1
- update to 0.5.0 release

* Wed Oct 08 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.4.0-1
- update to 0.4.0 release

* Wed Sep 03 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.3.1-2
- Resolves:rh#1136172 - Add requires: dnf-plugins-core

* Wed Aug 27 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.3.1-1
- update to 0.3.1 release

* Tue Jul 08 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.3.0-1
- update to 0.3.0 release

* Wed Jun 11 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.1.0-1
- initial package