ports/86534: [NEW PORT] audio/xmmsctrl: a small utility to control xmms from the command line

Jason E. Hale jhale at bluebottle.com
Sat Sep 24 19:20:06 UTC 2005


>Number:         86534
>Category:       ports
>Synopsis:       [NEW PORT] audio/xmmsctrl: a small utility to control xmms from the command line
>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 Sep 24 19:20:05 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Jason E. Hale
>Release:        FreeBSD 6.0-BETA5 i386
>Organization:
none
>Environment:
System: FreeBSD black.attbi.com 6.0-BETA5 FreeBSD 6.0-BETA5 #0: Tue Sep 20 00:00:45 EDT 2005
xmms version 1.2.10
tested on FreeBSD 4.11 and FreeBSD 6.0-BETA5

	
>Description:
xmmsctrl is a small utility to control xmms from the command line. Its
goal is to be used coupled with sh to test xmms state and perform an
appropriate action, e.g. if playing then pause else play. The interest
of this is to bind keys in a window manager to have control over xmms
with keys that do play/next/pause, prev, control sound...

Several desktop applets that control xmms use this program as a backend,
so having a FreeBSD port of it is a nice idea.  It allows much more
control over xmms from the command line than xmms's own command line
arguments do.
	
>How-To-Repeat:
N/A
	
>Fix:

	

