You are not logged in.

#1 2005-02-05 02:11:31

Cron0
Member
Registered: 2005-01-25
Posts: 14

[new] ccxstream -- XBOX XStream Server

Hi everyone!
I just made a PKGBUILD to install ccXstream which is a XBOX streaming server. I took some ideas from gentoo's ebuild of ccxstream.
I am not sure if with I did with init scripts and config file is OK because they do not come with the source package, but here are the files:


PKGBUILD

pkgname=ccxstream
pkgver=1.0.15
pkgrel=1
pkgdesc="XStream Server"
url="http://xbplayer.sourceforge.net"
#depends=('ncurses readline')
backup=('/etc/ccxstream.conf')
source=("http://heanet.dl.sourceforge.net/sourceforge/xbmc/ccxstream-$pkgver-unrar_v2.tar.bz2")
md5sums=('58fe42422d4692bb1bc4a1521292b86c')

build() {
  cd $startdir/src/$pkgname-$pkgver-unrar_v2
  patch -p0 < $startdir/ccxstream-termcap.patch
  make || return 1
  mkdir -p $startdir/pkg/usr/bin
  mkdir -p $startdir/pkg/etc/rc.d
  mkdir -p $startdir/pkg/etc/conf.d
  cp ./ccxstream $startdir/pkg/usr/bin/
  cp ./ccxtest $startdir/pkg/usr/bin/
  cp ../../ccxstream.confd $startdir/pkg/etc/conf.d/ccxstream
  chmod +x ../../ccxstream.initd
  cp ../../ccxstream.initd $startdir/pkg/etc/rc.d/ccxstream

}

ccxstream-termcap.patch

--- Makefile.orig       2003-12-27 04:57:23.733355080 +0000
+++ Makefile    2003-12-27 04:57:34.506717280 +0000
@@ -22,7 +22,7 @@
 #

 CFLAGS+=-I. -g
-LDFLAGS+=-lreadline -ltermcap
+LDFLAGS+=-lreadline -lncurses

 all: ccxstream ccxtest

ccxstream.confd

#!/bin/sh

#Uncomment the line below to begin (mandatory)
#CHECK=YES

#Below the user to run the service as (mandatory)
RUNASUSER="root"

#Below the password on the XBOX (optional)
#REMOTEPASS="xboxpassword"

#Below the interface to listen on (mandatory)
LISTENINTERFACE="192.168.1.1"

FOLLOWSYMLINKS=YES

#Comment (optional)
#SERVERCOMMENT="Video and MP3 server powered by Gentoo. Watch and listen and ENJOY."

#Shares to make available (mandatory)
SHARES="movies=/data/videos audio=/data/mp3"

#Location of binary file. Leave default unless you know what you're doing (mandatory)
BIN="/usr/bin/ccxstream"

#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#

DIR="-"

PIDFILE=/var/run/ccxstream.pid

PARAMS="-f -F $PIDFILE -r $DIR -u $RUNASUSER"

if test "$FOLLOWSYMLINKS" == "YES" ; then
    PARAMS="$PARAMS -L"
fi

if test "x$REMOTEPASS" != "x" ; then
    PARAMS="$PARAMS -P $REMOTEPASS"
fi

if test "x$LISTENINTERFACE" != "x" ; then
    PARAMS="$PARAMS -l $LISTENINTERFACE"
fi

for i in $SHARES ; do
    PARAMS="$PARAMS -S $i"
done

if test "x$SERVERCOMMENT" = "x" ; then
    SERVERCOMMENT="`hostname`"
fi

ccxstream.initd

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/bin/ccxstream`
case "$1" in
  start)
    stat_busy "Starting ccxstream"
    . /etc/conf.d/ccxstream
    if [ "${CHECK}" = "YES" ]; then
      [ -z "$PID" ] && /usr/bin/ccxstream ${PARAMS} -C ${SERVERCOMMENT}
      if [ $? -gt 0 ]; then
        stat_fail
      else
        echo $PID > /var/run/ccxstream.pid
        add_daemon ccxstream
        stat_done
      fi
    else
      stat_fail
      echo -e "Please setup /etc/conf.d/ccxstream before starting ccXstream"
    fi
    ;;
  stop)
    stat_busy "Stopping ccxstream"
    [ ! -z "$PID" ] && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm /var/run/ccxstream.pid
      rm_daemon ccxstream
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0

I would be willing to post a tarball of all the files for thoses who don't like cpoy/pasting everything but I don't have any file hosting services...

I hope that PKGBUILD may be of any help to the archlinux community smile

cron0

Offline

#2 2005-03-25 08:32:40

allanon
Member
From: Enschede, The Netherlands
Registered: 2004-02-10
Posts: 52

Re: [new] ccxstream -- XBOX XStream Server

Most appreciated, I plan to put a SmartXX into my Xbox any day now.

Offline

Board footer

Powered by FluxBB