Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Oct 2010 18:09:59 GMT
From:      John Hixson <john@ixsystems.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/151371: New Port: audio/pithos GNOME Pandora player
Message-ID:  <201010101809.o9AI9xfj024136@www.freebsd.org>
Resent-Message-ID: <201010101820.o9AIK10v053456@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         151371
>Category:       ports
>Synopsis:       New Port: audio/pithos GNOME Pandora player
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 10 18:20:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     John Hixson
>Release:        9.0-CURRENT
>Organization:
iXsystems
>Environment:
FreeBSD thinkbsd 9.0-CURRENT FreeBSD 9.0-CURRENT #6: Sat Sep 25 05:21:08 PDT 2010     john@thinkbsd:/usr/obj/usr/src/sys/THINKBSD  amd64

>Description:
This is a GNOME Pandora player
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	pithos
#	pithos/Makefile
#	pithos/files
#	pithos/files/patch-pithos.desktop.in
#	pithos/files/patch-setup.py
#	pithos/files/patch-pithos
#	pithos/files/patch-pithosconfig.py
#	pithos/pkg-descr
#	pithos/pkg-plist
#
echo c - pithos
mkdir -p pithos > /dev/null 2>&1
echo x - pithos/Makefile
sed 's/^X//' >pithos/Makefile << 'b6ccb1d316afa5f668b09294416af362'
X# New ports collection makefile for: pithos
X# Date created: 8 October 2010
X# Whom: John Hixson <john@pcbsd.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	pithos
XPORTVERSION=	0.3
XCATEGORIES=	audio
XMASTER_SITES=	http://kevinmehall.net/p/pithos/
X
XMAINTAINER=	john@pcbsd.org
XCOMMENT=	A Pandora client for the GNOME desktop
X
XFETCH_DEPENDS=	bzr:${PORTSDIR}/devel/bazaar-ng
X
XRUN_DEPENDS=	py-xdg:${PORTSDIR}/devel/py-xdg \
X	py-gobject:${PORTSDIR}/devel/py-gobject \
X	py-notify:${PORTSDIR}/devel/py-notify \
X	py-dbus:${PORTSDIR}/devel/py-dbus \
X
XPLIST_FILES=	bin/pithos
X
XDATADIR= ${PREFIX}/share/${PORTNAME}
XWRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}
X
XUSE_PYTHON=	2.6+
XUSE_GNOME=	pygtk2
XUSE_PYDISTUTILS=	yes
XUSE_GSTREAMER=	good bad python
XUSE_DISPLAY=	yes
XPYDISTUTILS_PKGNAME=	${PORTNAME}
X
X.include <bsd.port.pre.mk>
XBZR_CMD=	bzr branch
XBZR_SITES?=	lp:${PORTNAME}
XBZR_MODULE=	${PKGNAME}
X
Xpre-fetch:
X	@if [ -f ${DISTDIR}/${PKGNAME}.tar.gz ]; then \
X		exit; \
X	fi; \
X	cd ${DISTDIR}; \
X	for BZR_SITE in ${BZR_SITES}; do \
X		${ECHO_MSG} "===>> Attempting to check out from $${BZR_SITE}."; \
X		if ${BZR_CMD} $${BZR_SITE} ${BZR_MODULE}; then \
X			cd ${DISTDIR}; \
X			${ECHO_MSG} "===>> Creating dist tarball in ${DISTDIR}"; \
X			${ECHO_MSG} "===>> \"${PKGNAME}.tar.gz\"."; \
X			${TAR} -czf ${PKGNAME}.tar.gz ${PKGNAME}; \
X			${RM} -rf ${PKGNAME}; \
X			exit; \
X		fi \
X	done; \
X	${RM} -rf ${DISTDIR}/${PKGNAME}; \
X	${ECHO_MSG} ">> BZR checkout failed."; \
X	exit 1;
X
Xpost-install:
X	@${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \
X		${WRKSRC}/bin/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
X	@${MKDIR} ${DATADIR}
X	@(cd ${WRKSRC}/data/ && ${COPYTREE_SHARE} \* ${DATADIR})
X
X
X.include <bsd.port.post.mk>
b6ccb1d316afa5f668b09294416af362
echo c - pithos/files
mkdir -p pithos/files > /dev/null 2>&1
echo x - pithos/files/patch-pithos.desktop.in
sed 's/^X//' >pithos/files/patch-pithos.desktop.in << '602e52922d909d856c63e1fed9d9b90a'
X--- pithos.desktop.in.orig	2010-10-09 22:18:15.000000000 -0700
X+++ pithos.desktop.in	2010-10-09 22:18:23.000000000 -0700
X@@ -3,6 +3,6 @@
X Comment=Play music from Pandora Radio
X Categories=GNOME;AudioVideo;
X Exec=pithos
X-Icon=/usr/share/pithos/media/icon.png
X+Icon=/usr/local/share/pithos/media/icon.png
X Terminal=false
X Type=Application
602e52922d909d856c63e1fed9d9b90a
echo x - pithos/files/patch-setup.py
sed 's/^X//' >pithos/files/patch-setup.py << '5e2805d643e0bca52acb0a354cce719c'
X--- setup.py.orig	2010-10-09 21:59:31.000000000 -0700
X+++ setup.py	2010-10-10 10:35:33.000000000 -0700
X@@ -17,90 +17,20 @@
X 
X ###################### DO NOT TOUCH THIS (HEAD TO THE SECOND PART) ######################
X 
X-try:
X-    import DistUtilsExtra.auto
X-except ImportError:
X-    import sys
X-    print >> sys.stderr, 'To build pithos you need https://launchpad.net/python-distutils-extra'
X-    sys.exit(1)
X-
X-assert DistUtilsExtra.auto.__version__ >= '2.10', 'needs DistUtilsExtra.auto >= 2.10'
X+import sys
X import os
X+from distutils.core import setup
X 
X+required = []
X 
X-def update_data_path(prefix, oldvalue=None):
X-
X-    try:
X-        fin = file('pithos/pithosconfig.py', 'r')
X-        fout = file(fin.name + '.new', 'w')
X-
X-        for line in fin:            
X-            fields = line.split(' = ') # Separate variable from value
X-            if fields[0] == '__pithos_data_directory__':
X-                # update to prefix, store oldvalue
X-                if not oldvalue:
X-                    oldvalue = fields[1]
X-                    line = "%s = '%s'\n" % (fields[0], prefix)
X-                else: # restore oldvalue
X-                    line = "%s = %s" % (fields[0], oldvalue)
X-            fout.write(line)
X-
X-        fout.flush()
X-        fout.close()
X-        fin.close()
X-        os.rename(fout.name, fin.name)
X-    except (OSError, IOError), e:
X-        print ("ERROR: Can't find pithos/pithosconfig.py")
X-        sys.exit(1)
X-    return oldvalue
X-
X-
X-def update_desktop_file(datadir):
X-
X-    try:
X-        fin = file('pithos.desktop.in', 'r')
X-        fout = file(fin.name + '.new', 'w')
X-
X-        for line in fin:            
X-            if 'Icon=' in line:
X-                line = "Icon=%s\n" % (datadir + 'media/icon.png')
X-            fout.write(line)
X-        fout.flush()
X-        fout.close()
X-        fin.close()
X-        os.rename(fout.name, fin.name)
X-    except (OSError, IOError), e:
X-        print ("ERROR: Can't find pithos.desktop.in")
X-        sys.exit(1)
X-
X-
X-class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto):
X-    def run(self):
X-        if self.root or self.home:
X-            print "WARNING: You don't use a standard --prefix installation, take care that you eventually " \
X-            "need to update quickly/quicklyconfig.py file to adjust __quickly_data_directory__. You can " \
X-            "ignore this warning if you are packaging and uses --prefix."
X-        previous_value = update_data_path(self.prefix + '/share/pithos/')
X-        update_desktop_file(self.prefix + '/share/pithos/')
X-        DistUtilsExtra.auto.install_auto.run(self)
X-        update_data_path(self.prefix, previous_value)
X-
X-
X-        
X-##################################################################################
X-###################### YOU SHOULD MODIFY ONLY WHAT IS BELOW ######################
X-##################################################################################
X-
X-DistUtilsExtra.auto.setup(
X-    name='pithos',
X-    version='0.3',
X-    ext_modules=[],
X-    license='GPL-3',
X-    author='Kevin Mehall',
X-    author_email='km@kevinmehall.net',
X-    description='Pandora.com client for the GNOME desktop',
X-    #long_description='Here a longer description',
X-    url='https://launchpad.net/pithos',
X-    cmdclass={'install': InstallAndUpdateDataDirectory}
X-    )
X-
X+setup(
X+	name='pithos',
X+	version='0.3',
X+	description='Pandora.com client for the GNOME desktop',
X+	author='Kevin Mehall',
X+	author_email='km@kevinmehall.net',
X+	url='https://launchpad.net/pithos',
X+	license='GPL-3',
X+	packages=['pithos', 'pithos.pandora', 'pithos.plugins'],
X+	package_dir = {'pithos':'pithos'}
X+)
5e2805d643e0bca52acb0a354cce719c
echo x - pithos/files/patch-pithos
sed 's/^X//' >pithos/files/patch-pithos << '657810b51b45e444978d6d7b6e7593e3'
X--- bin/pithos.orig	2010-10-09 22:19:41.000000000 -0700
X+++ bin/pithos	2010-10-09 22:20:03.000000000 -0700
X@@ -1,4 +1,4 @@
X-#!/usr/bin/python
X+#!/usr/bin/env python
X # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*-
X ### BEGIN LICENSE
X # Copyright (C) 2010 Kevin Mehall <km@kevinmehall.net>
657810b51b45e444978d6d7b6e7593e3
echo x - pithos/files/patch-pithosconfig.py
sed 's/^X//' >pithos/files/patch-pithosconfig.py << 'efffb8de2ac603139b45f010c0e813a8'
X--- pithos/pithosconfig.py.orig	2010-10-09 22:19:20.000000000 -0700
X+++ pithos/pithosconfig.py	2010-10-10 05:17:40.000000000 -0700
X@@ -16,7 +16,7 @@
X 
X # where your project will head for your data (for instance, images and ui files)
X # by default, this is ../data, relative your trunk layout
X-__pithos_data_directory__ = '../data/'
X+__pithos_data_directory__ = '/usr/local/share/pithos/'
X __license__ = 'GPL-3'
X 
X VERSION = '0.3.1'
X@@ -40,7 +40,7 @@
X     """Retrieve pithos data path
X 
X     This path is by default <pithos_lib_path>/../data/ in trunk
X-    and /usr/share/pithos in an installed version but this path
X+    and /usr/local/share/pithos in an installed version but this path
X     is specified at installation time.
X     """
X 
efffb8de2ac603139b45f010c0e813a8
echo x - pithos/pkg-descr
sed 's/^X//' >pithos/pkg-descr << '7be17552f04a8adeadeba8d988b07661'
XPithos is a Pandora client for the GNOME Desktop. The official
XFlash-based client is a CPU hog, and Pianobar is a great
Xreverse-engineered implementation, but is command-line only. Neither
Xintegrate with the desktop very well, missing things like media key
Xsupport and song notifications.
7be17552f04a8adeadeba8d988b07661
echo x - pithos/pkg-plist
sed 's/^X//' >pithos/pkg-plist << '6e4c4b92a85455e523e74fb8452ce504'
X%%PYTHON_SITELIBDIR%%/pithos/AboutPithosDialog.py
X%%PYTHON_SITELIBDIR%%/pithos/AboutPithosDialog.pyc
X%%PYTHON_SITELIBDIR%%/pithos/AboutPithosDialog.pyo
X%%PYTHON_SITELIBDIR%%/pithos/PreferencesPithosDialog.py
X%%PYTHON_SITELIBDIR%%/pithos/PreferencesPithosDialog.pyc
X%%PYTHON_SITELIBDIR%%/pithos/PreferencesPithosDialog.pyo
X%%PYTHON_SITELIBDIR%%/pithos/SearchDialog.py
X%%PYTHON_SITELIBDIR%%/pithos/SearchDialog.pyc
X%%PYTHON_SITELIBDIR%%/pithos/SearchDialog.pyo
X%%PYTHON_SITELIBDIR%%/pithos/StationsDialog.py
X%%PYTHON_SITELIBDIR%%/pithos/StationsDialog.pyc
X%%PYTHON_SITELIBDIR%%/pithos/StationsDialog.pyo
X%%PYTHON_SITELIBDIR%%/pithos/__init__.py
X%%PYTHON_SITELIBDIR%%/pithos/__init__.pyc
X%%PYTHON_SITELIBDIR%%/pithos/__init__.pyo
X%%PYTHON_SITELIBDIR%%/pithos/dbus_service.py
X%%PYTHON_SITELIBDIR%%/pithos/dbus_service.pyc
X%%PYTHON_SITELIBDIR%%/pithos/dbus_service.pyo
X%%PYTHON_SITELIBDIR%%/pithos/gobject_worker.py
X%%PYTHON_SITELIBDIR%%/pithos/gobject_worker.pyc
X%%PYTHON_SITELIBDIR%%/pithos/gobject_worker.pyo
X%%PYTHON_SITELIBDIR%%/pithos/pithosconfig.py
X%%PYTHON_SITELIBDIR%%/pithos/pithosconfig.pyc
X%%PYTHON_SITELIBDIR%%/pithos/pithosconfig.pyo
X%%PYTHON_SITELIBDIR%%/pithos/plugin.py
X%%PYTHON_SITELIBDIR%%/pithos/plugin.pyc
X%%PYTHON_SITELIBDIR%%/pithos/plugin.pyo
X%%PYTHON_SITELIBDIR%%/pithos/pylast.py
X%%PYTHON_SITELIBDIR%%/pithos/pylast.pyc
X%%PYTHON_SITELIBDIR%%/pithos/pylast.pyo
X%%PYTHON_SITELIBDIR%%/pithos/pandora/__init__.py
X%%PYTHON_SITELIBDIR%%/pithos/pandora/blowfish.py
X%%PYTHON_SITELIBDIR%%/pithos/pandora/fake.py
X%%PYTHON_SITELIBDIR%%/pithos/pandora/pandora.py
X%%PYTHON_SITELIBDIR%%/pithos/pandora/pandora_keys.py
X%%PYTHON_SITELIBDIR%%/pithos/pandora/xmlrpc.py
X%%PYTHON_SITELIBDIR%%/pithos/pandora/__init__.pyc
X%%PYTHON_SITELIBDIR%%/pithos/pandora/blowfish.pyc
X%%PYTHON_SITELIBDIR%%/pithos/pandora/fake.pyc
X%%PYTHON_SITELIBDIR%%/pithos/pandora/pandora.pyc
X%%PYTHON_SITELIBDIR%%/pithos/pandora/pandora_keys.pyc
X%%PYTHON_SITELIBDIR%%/pithos/pandora/xmlrpc.pyc
X%%PYTHON_SITELIBDIR%%/pithos/pandora/__init__.pyo
X%%PYTHON_SITELIBDIR%%/pithos/pandora/blowfish.pyo
X%%PYTHON_SITELIBDIR%%/pithos/pandora/fake.pyo
X%%PYTHON_SITELIBDIR%%/pithos/pandora/pandora.pyo
X%%PYTHON_SITELIBDIR%%/pithos/pandora/pandora_keys.pyo
X%%PYTHON_SITELIBDIR%%/pithos/pandora/xmlrpc.pyo
X%%PYTHON_SITELIBDIR%%/pithos/plugins/__init__.py
X%%PYTHON_SITELIBDIR%%/pithos/plugins/mediakeys.py
X%%PYTHON_SITELIBDIR%%/pithos/plugins/notification_icon.py
X%%PYTHON_SITELIBDIR%%/pithos/plugins/scrobble.py
X%%PYTHON_SITELIBDIR%%/pithos/plugins/notify.py
X%%PYTHON_SITELIBDIR%%/pithos/plugins/__init__.pyc
X%%PYTHON_SITELIBDIR%%/pithos/plugins/mediakeys.pyc
X%%PYTHON_SITELIBDIR%%/pithos/plugins/notification_icon.pyc
X%%PYTHON_SITELIBDIR%%/pithos/plugins/scrobble.pyc
X%%PYTHON_SITELIBDIR%%/pithos/plugins/notify.pyc
X%%PYTHON_SITELIBDIR%%/pithos/plugins/__init__.pyo
X%%PYTHON_SITELIBDIR%%/pithos/plugins/mediakeys.pyo
X%%PYTHON_SITELIBDIR%%/pithos/plugins/notification_icon.pyo
X%%PYTHON_SITELIBDIR%%/pithos/plugins/scrobble.pyo
X%%PYTHON_SITELIBDIR%%/pithos/plugins/notify.pyo
X%%DATADIR%%/media/album_default.png
X%%DATADIR%%/media/album_default.svg
X%%DATADIR%%/media/icon.png
X%%DATADIR%%/media/icon.svg
X%%DATADIR%%/media/icon-mono.svg
X%%DATADIR%%/media/pithos-mono.png
X%%DATADIR%%/media/rate_bg.png
X%%DATADIR%%/media/rate_bg.svg
X%%DATADIR%%/ui/about_pithos_dialog.xml
X%%DATADIR%%/ui/AboutPithosDialog.ui
X%%DATADIR%%/ui/pithos_window.xml
X%%DATADIR%%/ui/PithosWindow.ui
X%%DATADIR%%/ui/preferences_pithos_dialog.xml
X%%DATADIR%%/ui/PreferencesPithosDialog.ui
X%%DATADIR%%/ui/search_dialog.xml
X%%DATADIR%%/ui/SearchDialog.ui
X%%DATADIR%%/ui/stations_dialog.xml
X%%DATADIR%%/ui/StationsDialog.ui
X@dirrm %%PYTHON_SITELIBDIR%%/pithos/pandora
X@dirrm %%PYTHON_SITELIBDIR%%/pithos/plugins
X@dirrm %%PYTHON_SITELIBDIR%%/pithos
X@dirrm %%DATADIR%%/media
X@dirrm %%DATADIR%%/ui
X@dirrmtry %%DATADIR%%
6e4c4b92a85455e523e74fb8452ce504
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010101809.o9AI9xfj024136>