Airplayer-Suite addon

This commit is contained in:
peter 2011-08-31 16:18:48 +02:00
parent 3213e044cb
commit 86c18f0c73
26 changed files with 971 additions and 0 deletions

35
packages/3rdparty/multimedia/airplayer/meta vendored Executable file
View File

@ -0,0 +1,35 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="airplayer"
PKG_VERSION="7776e54"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/PascalW/Airplayer"
PKG_URL="http://dl.dropbox.com/u/8224157/OpenELEC-Ultra/addons/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="network"
PKG_SHORTDESC="Airplayer: script to make media playing software Airplay-compatible."
PKG_LONGDESC="Airplayer is a script to make media playing software Airplay-compatible. Airplayer features pluggable backends, making it possible to support different media players."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

39
packages/3rdparty/multimedia/libao/build vendored Executable file
View File

@ -0,0 +1,39 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
cd $PKG_BUILD
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--disable-esd \
--disable-esdtest \
--disable-pulse \
--enable-alsa \
--prefix /storage/.xbmc/addons/service.multimedia.Airplayer-Suite
make

35
packages/3rdparty/multimedia/libao/meta vendored Executable file
View File

@ -0,0 +1,35 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="libao"
PKG_VERSION="1.1.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Andywebs/shairport"
PKG_URL="http://downloads.xiph.org/releases/ao/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="network"
PKG_SHORTDESC="libao: a cross platform audio library"
PKG_LONGDESC="Libao is a cross-platform audio library that allows programs to output audio using a simple API on a wide variety of platforms."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -0,0 +1,36 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib"
cd $PKG_BUILD
python setup.py build --cross-compile
python setup.py install -O1 --skip-build --prefix /usr --root .install
find .install -name "*.py" -exec rm -rf "{}" ";"
find .install -name "*.pyo" -exec rm -rf "{}" ";"
rm -rf .install/usr/bin

35
packages/3rdparty/multimedia/pybonjour/meta vendored Executable file
View File

@ -0,0 +1,35 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="pybonjour"
PKG_VERSION="1.1.1"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://pybonjour.googlecode.com/"
PKG_URL="http://pybonjour.googlecode.com/files/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="Python"
PKG_PRIORITY="optional"
PKG_SECTION="service/multimedia"
PKG_SHORTDESC="pybonjour: A Zeroconf mDNS/DNS-SD responder"
PKG_LONGDESC="Pybonjour is a framework for Multicast DNS Service Discovery (mDNS/DNS-SD a.k.a. Zeroconf) on Linux. It allows programs to publish and discover services running on a local network with no specific configuration. For example, you can plug into a network and instantly find printers to print to, files to look at, and people to talk to."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

36
packages/3rdparty/multimedia/shairport/build vendored Executable file
View File

@ -0,0 +1,36 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
cd $PKG_BUILD
# fix me :(
LIBAO_DIR=../libao-1.1.0
# large buffer
sed -i 's|#define BUFFER_FRAMES 320|#define BUFFER_FRAMES 1024|g' hairtunes.h
sed -i 's|read = ab_read + 10;|read = ab_read + 50;|g' hairtunes.c
CFLAGS="-O2 -Wall -I$LIBAO_DIR/include" \
LDFLAGS="-lm -lpthread -L$LIBAO_DIR/src/.libs -lao -lssl" \
make

35
packages/3rdparty/multimedia/shairport/meta vendored Executable file
View File

