[35185] trunk/dports/audio

sfiera at macports.org sfiera at macports.org
Wed Mar 19 16:58:04 PDT 2008


Revision: 35185
          http://trac.macosforge.org/projects/macports/changeset/35185
Author:   sfiera at macports.org
Date:     2008-03-19 16:58:04 -0700 (Wed, 19 Mar 2008)

Log Message:
-----------
New port lastfmsubmitd

Added Paths:
-----------
    trunk/dports/audio/lastfmsubmitd/
    trunk/dports/audio/lastfmsubmitd/Portfile
    trunk/dports/audio/lastfmsubmitd/files/
    trunk/dports/audio/lastfmsubmitd/files/lastfmsubmitd.conf.sample
    trunk/dports/audio/lastfmsubmitd/files/patch-config.py.diff
    trunk/dports/audio/lastfmsubmitd/files/patch-lastfmsubmitd.1.diff
    trunk/dports/audio/lastfmsubmitd/files/patch-setup.py.diff

Added: trunk/dports/audio/lastfmsubmitd/Portfile
===================================================================
--- trunk/dports/audio/lastfmsubmitd/Portfile	                        (rev 0)
+++ trunk/dports/audio/lastfmsubmitd/Portfile	2008-03-19 23:58:04 UTC (rev 35185)
@@ -0,0 +1,54 @@
+# $Id$
+
+PortSystem 1.0
+PortGroup python25 1.0
+
+name            lastfmsubmitd
+version         0.35
+description     LastFM Music Submitter
+categories      audio
+maintainers     sfiera
+long_description \
+     lastfmsubmitd is a replacement for the traditional Last.fm plugin model. \
+     Instead of re-implementing networking and caching code in each plugin, \
+     player plugins can simply send song information to the daemon, which will \
+     take care of the rest.
+
+homepage        http://www.red-bean.com/~decklin/software/lastfmsubmitd/
+platforms       darwin
+master_sites    ${homepage}
+use_bzip2       yes
+checksums       md5 0da502e0ecbbaef373c9849e33187367 \
+                sha1 98fb020a54f8e49b16090fb1af07912a12351d8f \
+                rmd160 c6a06aa3931b823ee8de2e863812b1a8542ffa47
+
+depends_lib-append  port:py25-hashlib
+
+set dirs { /var/spool/lastfm /var/run/lastfm /var/log/lastfm }
+set conf lastfmsubmitd.conf.sample
+set user "lastfm"
+
+post-extract {
+    file copy ${filespath}/${conf} ${worksrcpath}
+}
+
+patchfiles      patch-config.py.diff \
+                patch-setup.py.diff \
+                patch-lastfmsubmitd.1.diff
+post-patch {
+    reinplace "s|@PREFIX@|${prefix}|" doc/lastfmsubmitd.1
+    reinplace "s|@PREFIX@|${prefix}|" lib/lastfm/config.py
+    reinplace "s|@PREFIX@|${prefix}|" ${conf}
+}
+
+post-destroot {
+    addgroup ${user}
+    set gid [existsgroup ${user}]
+    adduser ${user} gid=${gid} realname=LastFM\ Submit\ Daemon
+
+    foreach dir ${dirs} {
+        xinstall -m 755 -o ${user} -g ${user} -d ${destroot}${prefix}${dir}
+        destroot.keepdirs-append ${destroot}${prefix}${dir}
+    }
+    xinstall -m 600 -o ${user} -g ${user} ${worksrcpath}/${conf} ${destroot}${prefix}/etc/${conf}
+}


Property changes on: trunk/dports/audio/lastfmsubmitd/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/audio/lastfmsubmitd/files/lastfmsubmitd.conf.sample
===================================================================
--- trunk/dports/audio/lastfmsubmitd/files/lastfmsubmitd.conf.sample	                        (rev 0)
+++ trunk/dports/audio/lastfmsubmitd/files/lastfmsubmitd.conf.sample	2008-03-19 23:58:04 UTC (rev 35185)
@@ -0,0 +1,11 @@
+[account]
+user: MacPortsUser
+password: **********
+
+# [daemon]
+# sleep_time: 5
+# debug: False
+# log: @PREFIX@/var/log/lastfm/lastfm.log
+# pidfile: @PREFIX@/var/run/lastfm/daemon_name.pid
+# spool: @PREFIX@/var/spool/lastfm
+

