summaryrefslogtreecommitdiff
path: root/extra/sonata
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-08-02 04:35:55 +0000
committerroot <root@rshg054.dnsready.net>2011-08-02 04:35:55 +0000
commitbf35116f9d203dcafce808a6c7b3dd5a0db8afbc (patch)
treef9551a1d3c67d2113cc5fc5c3f8816bcbaad0540 /extra/sonata
parent1173ff2dba7d0fd3c45f170a5e353a76b7a5da2f (diff)
Tue Aug 2 04:35:55 UTC 2011
Diffstat (limited to 'extra/sonata')
-rw-r--r--extra/sonata/ChangeLog4
-rw-r--r--extra/sonata/PKGBUILD19
-rw-r--r--extra/sonata/info.py.patch15
3 files changed, 32 insertions, 6 deletions
diff --git a/extra/sonata/ChangeLog b/extra/sonata/ChangeLog
index b83211d02..8311a287c 100644
--- a/extra/sonata/ChangeLog
+++ b/extra/sonata/ChangeLog
@@ -1,3 +1,7 @@
+2011-07-26 Angel Velasquez <angvp@archlinux.org>
+ * sonata 1.6.2.1-7:
+ Applied patch to pull lyrics FS#25036
+
2009-03-30 Alexander Fehr <pizzapunk gmail com>
* sonata-1.6-1:
diff --git a/extra/sonata/PKGBUILD b/extra/sonata/PKGBUILD
index 29c426a11..416352778 100644
--- a/extra/sonata/PKGBUILD
+++ b/extra/sonata/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 112050 2011-03-03 12:31:43Z angvp $
+# $Id: PKGBUILD 132792 2011-07-26 09:02:50Z angvp $
# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=sonata
pkgver=1.6.2.1
-pkgrel=5
+pkgrel=7
pkgdesc="Elegant GTK+ music client for MPD"
arch=('i686' 'x86_64')
url="http://sonata.berlios.de/"
@@ -12,12 +12,19 @@ license=('GPL3')
depends=('pygtk' 'python-mpd')
optdepends=('gnome-python-extras: Enhanced system tray support'
'tagpy: Metadata editing support'
- 'zsi: Lyrics fetching support'
'dbus-python: Various extra functionality (e.g. multimedia keys support)')
-source=(http://download.berlios.de/${pkgname}/${pkgname}-$pkgver.tar.gz)
-md5sums=('0b912325e7175abad3bf6c0edc071e05')
+source=(http://download.berlios.de/${pkgname}/${pkgname}-$pkgver.tar.gz
+ info.py.patch)
+changelog=ChangeLog
+md5sums=('0b912325e7175abad3bf6c0edc071e05'
+ '595fcf7615035829b264afecb5a1beeb')
build() {
cd "$srcdir/${pkgname}-$pkgver"
- python2 setup.py install --prefix=/usr --root="$pkgdir"
+ patch -Np0 -i $srcdir/info.py.patch
+}
+
+package() {
+ cd "$srcdir/${pkgname}-$pkgver"
+ python2 setup.py install --prefix=/usr --optimize 1 --root="$pkgdir"
}
diff --git a/extra/sonata/info.py.patch b/extra/sonata/info.py.patch
new file mode 100644
index 000000000..e95cc3a08
--- /dev/null
+++ b/extra/sonata/info.py.patch
@@ -0,0 +1,15 @@
+--- sonata/info.py 2011-07-05 22:32:08.452556016 -0500
++++ sonata/info.py 2011-07-05 22:45:50.849311466 -0500
+@@ -393,9 +393,9 @@
+ if content.startswith("#REDIRECT [["):
+ addr = "http://lyricwiki.org/index.php?title=%s&action=edit" % urllib.quote(content.split("[[")[1].split("]]")[0])
+ content = urllib.urlopen(addr).read()
+- lyrics = content.split("&lt;lyrics&gt;")[1].split("&lt;/lyrics&gt;")[0]
+- if lyrics.strip() != "&lt;!-- PUT LYRICS HERE (and delete this entire line) --&gt;":
+- lyrics = misc.unescape_html(lyrics)
++ content = misc.unescape_html(content)
++ lyrics = content.split("<lyrics>")[1].split("</lyrics>")[0].strip()
++ if lyrics.strip() != "<!-- PUT LYRICS HERE (and delete this entire line) -->":
+ lyrics = misc.wiki_to_html(lyrics)
+ lyrics = lyrics.decode("utf-8")
+ # Save lyrics to file: