Blob Blame Raw
# Review: https://bugzilla.redhat.com/show_bug.cgi?id=513420

Name:           whaawmp
Version:        0.2.14
Release:        17%{?dist}
Summary:        Lightweight Media Player

License:        GPLv3+
URL:            http://home.gna.org/whaawmp/
Source0:        http://download.gna.org/whaawmp/%{version}/whaawmp-%{version}.tar.bz2

# Fix for fedora bug #652368
# Not yet sent upstream:
Patch1:         fix-py27-CObject-capsule-crash.patch

BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools 
BuildRequires:  desktop-file-utils
BuildRequires:  gettext intltool
Requires:       python2 >= 2.5, pygtk2-libglade >= 2.10, python2-pyxdg
Requires:       python2-dbus
Requires:       python2-gstreamer >= 0.10, gstreamer-plugins-good >= 0.10
Requires:       xdg-utils

%description
Whaaw! Media Player is a lightweight media player that supports fullscreen 
mode, seeking, changing video colour settings and more. It will play any audio
or video files that GStreamer can play. It is intended to be a basic media 
player without any GNOME dependencies.


%prep
%setup -q
%patch1 -p1
# remove shebangs
for Files in src/thumbnailer.py src/whaawmp.py; do
  %{__sed} -i.orig -e 1d ${Files}
  touch -r ${Files}.orig ${Files}
  %{__rm} ${Files}.orig
done

# fix desktop file
sed -i 's!audio/x-wav;audio/x-wav;!audio/x-wav;!' whaaw-thumbnailer.desktop
sed -i 's!False!false!' %{name}.desktop


%build
%{__python2} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

desktop-file-install                                       \
  --delete-original                                        \
  --remove-key=Encoding                                    \
  --dir=${RPM_BUILD_ROOT}%{_datadir}/applications          \
  ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop

%find_lang %{name}

%files -f %{name}.lang
%doc COPYING README TODO
%{_bindir}/%{name}
%{_bindir}/whaaw-thumbnailer
%{python2_sitelib}/%{name}*.egg-info
%{python2_sitelib}/%{name}/
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.svg
# We need to own this dir although it's already owned by Thunar
%dir %{_datadir}/thumbnailers/
%{_datadir}/thumbnailers/whaaw-thumbnailer.desktop


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

* Sun Jul 22 2018 Kevin Fenzi <kevin@scrye.com> - 0.2.14-16
- Fix FTBFS bug #1606671

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

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

* Mon Feb 05 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.2.14-13
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

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

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

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

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

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

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

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

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

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

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

* Wed Oct 26 2011 Kevin Fenzi <kevin@scrye.com> - 0.2.14-2
- Drop upstreamed patch.

* Sun Feb 27 2011 Christoph Wickert <cwickert@fedoraproject.org> - 0.2.14-1
- Update to 0.2.14
- Require xdg-utils for xdg-screensaver calls
- Run update-desktop-database in %%post and %%postun

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.12.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Dec 30 2010 David Malcolm <dmalcolm@redhat.com> - 0.2.12.1-5
- fix crash on startup with python 2.7 (rhbz#652368)

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

* Sat Nov 21 2009 Thomas Spura <tomspur@fedoraproject.org> - 0.2.12.1-3
- add playnext patch (fixes #539608)

* Sun Sep 06 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.2.12.1-2
- Rework summary and description

* Thu Jul 16 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.2.12.1-1
- Update to 0.2.12.1

* Sat Dec 20 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.2.10.1-1
- Update to 0.2.10.1

* Sun Jun 22 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.2.10-1
- Initial Fedora Package