@ -0,0 +1,35 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="shairport"
PKG_VERSION="346db95"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Andywebs/shairport"
PKG_URL="http://dl.dropbox.com/u/8224157/OpenELEC-Ultra/addons/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="network"
PKG_SHORTDESC="shairport: emulates AirPort Express"
PKG_LONGDESC="ShairPort emulates an AirPort Express for the purpose of streaming music from iTunes and compatible iPods."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -0,0 +1,66 @@
diff -uNr shairport_orig/Makefile shairport/Makefile
--- shairport_orig/Makefile 2011-08-09 23:07:40.000000000 +0200
+++ shairport/Makefile 2011-08-15 20:02:36.000000000 +0200
@@ -1,5 +1,5 @@
-CFLAGS:=-O2 -Wall $(shell pkg-config --cflags openssl ao)
-LDFLAGS:=-lm -lpthread $(shell pkg-config --libs openssl ao)
+CFLAGS?=-O2 -Wall $(shell pkg-config --cflags openssl ao)
+LDFLAGS?=-lm -lpthread $(shell pkg-config --libs openssl ao)
OBJS=socketlib.o shairport.o alac.o hairtunes.o
all: hairtunes shairport
diff -uNr shairport_orig/shairport.c shairport/shairport.c
--- shairport_orig/shairport.c 2011-08-09 23:07:40.000000000 +0200
+++ shairport/shairport.c 2011-08-09 11:37:52.000000000 +0200
@@ -51,6 +51,9 @@
#define HEADER_LOG_LEVEL LOG_DEBUG
#define AVAHI_LOG_LEVEL LOG_DEBUG
+char tAoDeviceName[56] = "";
+char tAoDriver[56] = "";
+
int main(int argc, char **argv)
{
char tHWID[HWID_SIZE] = {0,51,52,53,54,55};
@@ -129,6 +132,14 @@
{
kCurrentLogLevel = LOG_DEBUG_VV;
}
+ else if(!strncmp(arg, "--ao_driver=", 12))
+ {
+ strncpy(tAoDriver, arg+12, 55);
+ }
+ else if(!strncmp(arg, "--ao_devicename=", 16))
+ {
+ strncpy(tAoDeviceName, arg+16, 55);
+ }
else if(!strcmp(arg, "-h") || !strcmp(arg, "--help"))
{
slog(LOG_INFO, "ShairPort version 0.05 C port - Airport Express emulator\n");
@@ -140,6 +151,8 @@
slog(LOG_INFO, " -d Daemon mode\n");
slog(LOG_INFO, " -q, --quiet Supresses all output.\n");
slog(LOG_INFO, " -v,-v2,-v3,-vv Various debugging levels\n");
+ slog(LOG_INFO, " --ao_driver=driver Sets the ao driver (optional)\n");
+ slog(LOG_INFO, " --ao_devicename=devicename Sets the ao device name (optional)\n");
slog(LOG_INFO, "\n");
return 0;
}
@@ -731,8 +744,6 @@
slog(LOG_DEBUG_V, "Got %d for CPort and %d for TPort\n", tControlport, tTimingport);
char *tRtp = NULL;
char *tPipe = NULL;
- char *tAoDriver = NULL;
- char *tAoDeviceName = NULL;
char *tAoDeviceId = NULL;
// *************************************************
@@ -758,7 +769,7 @@
}
cleanupBuffers(pConn);
hairtunes_init(tKeys->aeskey, tKeys->aesiv, tKeys->fmt, tControlport, tTimingport,
- tDataport, tRtp, tPipe, tAoDriver, tAoDeviceName, tAoDeviceId);
+ tDataport, tRtp, tPipe, tAoDriver[0]!='\0'?tAoDriver:NULL, tAoDeviceName[0]!='\0'?tAoDeviceName:NULL, tAoDeviceId);
// Quit when finished.
slog(LOG_DEBUG, "Returned from hairtunes init....returning -1, should close out this whole side of the fork\n");

View File

@ -0,0 +1,36 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib"
cd $PKG_BUILD
python setup.py build --cross-compile
python setup.py install -O1 --skip-build --prefix /usr --root .install
find .install -name "*.py" -exec rm -rf "{}" ";"
find .install -name "*.pyo" -exec rm -rf "{}" ";"
rm -rf .install/usr/bin

View File

@ -0,0 +1,35 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="simplejson-ap"
PKG_VERSION="2.1.3"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://pypi.python.org/"
PKG_URL="http://dl.dropbox.com/u/8224157/OpenELEC-Ultra/addons/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="Python"
PKG_PRIORITY="optional"
PKG_SECTION="service/multimedia"
PKG_SHORTDESC="simplejson: JSON encoder and decoder for Python"
PKG_LONGDESC="simplejson is a simple, fast, complete, correct and extensible JSON <http://json.org> encoder and decoder for Python 2.5+. It is pure Python code with no dependencies, but includes an optional C extension for a serious speed boost."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

