Blob Blame Raw
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           translation-filter
Version:        1.0
Release:        16%{?dist}
Summary:        A l10n file filter

License:        GPLv2
URL:            http://fedorahosted.org/translation-filter
Source0:        http://fedorahosted.org/releases/t/r/translation-filter/%{name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel, python-setuptools, desktop-file-utils
Requires:       translate-toolkit, pygtk2-libglade, pygtk2

%if 0%{?fedora}
BuildRequires:  PyQt4-devel
%endif

%description
A l10n file filter to check translations
%if 0%{?fedora}
%package        kde
Summary:        The translation-filter KDE based UI
Requires:       %{name} = %{version}-%{release}
Requires:       PyQt4

%description    kde
KDE UI for translation-filter
%endif


%prep
%setup -q


%build
%py2_build


%install
rm -rf $RPM_BUILD_ROOT
%py2_install
desktop-file-install                     \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications           \
%{buildroot}/%{_datadir}/applications/translation-filter.desktop

desktop-file-install                   \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications           \
%{buildroot}/%{_datadir}/applications/translation-filter-kde.desktop


%if 0%{?rhel}
%exclude
%{python2_sitelib}/Translationfilter/TranslationApp.py*
%{_bindir}/translation-filter-gui
%{_datadir}/translationfilter/ui/*
%{_datadir}/applications/translation-filter-kde-fedora.desktop
%{_datadir}/applications/*-kde.desktop
%endif


%if 0%{?fedora}
%files kde
%{python2_sitelib}/Translationfilter/TranslationApp.py*
%{_bindir}/translation-filter-gui
%{_datadir}/translationfilter/ui/*
%{_datadir}/applications/translation-filter-kde.desktop
%endif

%files
%doc docs/README docs/ChangeLog docs/COPYING
# For noarch packages: sitelib
%{python2_sitelib}/Translationfilter/BasicTranslation.py*
%{python2_sitelib}/Translationfilter/poparser.py*
%{python2_sitelib}/Translationfilter/__init__.py*
%{python2_sitelib}/*.egg-info
%{_bindir}/translation-filter
%{_bindir}/translation-filter-gnome
%{_datadir}/translationfilter/data/*
%{_datadir}/translationfilter/tf-gnome/*
%{_datadir}/pixmaps/translation-filter.png
%{_datadir}/applications/translation-filter.desktop

%changelog
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-11
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon Feb 11 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 1.0-6
- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Wed Jul 29 2009 Kushal Das <kushal@fedoraproject.org> 1.0-1
- The 1.0 release

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.0.2-3
- Rebuild for Python 2.6

* Mon Aug 11 2008 Kushal Das <kushal@fedoraproject.org> 0.0.2-2
- Fixed BR and LICENSE issue

* Wed Aug 06 2008 Kushal Das <kushal@fedoraproject.org> 0.0.2-1
- New version 

* Mon Aug 04 2008 Kushal Das <kushal@fedoraproject.org> 0.0.1-1
- Initial release