From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Dec 16 03:10:06 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D2A916A417 for ; Sat, 16 Dec 2006 03:10:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 216B043CA3 for ; Sat, 16 Dec 2006 03:08:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kBG3A5NQ045405 for ; Sat, 16 Dec 2006 03:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kBG3A4i7045404; Sat, 16 Dec 2006 03:10:04 GMT (envelope-from gnats) Resent-Date: Sat, 16 Dec 2006 03:10:04 GMT Resent-Message-Id: <200612160310.kBG3A4i7045404@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nikos Ntarmos Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE40316A40F for ; Sat, 16 Dec 2006 03:05:31 +0000 (UTC) (envelope-from ntarmos@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5914143C9E for ; Sat, 16 Dec 2006 03:03:44 +0000 (GMT) (envelope-from ntarmos@ceid.upatras.gr) Received: from rhea.ceid.upatras.gr (rhea.ceid.upatras.gr [150.140.141.171]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 0C73E5C1E11 for ; Sat, 16 Dec 2006 05:05:27 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by rhea.ceid.upatras.gr (Postfix) with ESMTP id ED2DE80005 for ; Sat, 16 Dec 2006 05:05:22 +0200 (EET) Received: from rhea.ceid.upatras.gr ([127.0.0.1]) by localhost (rhea [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07484-08 for ; Sat, 16 Dec 2006 05:05:20 +0200 (EET) Received: from ace.b020.ceid.upatras.gr (unknown [150.140.143.234]) by rhea.ceid.upatras.gr (Postfix) with ESMTP id 11E4280002 for ; Sat, 16 Dec 2006 05:05:19 +0200 (EET) Received: by ace.b020.ceid.upatras.gr (Postfix, from userid 1001) id 2C2BE5E; Sat, 16 Dec 2006 05:05:23 +0200 (EET) Message-Id: <20061216030523.2C2BE5E@ace.b020.ceid.upatras.gr> Date: Sat, 16 Dec 2006 05:05:23 +0200 (EET) From: Nikos Ntarmos To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/106799: New port multimedia/shell-fm a command-line client for Last.FM X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nikos Ntarmos List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 03:10:06 -0000 >Number: 106799 >Category: ports >Synopsis: New port multimedia/shell-fm a command-line client for Last.FM >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: Sat Dec 16 03:10:03 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Nikos Ntarmos >Release: FreeBSD 7.0-CURRENT i386 >Organization: NetCInS Lab., C.E.I.D., U. of Patras, Greece >Environment: System: FreeBSD ace.b020.ceid.upatras.gr 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Sat Nov 11 13:12:03 EET 2006 root@ace.b020.ceid.upatras.gr:/ext/src/sys/i386/compile/ACE i386 >Description: A port of Shell.FM, a console client for Last.FM streams. >How-To-Repeat: >Fix: # 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: # # shell-fm # shell-fm/files # shell-fm/files/patch-reconfig.diff # shell-fm/files/patch-strndup.diff # shell-fm/files/patch-rl_completion.h.diff # shell-fm/files/patch-shell-fm.1.diff # shell-fm/Makefile # shell-fm/pkg-descr # shell-fm/distinfo # echo c - shell-fm mkdir -p shell-fm > /dev/null 2>&1 echo c - shell-fm/files mkdir -p shell-fm/files > /dev/null 2>&1 echo x - shell-fm/files/patch-reconfig.diff sed 's/^X//' >shell-fm/files/patch-reconfig.diff << 'END-of-shell-fm/files/patch-reconfig.diff' Xdiff -urNbB src/reconfig.orig src/reconfig X--- reconfig.orig Sat Dec 16 01:01:06 2006 X+++ reconfig Sat Dec 16 02:57:44 2006 X@@ -36,10 +36,10 @@ X X $clean_only && exit X X-do_cmd aclocal -I m4 X-do_cmd autoheader X-do_cmd automake --add-missing --copy X-do_cmd autoconf X+do_cmd aclocal19 -I m4 X+do_cmd autoheader259 X+do_cmd automake19 --add-missing --copy X+do_cmd autoconf259 X X X END-of-shell-fm/files/patch-reconfig.diff echo x - shell-fm/files/patch-strndup.diff sed 's/^X//' >shell-fm/files/patch-strndup.diff << 'END-of-shell-fm/files/patch-strndup.diff' X--- src/strndup.c.orig Sat Dec 16 04:21:22 2006 X+++ src/strndup.c Sat Dec 16 04:20:48 2006 X@@ -0,0 +1,13 @@ X+#include "strndup.h" X+#include X+ X+#ifdef __STRNDUP__ X+ X+char* strndup(const char* src, size_t len) { X+ char* _tmpStr = (char*)malloc(len + 1); X+ strncpy(_tmpStr, src, len); X+ return _tmpStr; X+} X+ X+#endif X+ X--- src/include/strndup.h.orig Sat Dec 16 04:21:27 2006 X+++ src/include/strndup.h Sat Dec 16 04:20:28 2006 X@@ -0,0 +1,11 @@ X+#if (defined(__unix__) || defined(unix)) && !defined(USG) X+#include X+#endif X+ X+#if ((defined(__FreeBSD__) || defined(__OpenBSD__)) && !defined(__STRNDUP__)) X+#define __STRNDUP__ X+ X+extern char* strndup(const char* src, size_t len); X+ X+#endif X+ X--- src/Makefile.am.orig Sat Dec 16 04:18:32 2006 X+++ src/Makefile.am Sat Dec 16 04:18:41 2006 X@@ -6,6 +6,7 @@ X INCLUDES = -I$(srcdir)/include X X shell_fm_SOURCES = \ X+strndup.c \ X autoban.c \ X bookmark.c \ X getln.c \ X--- src/radio.c.orig Sat Dec 16 04:25:00 2006 X+++ src/radio.c Sat Dec 16 02:07:30 2006 X@@ -35,6 +35,7 @@ X #include "settings.h" X #include "rl_completion.h" X #include "strarray.h" X+#include "strndup.h" X X #define LASTFM_URL_PREFIX "lastfm://" X #define LASTFM_URL_MIN_LENGTH 6 // shortest possible: 'user/a' X--- src/strarray.c.orig Sat Dec 16 04:25:13 2006 X+++ src/strarray.c Sat Dec 16 02:07:39 2006 X@@ -22,6 +22,7 @@ X X #include "compatibility.h" X #include "strarray.h" X+#include "strndup.h" X X void strarray_init (strarray_t *sa) { X sa->strings = NULL; X--- src/tag.c.orig Sat Dec 16 04:25:15 2006 X+++ src/tag.c Sat Dec 16 02:07:49 2006 X@@ -23,6 +23,7 @@ X #include "split.h" X #include "interface.h" X #include "rl_completion.h" X+#include "strndup.h" X X static char ** getPopularTags(char, struct hash); X static char * getExistingTags(char, struct hash); END-of-shell-fm/files/patch-strndup.diff echo x - shell-fm/files/patch-rl_completion.h.diff sed 's/^X//' >shell-fm/files/patch-rl_completion.h.diff << 'END-of-shell-fm/files/patch-rl_completion.h.diff' Xdiff -urNbB src/include/rl_completion.h.orig src/include/rl_completion.h X--- src/include/rl_completion.h.orig Sat Dec 16 01:01:06 2006 X+++ src/include/rl_completion.h Sat Dec 16 02:08:02 2006 X@@ -6,6 +6,7 @@ X #define SHELLFM_COMPLETION X X #include X+#include X #include "strarray.h" X X /* a tree composed of this structure will define the completion logic */ END-of-shell-fm/files/patch-rl_completion.h.diff echo x - shell-fm/files/patch-shell-fm.1.diff sed 's/^X//' >shell-fm/files/patch-shell-fm.1.diff << 'END-of-shell-fm/files/patch-shell-fm.1.diff' Xdiff -urNbB src/shell-fm.1.orig shell-fm/src/shell-fm.1 X--- src/shell-fm.1.orig Thu Jan 1 02:00:00 1970 X+++ src/shell-fm.1 Sat Dec 16 00:59:11 2006 X@@ -0,0 +1,179 @@ X+.\" X+.\" $Id$ X+.\" X+.Dd December 15, 2006 X+.Dt SHELL-FM 1 X+.Os X+.Sh NAME X+.Nm shell-fm X+.Nd command-line Last.FM client X+.Sh SYNOPSIS X+.Nm shell-fm X+.Op Fl d Ar daemon mode X+.Op Fl i Ar address to listen on X+.Op Fl W Ar port to listen on X+.Op Fl D Ar device to play on X+.Op Fl h X+.Sh DESCRIPTION X+.Nm shell-fm X+is a console based player for the streams provided by Last.FM. It's X+lightweight, easy to use and under heavy development. New features might X+be added every day. X+.Nm shell-fm X+is Open Source and published under the terms of the GNU General Public X+License, so feel free to modify and/or redistribute it. X+.Sh RUNNINF SHELL-FM X+Usage of X+.Nm shell-fm X+is pretty simple. To tell X+.Nm shell-fm X+what to play, you simply give it the direct link to a Last.FM stream (a X+URL starting with lastfm://). The URLs are very clear and easy to X+understand. Here are some examples: X+.Pp X+.nf X+ lastfm://user/shell-monkey/personal - my personal radio X+ lastfm://user/shell-monkey/loved - my loved tracks radio X+ lastfm://artist/Blood For Blood/similar - bands similar to Blood For X+ Blood X+ lastfm://artist/The Distillers/fans - The Distillers fan radio X+ lastfm://globaltags/punk rock - songs that have been X+ tagged as "punk rock" X+.fi X+.Pp X+Radios can be specified in three ways. First you can give a stream URL X+as command line argument to X+.Nm shell-fm X+: X+.Pp X+[~]$ shell-fm "lastfm://artist/The Distillers/fans" X+.Pp X+Note that you need to quote the URL, if it contains white spaces. X+.br X+Next you can enter a new URL while X+.Nm shell-fm X+is already running by pressing the r key. X+.Nm shell-fm X+then will prompt you for a new URL. Note that you don't need / may not X+quote the URL here like in the command line. X+.Nm shell-fm X+will take care of whitespaces for you. Finally, you can name a default X+stream in your configuration file, which is started by default if you X+run X+.Nm shell-fm X+without an URL as command line argument. X+.Sh CONFIGURATION X+Your configuration should be placed in the file ~/.shell-fm/shell-fm.rc. X+It consists of simple associations in the format key = value. Following X+keys are known at the moment (may/will be more in future). X+.br X+.nf X+ username - your Last.FM nick X+ password - your Last.FM password; if password and username or X+ only the password are missing here, shell-fm will X+ prompt you for it on startup. X+ default-radio - the default radio which shell-fm will play on startup X+ if you called it without an command line argument. X+ np-file - the (absolute) path to a file in which you want X+ shell-fm to save information about the currently X+ played track in. X+ np-file-format - the format in which shell-fm will write the song X+ information to your np-file. Note that both, np-file X+ and np-file-format need to be specified to make X+ shell-fm write to the np-file. The format may contain X+ any character plus some placeholders shell-fm will X+ replace. They are: X+ %a - artist X+ %t - title X+ %A - album X+ %d - duration in seconds X+ %s - station name X+ %u - station URL X+ %U - artist URL X+ %T - track URL X+.fi X+.Pp X+There may and will be more placeholders available in future releases. X+.br X+.nf X+ np-cmd - command that's executed whenever the track changes. Allows X+ the same format placeholders as the "np-file-format" X+ option. X+ key0x?? - bind an external command to the key with the hexadecimal, X+ UPPERCASE (!), zero-padded ASCII code "??". Keys that are X+ already bound to an action (as listed here) can't be X+ overwritten. Again, you can use all the variables as in X+ "np-file-format" and "np-cmp". Please note that future X+ versions may use further keys, so you might need to change X+ your configuration then. X+ ?-color - (where ? is one of the meta tag variables (see list X+ above). This allows you to color every kind of tag with a X+ different color (e.g. paint track titles red, artists X+ green and so on). This is the list of valid color codes: X+ 0;30 = black (not very useful) X+ 1;30 = dark gray X+ 0;31 = red X+ 1;31 = light red X+ 0;32 = green X+ 1;32 = light green X+ 0;33 = dark yellow/brown X+ 1;33 = yellow X+ 0;34 = blue X+ 1;34 = light blue X+ 0;35 = violet X+ 1;35 = pink X+ 0;36 = turquoise X+ 1;36 = cyan X+ 0;37 = gray X+ 1;37 = white X+.fi X+.Pp X+This is what your configuration file for X+.Nm shell-fm X+could look like: X+.nf X+ [~]$ cat ~/.shell-fm/shell-fm.rc X+ username = shell-monkey X+ password = secret X+ default-radio = lastfm://user/shell-monkey/loved X+ np-file = /tmp/np.txt X+ np-file-format = %a - %t X+ key0x6F = /usr/bin/elinks "%u" X+ t-color = 1;32 X+ a-color = 0;32 X+ s-color = 1;37 X+ [~]$ X+.fi X+.Sh CONTROLS X+These keys are available from within X+.Nm shell-fm X+to control it's behaviour: X+.br X+.nf X+ r - prompt for a new station URL. X+ l - love the currently played track. X+ B - (uppercase!) ban the currently played track. X+ n - skip the currently played track. X+ Q - (uppercase!) quit. X+ d - enable/disable discovery mode. X+ A - ban the artist of the currently played track (whenever another X+ track of this artist is streamed again, it will be banned X+ automatically). X+ R - toggle RTP on/off (RTP = record tracks to profile) X+ f - listen to the fan radio of the currently played tracks artist X+ s - listen to the similar-artists radio of the currently played X+ tracks artist X+.fi X+.br X+Note that the radio URL prompt provides a simple history (use up/down X+arrow keys to browse it). By default, X+.Nm Shell.FM X+will remember only the URLs you entered in the current session. If you X+want the history to survive, you need to create an empty file name X+~/.shell-fm/radio-history. Simply touch(1) it and you're done. X+.Sh SEE ALSO X+http://lizer.syslinx.org/shell-fm/ X+.Sh CREDITS X+Jonas Kramer wrote the actual code. X+.Sh AUTHOR X+Nikos Ntarmos X--- src/Makefile.am.orig Sat Dec 16 04:37:00 2006 X+++ src/Makefile.am Sat Dec 16 04:37:59 2006 X@@ -26,5 +26,7 @@ X tag.c \ X utility.c X X+man_MANS = shell-fm.1 X+EXTRA_DIST = ${man_MANS} X X ## vim: noet ts=8 sw=8 END-of-shell-fm/files/patch-shell-fm.1.diff echo x - shell-fm/Makefile sed 's/^X//' >shell-fm/Makefile << 'END-of-shell-fm/Makefile' X# New ports collection makefile for: shell-fm X# Date created: 15 December 2006 X# Whom: Nikos Ntarmos X# X# $FreeBSD$ X# X XPORTNAME= shell-fm XPORTVERSION= 20061215 XCATEGORIES= multimedia XMASTER_SITES= http://ntarmos.dyndns.org/Software/FreeBSD/ X XMAINTAINER= ntarmos@ceid.upatras.gr XCOMMENT= A command-line client for Last.FM X XLIB_DEPENDS= ao:${PORTSDIR}/audio/libao \ X mad:${PORTSDIR}/audio/libmad X XUSE_AUTOTOOLS= aclocal:19 automake:19 autoheader:259 autoconf:259 XAUTOMAKE_ARGS= --add-missing --copy XACLOCAL_ARGS= -I m4 XLDFLAGS+= -L${LOCALBASE}/lib XCFLAGS+= -I${LOCALBASE}/include XCONFIGURE_ENV= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" X Xpre-configure: X @(cd ${CONFIGURE_WRKSRC} && \ X ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL}) X Xpost-install: X @(${MKDIR} ${PREFIX}/share/examples/shell-fm && \ X ${INSTALL} -m 444 ${WRKSRC}/src/shell-fm.rc-example \ X ${PREFIX}/share/examples/shell-fm) X XMAN1= shell-fm.1 XMANCOMPRESSED= no X XPLIST_FILES= bin/shell-fm \ X share/examples/shell-fm/shell-fm.rc-example XPLIST_DIRS= share/examples/shell-fm X X.include END-of-shell-fm/Makefile echo x - shell-fm/pkg-descr sed 's/^X//' >shell-fm/pkg-descr << 'END-of-shell-fm/pkg-descr' XThis is a port of Shell.FM, a console based player for the streams Xprovided by Last.FM for the Linux platform. It's lightweight (the binary Xis only about 16K), easy to use and under heavy development. New Xfeatures might be added every day. Shell.FM is Open Source and published Xunder the terms of the GNU General Public License, so feel free to Xmodify and/or redistribute it. X XWWW: http://lizer.syslinx.org/shell-fm/ END-of-shell-fm/pkg-descr echo x - shell-fm/distinfo sed 's/^X//' >shell-fm/distinfo << 'END-of-shell-fm/distinfo' XMD5 (shell-fm-20061215.tar.gz) = 81d5cbc87185784e6aa0c0cd1bc8bc7a XSHA256 (shell-fm-20061215.tar.gz) = ba6885c3e827adf605bc0de9c33943907ab94f494cad63e4b36342a0b085bdf4 XSIZE (shell-fm-20061215.tar.gz) = 30082 END-of-shell-fm/distinfo exit >Release-Note: >Audit-Trail: >Unformatted: