2008-06-24 River Tarnell <
[email protected]>
* SFEexaile.spec: New spec.
--- a/ChangeLog Mon Jun 23 16:33:43 2008 +0000
+++ b/ChangeLog Tue Jun 24 07:41:50 2008 +0000
@@ -1,3 +1,7 @@
+2008-06-24 River Tarnell <[email protected]>
+
+ * SFEexaile.spec: New spec.
+
2008-06-23 Matt Keenan <[email protected]>
* SFEdia.spec: New spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEexaile.spec Tue Jun 24 07:41:50 2008 +0000
@@ -0,0 +1,72 @@
+#
+# Copyright (c) 2006 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+
+%include Solaris.inc
+
+Name: SFEexaile
+Summary: Music player for GTK+
+Version: 0.2.13
+Source: http://www.exaile.org/files/exaile_%{version}.tar.gz
+Patch1: exaile-01-echodashe.diff
+Patch2: exaile-02-flump3dec.diff
+
+SUNW_BaseDir: %{_basedir}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+
+# Requires:
+BuildRequires: SFEgettext
+Requires: SFEpython-mutagen
+
+%prep
+%setup -q -n exaile_%version
+%patch1 -p0
+%patch2 -p0
+
+%build
+
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+ CPUS=1
+fi
+
+export CFLAGS="%optflags"
+export LDFLAGS="%{_ldflags}"
+
+make PREFIX=%{_prefix} -j$CPUS
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make install PREFIX=%{_prefix} DESTDIR=$RPM_BUILD_ROOT
+mv $RPM_BUILD_ROOT/%{_datadir}/locale/he_IL $RPM_BUILD_ROOT/%{_datadir}/locale/he
+mv $RPM_BUILD_ROOT/%{_datadir}/locale/it_IT $RPM_BUILD_ROOT/%{_datadir}/locale/it
+mv $RPM_BUILD_ROOT/%{_datadir}/locale/tr_TR $RPM_BUILD_ROOT/%{_datadir}/locale/tr
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/*
+%dir %attr (0755, root, bin) %{_libdir}
+%{_libdir}/*
+%dir %attr (0755, root, sys) %{_datadir}
+%{_datadir}/exaile/*
+%dir %attr (0755, root, bin) %{_datadir}/man
+%dir %attr (0755, root, bin) %{_datadir}/man/man1
+%{_datadir}/man/man1/*
+%dir %attr (0755, root, other) %{_datadir}/pixmaps
+%{_datadir}/pixmaps/*
+%dir %attr (0755, root, other) %{_datadir}/applications
+%{_datadir}/applications/*
+%dir %attr (0755, root, other) %{_datadir}/locale
+%attr (-, root, other) %{_datadir}/locale/*
+
+%changelog
+* Tue Jun 24 2008 - [email protected]
+- Initial spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/exaile-01-echodashe.diff Tue Jun 24 07:41:50 2008 +0000
@@ -0,0 +1,11 @@
+--- Makefile.orig Tue Jun 24 08:21:15 2008
++++ Makefile Tue Jun 24 08:19:02 2008
+@@ -66,7 +66,7 @@
+ $(DESTDIR)$(PREFIX)/share/pixmaps/exaile.png
+ install -m 644 exaile.desktop $(DESTDIR)$(PREFIX)/share/applications/
+ cd $(DESTDIR)$(PREFIX)/bin && \
+- /bin/echo -e \
++ /bin/echo \
+ "#!/bin/sh\n" \
+ "cd $(PREFIX)/share/exaile\n" \
+ "exec python $(PREFIX)$(LIBDIR)/exaile/exaile.py \"\$$@\"" \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/exaile-02-flump3dec.diff Tue Jun 24 07:41:50 2008 +0000
@@ -0,0 +1,40 @@
+--- xl/player.py.orig Tue Jun 24 08:40:40 2008
++++ xl/player.py Tue Jun 24 08:41:48 2008
+@@ -119,13 +119,13 @@
+ self.playbin.set_property('uri', uri.encode(xlmisc.get_default_encoding()))
+
+ formats = {
+- 'mp3': 'mad',
+- 'flac': 'flac',
+- 'ogg': 'vorbis',
+- 'mpc': 'musepack',
+- 'tta': 'tta',
+- 'mp4': 'faad',
+- 'm4a': 'faad',
++ 'mp3': ['mad', 'flump3dec'],
++ 'flac': ['flac'],
++ 'ogg': ['vorbis'],
++ 'mpc': ['musepack'],
++ 'tta': ['tta'],
++ 'mp4': ['faad'],
++ 'm4a': ['faad'],
+ }
+
+ ext_re = re.compile(r'\.([^\.]*)$')
+@@ -136,8 +136,14 @@
+ ext = ''
+
+ if ext in formats.keys():
+- plugin = formats[ext]
+- if not gst.registry_get_default().find_plugin(plugin):
++ plugins = formats[ext]
++ found = False
++ for p in plugins:
++ if gst.registry_get_default().find_plugin(p):
++ found = True
++ break
++
++ if found == False:
+ raise Exception(_("You do not have the "
+ "appropriate Gstreamer plugin installed to play "
+ "this file: %(uri)s") % {'uri': uri})