Added: trunk/dports/audio/lastfmsubmitd/files/patch-config.py.diff
===================================================================
--- trunk/dports/audio/lastfmsubmitd/files/patch-config.py.diff	                        (rev 0)
+++ trunk/dports/audio/lastfmsubmitd/files/patch-config.py.diff	2008-03-19 23:58:04 UTC (rev 35185)
@@ -0,0 +1,24 @@
+--- lib/lastfm/config.py	2006-06-07 20:45:31.000000000 -0400
++++ lib/lastfm/config.new.py	2008-03-05 01:22:07.000000000 -0500
+@@ -7,7 +7,7 @@
+ # doesn't need to worry about it. I am, however, reusing all this in LastMP,
+ # as it is somewhat more tightly integrated. Really, it's an evil hack.
+ 
+-SYS_CONF = '/etc/%s.conf'
++SYS_CONF = '@PREFIX@/etc/%s.conf'
+ USER_CONF = os.path.expanduser('~/.%s.conf')
+ 
+ # Defaults
+@@ -15,9 +15,9 @@
+ SLEEP_TIME = 5
+ DEBUG = False
+ 
+-LOG_PATH = '/var/log/lastfm/lastfm.log'
+-SPOOL_PATH = '/var/spool/lastfm'
+-PIDFILE_BASE = '/var/run/lastfm'
++LOG_PATH = '@PREFIX@/var/log/lastfm/lastfm.log'
++SPOOL_PATH = '@PREFIX@/var/spool/lastfm'
++PIDFILE_BASE = '@PREFIX@/var/run/lastfm'
+ 
+ class NoConfError(Exception): pass
+ 

Added: trunk/dports/audio/lastfmsubmitd/files/patch-lastfmsubmitd.1.diff
===================================================================
--- trunk/dports/audio/lastfmsubmitd/files/patch-lastfmsubmitd.1.diff	                        (rev 0)
+++ trunk/dports/audio/lastfmsubmitd/files/patch-lastfmsubmitd.1.diff	2008-03-19 23:58:04 UTC (rev 35185)
@@ -0,0 +1,16 @@
+--- doc/lastfmsubmitd.1	2006-06-23 17:30:23.000000000 -0400
++++ doc/lastfmsubmitd.1.new	2008-03-05 01:59:43.000000000 -0500
+@@ -76,11 +76,11 @@
+ spool.
+ .SH FILES
+ .TP
+-.B /var/spool/lastfm
++.B @PREFIX@/var/spool/lastfm
+ The directory where music players should write song information to be
+ submitted by lastfmsubmitd.
+ .TP
+-.B /etc/lastfmsubmitd.conf
++.B @PREFIX@/etc/lastfmsubmitd.conf
+ The configuration file.
+ .SH AUTHOR
+ Decklin Foster <decklin at red-bean.com>.

Added: trunk/dports/audio/lastfmsubmitd/files/patch-setup.py.diff
===================================================================
--- trunk/dports/audio/lastfmsubmitd/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/audio/lastfmsubmitd/files/patch-setup.py.diff	2008-03-19 23:58:04 UTC (rev 35185)
@@ -0,0 +1,21 @@
+--- setup.py	2007-03-29 12:35:34.000000000 -0400
++++ setup.py.new	2008-03-19 19:18:32.000000000 -0400
+@@ -22,18 +22,11 @@
+     packages = ['lastfm'],
+     scripts = [
+         'lastfmsubmitd',
+-        'lastmp',
+         'lastcd',
+-        'mbfind',
+-        'mbget',
+-        'mbsubmit',
+-        'peel',
+         ],
+     data_files=[
+         ('share/man/man1', [
+             'doc/lastfmsubmitd.1',
+-            'doc/lastmp.1',
+-            'doc/mbget.1',
+             ]),
+         ('lib/lastfmsubmitd', [
+             'lastfmsubmit',

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080319/00461618/attachment.html 


More information about the macports-changes mailing list