# $Id: Portfile 126847 2014-10-16 05:48:57Z larryv@macports.org $ PortSystem 1.0 PortGroup python 1.0 name lastfmsubmitd version 0.35 revision 1 description LastFM Music Submitter categories audio maintainers nomaintainer 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} http://distfiles.macports.org/python/ use_bzip2 yes checksums md5 0da502e0ecbbaef373c9849e33187367 \ sha1 98fb020a54f8e49b16090fb1af07912a12351d8f \ rmd160 c6a06aa3931b823ee8de2e863812b1a8542ffa47 python.default_version 27 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}|" ${worksrcpath}/doc/lastfmsubmitd.1 reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/lib/lastfm/config.py reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/${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} }