36
packages/3rdparty/multimedia/tornado-ap/build vendored Executable file
View File

@ -0,0 +1,36 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib"
cd $PKG_BUILD
python setup.py build --cross-compile
python setup.py install -O1 --skip-build --prefix /usr --root .install
find .install -name "*.py" -exec rm -rf "{}" ";"
find .install -name "*.pyo" -exec rm -rf "{}" ";"
rm -rf .install/usr/bin

35
packages/3rdparty/multimedia/tornado-ap/meta vendored Executable file
View File

@ -0,0 +1,35 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="tornado-ap"
PKG_VERSION="1.2.1"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.tornadoweb.org/"
PKG_URL="http://dl.dropbox.com/u/8224157/OpenELEC-Ultra/addons/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="Python"
PKG_PRIORITY="optional"
PKG_SECTION="service/multimedia"
PKG_SHORTDESC="tornado: a web server for Python"
PKG_LONGDESC="Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -0,0 +1,46 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin/
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib/ao/plugins-4/
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib/
cp $PKG_DIR/config/settings.xml $ADDON_BUILD/$PKG_ADDON_ID/settings-default.xml
cp $BUILD/pybonjour-1.1.1/pybonjour.py $ADDON_BUILD/$PKG_ADDON_ID/pylib/
cp -R $BUILD/tornado-ap-*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib/
cp -R $BUILD/simplejson-ap-*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib/
# to get libdns_sd.so.1 library
#sed -i 's|--disable-compat-libdns_sd|--enable-compat-libdns_sd|g' packages/network/avahi/build
cp $BUILD/avahi-*/avahi-compat-libdns_sd/.libs/libdns_sd.so.1 $ADDON_BUILD/$PKG_ADDON_ID/lib/
cp -a $BUILD/airplayer-*/airplayer/ $ADDON_BUILD/$PKG_ADDON_ID/bin/
cp $BUILD/libao-*/src/.libs/libao.so.4 $ADDON_BUILD/$PKG_ADDON_ID/lib/
cp $BUILD/libao-*/src/plugins/alsa/.libs/libalsa.so $ADDON_BUILD/$PKG_ADDON_ID/lib/ao/plugins-4/
cp $BUILD/libao-*/src/plugins/oss/.libs/liboss.so $ADDON_BUILD/$PKG_ADDON_ID/lib/ao/plugins-4/
cp $BUILD/shairport-*/shairport $ADDON_BUILD/$PKG_ADDON_ID/bin/
cp $BUILD/shairport-*/hairtunes $ADDON_BUILD/$PKG_ADDON_ID/bin/

View File

@ -0,0 +1,2 @@
0.99.5
- initial version airplayer-7776e54 and shairport-346db95

View File

@ -0,0 +1,7 @@
<settings>
<setting id="LOG_FILES" value="true" />
<setting id="SHAIRPORT_DEVICENAME" value="default" />
<setting id="SHAIRPORT_DRIVER" value="alsa" />
<setting id="SHAIRPORT_NAME" value="ShairPort" />
<setting id="AIRPLAYER_NAME" value="Airplayer" />
</settings>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,36 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="Airplayer-Suite"
PKG_VERSION="Suite"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/PascalW/Airplayer"
PKG_URL=""
PKG_DEPENDS="Python"
PKG_BUILD_DEPENDS="toolchain Python avahi pybonjour tornado-ap simplejson-ap airplayer libao shairport"
PKG_PRIORITY="optional"
PKG_SECTION="service/multimedia"
PKG_SHORTDESC="Airplayer and ShairPort programs"
PKG_LONGDESC="Airplayer makes make media playing software Airplay-compatible. Airplayer features pluggable backends, making it possible to support different media players. Send video and pictures from your iDevice to your Airplay enabled media player. Audio streaming is currently not supported. On the iDevice side IOS 4.2 or above is required. ShairPort emulates an AirPort Express for the purpose of streaming music from iTunes and compatible iPods."
PKG_IS_ADDON="yes"
PKG_ADDON_TYPE="xbmc.service"
PKG_AUTORECONF="no"

