diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..926d670 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +whaawmp-0.2.12.1.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index cd1910a..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: whaawmp -# $Id$ -NAME := whaawmp -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/sources b/sources index e69de29..ee5201c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +259b61cfa87bbba54dcd9579a815a421 whaawmp-0.2.12.1.tar.bz2 diff --git a/whaawmp-playnext.patch b/whaawmp-playnext.patch new file mode 100644 index 0000000..1dac240 --- /dev/null +++ b/whaawmp-playnext.patch @@ -0,0 +1,17 @@ +--- src/gui/main.py 2009-07-15 08:21:08.000000000 +0200 ++++ src/gui/main.py2 2009-11-21 14:40:20.736483935 +0100 +@@ -370,9 +370,11 @@ + def playNext(self, widget=None, stop=True): + ## Plays the next file in the queue (if it exists). + if (self.wTree.get_object("mnuiRandom").get_active()): +- # If random is set, pick a random item from the queue. +- # -1 because randint includes boundaries. +- filename = queue.getTrackRemove(randint(0, queue.length()-1)) ++ # If queue is empty randint(0,-1) will crash ++ if queue: ++ # If random is set, pick a random item from the queue. ++ # -1 because randint includes boundaries. ++ filename = queue.getTrackRemove(randint(0, queue.length()-1)) + else: + # Otherwise just get the next item. + filename = queue.getNextTrackRemove() diff --git a/whaawmp.spec b/whaawmp.spec new file mode 100644 index 0000000..aee9251 --- /dev/null +++ b/whaawmp.spec @@ -0,0 +1,101 @@ +# Review: https://bugzilla.redhat.com/show_bug.cgi?id=513420 + +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Name: whaawmp +Version: 0.2.12.1 +Release: 3%{?dist} +Summary: Lightweight Media Player + +Group: Applications/Multimedia +License: GPLv3+ +URL: http://home.gna.org/whaawmp/ +Source0: http://download.gna.org/whaawmp/%{version}/whaawmp-%{version}.tar.bz2 +# fedora bug #539608 +Patch0: %{name}-playnext.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: python-devel +BuildRequires: python-setuptools +BuildRequires: desktop-file-utils +BuildRequires: gettext intltool +Requires: python >= 2.5, pygtk2-libglade >= 2.10, pyxdg +Requires: dbus-python +Requires: gstreamer-python >= 0.10, gstreamer-plugins-good >= 0.10 + +%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 +%patch0 +# 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;!' %{name}.desktop +sed -i 's!False!false!' %{name}.desktop + + +%build +%{__python} setup.py build + + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT + +desktop-file-install \ + --delete-original \ + --remove-key=Encoding \ + --remove-category=Application \ + --add-category=GTK \ + --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ + ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop + +%find_lang %{name} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc COPYING README TODO +%{_bindir}/%{name} +%{_bindir}/whaaw-thumbnailer +%{python_sitelib}/%{name}*.egg-info +%{python_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 +* Sat Nov 21 2009 Thomas Spura - 0.2.12.1-3 +- add playnext patch (fixes #539608) + +* Sun Sep 06 2009 Christoph Wickert - 0.2.12.1-2 +- Rework summary and description + +* Thu Jul 16 2009 Christoph Wickert - 0.2.12.1-1 +- Update to 0.2.12.1 + +* Sat Dec 20 2008 Christoph Wickert - 0.2.10.1-1 +- Update to 0.2.10.1 + +* Sun Jun 22 2008 Christoph Wickert - 0.2.10-1 +- Initial Fedora Package