--- xmmsctrl begins here ---
# 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:
#
#	xmmsctrl
#	xmmsctrl/pkg-plist
#	xmmsctrl/pkg-descr
#	xmmsctrl/distinfo
#	xmmsctrl/Makefile
#	xmmsctrl/files
#	xmmsctrl/files/patch-removefile.c
#	xmmsctrl/files/patch-Makefile
#
echo c - xmmsctrl
mkdir -p xmmsctrl > /dev/null 2>&1
echo x - xmmsctrl/pkg-plist
sed 's/^X//' >xmmsctrl/pkg-plist << 'END-of-xmmsctrl/pkg-plist'
Xbin/xmmsctrl
Xman/cat1/xmmsctrl.1
X%%PORTDOCS%%%%DOCSDIR%%/Changelog
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X%%EXAMPLESDIR%%/emacs-transcriber
X%%EXAMPLESDIR%%/pause_stop_play.sh
X%%EXAMPLESDIR%%/play_pause.sh
X%%EXAMPLESDIR%%/play_unpause_next.sh
X%%EXAMPLESDIR%%/playlist2html.sh
X%%EXAMPLESDIR%%/twmrc_bindings
X%%EXAMPLESDIR%%/win_playlist.sh
X%%EXAMPLESDIR%%/window_shown.sh
X%%EXAMPLESDIR%%/xmmsnext.sh
X%%EXAMPLESDIR%%/xmmsprev.sh
X%%EXAMPLESDIR%%/xmmsswitch.sh
X at dirrm %%EXAMPLESDIR%%
END-of-xmmsctrl/pkg-plist
echo x - xmmsctrl/pkg-descr
sed 's/^X//' >xmmsctrl/pkg-descr << 'END-of-xmmsctrl/pkg-descr'
Xxmmsctrl is a small utility to control xmms from the command line. Its
Xgoal is to be used coupled with sh to test xmms state and perform an
Xappropriate action, e.g. if playing then pause else play. The interest
Xof this is to bind keys in a window manager to have control over xmms
Xwith keys that do play/next/pause, prev, control sound... 
END-of-xmmsctrl/pkg-descr
echo x - xmmsctrl/distinfo
sed 's/^X//' >xmmsctrl/distinfo << 'END-of-xmmsctrl/distinfo'
XMD5 (xmmsctrl-1.8.tar.gz) = 0774f3e61cfc89c1fd3f0526c48b35db
XSIZE (xmmsctrl-1.8.tar.gz) = 14043
END-of-xmmsctrl/distinfo
echo x - xmmsctrl/Makefile
sed 's/^X//' >xmmsctrl/Makefile << 'END-of-xmmsctrl/Makefile'
X# New ports collection makefile for:   xmmsctrl
X# Date created:		22 September 2005
X# Whom:			Jason E. Hale <jhale at bluebottle.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	xmmsctrl
XPORTVERSION=	1.8
XCATEGORIES=	audio
XMASTER_SITES=	http://user.it.uu.se/~adavid/utils/
X
XMAINTAINER=	jhale at bluebottle.com
XCOMMENT=	Small utility to control xmms from the command line
X
XBUILD_DEPENDS=	xmms:${PORTSDIR}/multimedia/xmms
XRUN_DEPENDS=	xmms:${PORTSDIR}/multimedia/xmms
X
XUSE_GMAKE=	yes
XUSE_REINPLACE=	yes
X
Xpre-install:
X	@${REINPLACE_CMD} -e 's/[[:cntrl:]]\[1;34m//g'\
X		-e 's/[[:cntrl:]]\[0;0m//g' ${WRKSRC}/HELP
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/xmmsctrl ${PREFIX}/bin/xmmsctrl
X	${INSTALL_MAN} ${WRKSRC}/HELP ${PREFIX}/man/cat1/xmmsctrl.1
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	cd ${WRKSRC} && \
X		${INSTALL_DATA} Changelog README ${DOCSDIR}
X	@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
X.endif
X	${MKDIR} ${EXAMPLESDIR}
X	cd ${WRKSRC}/samples && \
X		${INSTALL_DATA} emacs-transcriber twmrc_bindings \
X			${EXAMPLESDIR} && \
X		${INSTALL_SCRIPT} *.sh ${EXAMPLESDIR}
X	@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
X
X.include <bsd.port.mk>
END-of-xmmsctrl/Makefile
echo c - xmmsctrl/files
mkdir -p xmmsctrl/files > /dev/null 2>&1
echo x - xmmsctrl/files/patch-removefile.c
sed 's/^X//' >xmmsctrl/files/patch-removefile.c << 'END-of-xmmsctrl/files/patch-removefile.c'
X--- removefile.c.orig	Thu Apr  1 08:26:19 2004
X+++ removefile.c	Thu Sep 22 13:41:04 2005
X@@ -111,7 +111,7 @@
X     DIR *dir = opendir(".");
X     if (dir) {
X       /* xmms uses absolute paths */
X-      char *pwd = get_current_dir_name();
X+      char *pwd = getcwd(NULL,PATH_MAX);
X       struct dirent *entry;
X       struct stat file_stat;
X 
X@@ -189,7 +189,7 @@
X       gint *remove_pos = (gint*) malloc(list_size*sizeof(gint));
X 
X       if (remove_pos) {
X-	char *pwd = get_current_dir_name();
X+	char *pwd = getcwd(NULL,PATH_MAX);
X 	int root_len = strlen(pwd)+1; /* +1: jump appended / */
X 	gint i;
X 
END-of-xmmsctrl/files/patch-removefile.c
echo x - xmmsctrl/files/patch-Makefile
sed 's/^X//' >xmmsctrl/files/patch-Makefile << 'END-of-xmmsctrl/files/patch-Makefile'
X--- Makefile.orig	Sat Sep 24 00:53:00 2005
X+++ Makefile	Sat Sep 24 14:16:19 2005
X@@ -1,22 +1,20 @@
X # The prefix is ignored if you are not the super user and
X # xmmsctrl will be installed in your $HOME/bin
X-PREFIX   := /usr/local
X+PREFIX   ?= /usr/local
X 
X TARGET   := xmmsctrl
X VERSION  := 1.8
X DIRNAME  := $(shell basename $(PWD))
X 
X-CC       := gcc
X-WARN     := -Wall -Wshadow -Wmissing-prototypes -W
X+WARN     := -Wall -Wmissing-prototypes -W
X DEFS     := -DPRETTY_PRINT -D_GNU_SOURCE -DVERSION=\"$(VERSION)\"
X-CFLAGS   := $(WARN) -O2 $(shell xmms-config --cflags) $(DEFS)
X+CFLAGS   += ${WARN} $(shell xmms-config --cflags) $(DEFS) -pthread
X LDFLAGS  := $(shell xmms-config --libs)
X 
X all : $(TARGET) HELP
X 
X $(TARGET) : xmmsctrl.c removefile.c
X 	$(CC) -o $(TARGET) xmmsctrl.c removefile.c $(CFLAGS) $(LDFLAGS)
X-	strip xmmsctrl
X 
X HELP : xmmsctrl
X 	./xmmsctrl > HELP || true
END-of-xmmsctrl/files/patch-Makefile
exit
--- xmmsctrl ends here ---


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



More information about the freebsd-ports-bugs mailing list