View File

@ -0,0 +1,84 @@
#
# got from http://stmlabs.com/forum/topic/asoundconf-simultaneous-output#post-896
# change line pcm "hw:1,7" to suit your box
#
#----
# /etc/asound.conf file designed to expand 2 channels through device 'clone_output'
# to output 2 channels to multiple devices
#
# Use aplay -l to find device numbers
#
#----
pcm.!default {
type plug
slave.pcm "dmixed_hdmi"
}
#-----
# Single channel dmixed. Crossfade works
#-----
pcm.hdmiout {
type plug
slave.pcm "dmixed_hdmi"
}
pcm.dmixed_hdmi {
type dmix
ipc_key 2024
slave {
pcm "hw:1,7" # hdmi
}
}
#-----
# multiple output portion begin (3 devices) dmix not supported.
#-----
pcm.clone_output {
type plug
slave.pcm "6channel_expander"
}
pcm.multi_pcm_device {
type multi;
slaves.a.pcm "hw:1,7"; # hdmi
slaves.a.channels 2;
slaves.b.pcm "hw:0,0"; # analog
slaves.b.channels 2;
slaves.c.pcm "hw:0,1"; # spdif
slaves.c.channels 2;
bindings.0.slave a;
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b;
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
bindings.4.slave c;
bindings.4.channel 0;
bindings.5.slave c;
bindings.5.channel 1;
}
ctl.multi_pcm_device {
type hw;
card 0;
}
pcm.6channel_expander {
type route;
slave.pcm "multi_pcm_device";
slave.channels 6;
ttable.0.0 1;
ttable.1.1 1;
ttable.0.2 1;
ttable.1.3 1;
ttable.0.4 1;
ttable.1.5 1;
}
ctl.6channel_expander {
type hw;
card 0;
}

View File

@ -0,0 +1,127 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# setup functions
read_xbmcconfig() {
grep "<$1>" $XBMC_SETTINGS | sed -e "s,[[:space:]]*<$1>,," -e "s,</$1>,,"
}
ADDON_ID="Airplayer-Suite"
ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.$ADDON_ID"
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.multimedia.$ADDON_ID"
AIRPLAYERSUITE_SETTINGS_XML="$ADDON_HOME/settings.xml"
AIRPLAYERSUITE_SETTINGS_CONF="/var/config/$ADDON_ID.conf"
XBMC_SETTINGS="$HOME/.xbmc/userdata/guisettings.xml"
# create default config
mkdir -p $ADDON_HOME
if [ ! -f "$AIRPLAYERSUITE_SETTINGS_XML" ]; then
cp $ADDON_DIR/settings-default.xml $AIRPLAYERSUITE_SETTINGS_XML
fi
# convert xml file to bash variables and use them
if [ -f "$AIRPLAYERSUITE_SETTINGS_XML" ]; then
mkdir -p /var/config/
awk -F\" '{print $2"=\""$4"\""}' "$AIRPLAYERSUITE_SETTINGS_XML" | sed '/^=/d' > $AIRPLAYERSUITE_SETTINGS_CONF
. $AIRPLAYERSUITE_SETTINGS_CONF
# replace spaces with underscore
SHAIRPORT_NAME=${SHAIRPORT_NAME// /_}
AIRPLAYER_NAME=${AIRPLAYER_NAME// /_}
else
LOG_FILES="true"
SHAIRPORT_DEVICENAME="default"
SHAIRPORT_DRIVER="alsa"
SHAIRPORT_NAME="ShairPort"
AIRPLAYER_NAME="Airplayer"
fi
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ADDON_DIR/lib"
export PYTHONPATH="$ADDON_DIR/pylib"
if [ "$LOG_FILES" = "true" ]; then
LOG_FILE_SHAIRPORT="$ADDON_HOME/shairport.log"
LOG_FILE_AIRPLAYER="$ADDON_HOME/airplayer.log"
PID_FILE_AIRPLAYER="$ADDON_HOME/airplayer.pid"
ADDON_ARG_SHAIRPORT="-v --apname=$SHAIRPORT_NAME --ao_driver=$SHAIRPORT_DRIVER --ao_devicename=$SHAIRPORT_DEVICENAME"
ADDON_ARG_AIRPLAYER="-d -p $PID_FILE_AIRPLAYER -l $LOG_FILE_AIRPLAYER"
else
LOG_FILE_SHAIRPORT="/dev/null"
LOG_FILE_AIRPLAYER="/dev/null"
PID_FILE_AIRPLAYER="$ADDON_HOME/airplayer.pid"
ADDON_ARG_SHAIRPORT="--apname=$SHAIRPORT_NAME --ao_driver=$SHAIRPORT_DRIVER --ao_devicename=$SHAIRPORT_DEVICENAME"
ADDON_ARG_AIRPLAYER="-d -p $PID_FILE_AIRPLAYER -l $LOG_FILE_AIRPLAYER"
fi
AIRPLAYER_SETTINGS_TMP="/tmp/airplayer_settings.py"
AIRPLAYER_SETTINGS_ORIG="$ADDON_DIR/bin/airplayer/settings.py"
# first copy to tmp
cp "$AIRPLAYER_SETTINGS_ORIG" "$AIRPLAYER_SETTINGS_TMP"
# read xbmc settings
XBMC_PORT=`read_xbmcconfig webserverport`
XBMC_USER=`read_xbmcconfig webserverusername`
XBMC_PWD=`read_xbmcconfig webserverpassword`
# modify with real values
sed -i "s|MEDIA_BACKEND_PORT = .*|MEDIA_BACKEND_PORT = $XBMC_PORT|g" $AIRPLAYER_SETTINGS_TMP
if [ -n "XBMC_USER" ]; then
sed -i "s|MEDIA_BACKEND_USERNAME = .*|MEDIA_BACKEND_USERNAME = '$XBMC_USER'|g" $AIRPLAYER_SETTINGS_TMP
else
sed -i "s|MEDIA_BACKEND_USERNAME = .*|MEDIA_BACKEND_USERNAME = None|g" $AIRPLAYER_SETTINGS_TMP
fi
if [ -n "XBMC_PWD" ]; then
sed -i "s|MEDIA_BACKEND_PASSWORD = .*|MEDIA_BACKEND_PASSWORD = '$XBMC_PWD'|g" $AIRPLAYER_SETTINGS_TMP
else
sed -i "s|MEDIA_BACKEND_PASSWORD = .*|MEDIA_BACKEND_PASSWORD = None|g" $AIRPLAYER_SETTINGS_TMP
fi
if [ -n "AIRPLAYER_NAME" ]; then
sed -i "s|AIRPLAY_HOSTNAME = .*|AIRPLAY_HOSTNAME = '$AIRPLAYER_NAME'|g" $AIRPLAYER_SETTINGS_TMP
else
sed -i "s|AIRPLAY_HOSTNAME = .*|AIRPLAY_HOSTNAME = None|g" $AIRPLAYER_SETTINGS_TMP
fi
# if different copy it back
if [ "`md5sum "$AIRPLAYER_SETTINGS_TMP" | cut -d ' ' -f 1`" != "`md5sum "$AIRPLAYER_SETTINGS_ORIG" | cut -d ' ' -f 1`" ]; then
cp "$AIRPLAYER_SETTINGS_TMP" "$AIRPLAYER_SETTINGS_ORIG"
fi
rm "$AIRPLAYER_SETTINGS_TMP"
# restart avahi daemon because sometimes doesn't start correctly at boot time
avahi-daemon -k
/bin/sh /etc/init.d/53_avahi
# run shairport
if [ ! $(pidof shairport) ]; then
$ADDON_DIR/bin/shairport $ADDON_ARG_SHAIRPORT >$LOG_FILE_SHAIRPORT 2>&1 &
fi
# run airplayer
ps -ef | grep airplayer.py | grep -v grep >/dev/null 2>&1
if [ "$?" != "0" ]; then
python $ADDON_DIR/bin/airplayer/airplayer.py $ADDON_ARG_AIRPLAYER
fi

View File

@ -0,0 +1,23 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
import xbmc, time, os, subprocess
os.system("Airplayer-Suite.service")

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<!-- Airplayer-Suite -->
<string id="1000">Airplayer and ShairPort</string>
<string id="1010">Identification</string>
<string id="1020">Airplayer name</string>
<string id="1030">ShairPort name</string>
<string id="1040">ShairPort sound output</string>
<string id="1050">ao driver</string>
<string id="1060">ao device name</string>
<string id="1070">Log files</string>
<string id="1080">Log file</string>
<string id="1090">Enabled</string>
</strings>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<!-- Airplayer-Suite -->
<category label="1000">
<setting label="1010" type="lsep"/>
<setting type="sep" />
<setting id="AIRPLAYER_NAME" type="text" label="1020" default="Airplayer"/>
<setting id="SHAIRPORT_NAME" type="text" label="1030" default="ShairPort"/>
<setting label="1040" type="lsep"/>
<setting type="sep" />
<setting id="SHAIRPORT_DRIVER" type="text" label="1050" default="alsa"/>
<setting id="SHAIRPORT_DEVICENAME" type="text" label="1060" default="default"/>
</category>
<category label="1070">
<setting label="1080" type="lsep"/>
<setting type="sep" />
<setting id="LOG_FILES" type="bool" label="1090" default="true" />
</category>
</settings>

43
tools/mkpkg/mkpkg_airplayer Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
echo "getting sources..."
if [ ! -d Airplayer.git ]; then
git clone git://github.com/PascalW/Airplayer.git Airplayer.git
fi
cd Airplayer.git
git pull
GIT_REV=`git log -n1 --format=%h`
cd ..
echo "copying sources..."
rm -rf airplayer-$GIT_REV
cp -R Airplayer.git airplayer-$GIT_REV
echo "cleaning sources..."
rm -rf airplayer-$GIT_REV/.git
echo "packing sources..."
tar cvJf airplayer-$GIT_REV.tar.xz airplayer-$GIT_REV
echo "remove temporary sourcedir..."
rm -rf airplayer-$GIT_REV

43
tools/mkpkg/mkpkg_shairport Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
echo "getting sources..."
if [ ! -d shairport.git ]; then
git clone git://github.com/albertz/shairport.git shairport.git
fi
cd shairport.git
git pull
GIT_REV=`git log -n1 --format=%h`
cd ..
echo "copying sources..."
rm -rf shairport-$GIT_REV
cp -R shairport.git shairport-$GIT_REV
echo "cleaning sources..."
rm -rf shairport-$GIT_REV/.git
echo "packing sources..."
tar cvJf shairport-$GIT_REV.tar.xz shairport-$GIT_REV
echo "remove temporary sourcedir..."
rm -rf shairport-$GIT_REV

34
tools/mkpkg/mkpkg_simplejson-ap Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
echo "getting sources..."
if [ ! -f simplejson-2.1.3.tar.gz ]; then
wget -O simplejson-2.1.3.tar.gz http://pypi.python.org/packages/source/s/simplejson/simplejson-2.1.3.tar.gz
fi
tar xzf simplejson-2.1.3.tar.gz
echo "renaming folder name..."
mv simplejson-2.1.3 simplejson-ap-2.1.3
echo "packing sources..."
tar czf simplejson-ap-2.1.3.tar.gz simplejson-ap-2.1.3
echo "remove temporary sourcedir..."
rm -rf simplejson-ap-2.1.3

34
tools/mkpkg/mkpkg_tornado-ap Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
echo "getting sources..."
if [ ! -f tornado-1.2.1.tar.gz ]; then
wget -O tornado-1.2.1.tar.gz https://github.com/downloads/facebook/tornado/tornado-1.2.1.tar.gz
fi
tar xzf tornado-1.2.1.tar.gz
echo "renaming folder name..."
mv tornado-1.2.1 tornado-ap-1.2.1
echo "packing sources..."
tar czf tornado-ap-1.2.1.tar.gz tornado-ap-1.2.1
echo "remove temporary sourcedir..."
rm -rf tornado-ap-1.2.1