diff --git a/packages/3rdparty/multimedia/airplayer/meta b/packages/3rdparty/multimedia/airplayer/meta new file mode 100755 index 0000000000..df759be40e --- /dev/null +++ b/packages/3rdparty/multimedia/airplayer/meta @@ -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" diff --git a/packages/3rdparty/multimedia/libao/build b/packages/3rdparty/multimedia/libao/build new file mode 100755 index 0000000000..98a5a9342e --- /dev/null +++ b/packages/3rdparty/multimedia/libao/build @@ -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 diff --git a/packages/3rdparty/multimedia/libao/meta b/packages/3rdparty/multimedia/libao/meta new file mode 100755 index 0000000000..9d3153e9a1 --- /dev/null +++ b/packages/3rdparty/multimedia/libao/meta @@ -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" diff --git a/packages/3rdparty/multimedia/pybonjour/build_not_used b/packages/3rdparty/multimedia/pybonjour/build_not_used new file mode 100755 index 0000000000..3d37a7f15b --- /dev/null +++ b/packages/3rdparty/multimedia/pybonjour/build_not_used @@ -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 diff --git a/packages/3rdparty/multimedia/pybonjour/meta b/packages/3rdparty/multimedia/pybonjour/meta new file mode 100755 index 0000000000..c7f2a666e7 --- /dev/null +++ b/packages/3rdparty/multimedia/pybonjour/meta @@ -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" diff --git a/packages/3rdparty/multimedia/shairport/build b/packages/3rdparty/multimedia/shairport/build new file mode 100755 index 0000000000..2e6df72fee --- /dev/null +++ b/packages/3rdparty/multimedia/shairport/build @@ -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 diff --git a/packages/3rdparty/multimedia/shairport/meta b/packages/3rdparty/multimedia/shairport/meta new file mode 100755 index 0000000000..2bf3666181 --- /dev/null +++ b/packages/3rdparty/multimedia/shairport/meta @@ -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" diff --git a/packages/3rdparty/multimedia/shairport/patches/shairport-346db95-ao_select-0.1.patch b/packages/3rdparty/multimedia/shairport/patches/shairport-346db95-ao_select-0.1.patch new file mode 100755 index 0000000000..a9fc7614ab --- /dev/null +++ b/packages/3rdparty/multimedia/shairport/patches/shairport-346db95-ao_select-0.1.patch @@ -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"); diff --git a/packages/3rdparty/multimedia/simplejson-ap/build b/packages/3rdparty/multimedia/simplejson-ap/build new file mode 100755 index 0000000000..3d37a7f15b --- /dev/null +++ b/packages/3rdparty/multimedia/simplejson-ap/build @@ -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 diff --git a/packages/3rdparty/multimedia/simplejson-ap/meta b/packages/3rdparty/multimedia/simplejson-ap/meta new file mode 100755 index 0000000000..40091c5a84 --- /dev/null +++ b/packages/3rdparty/multimedia/simplejson-ap/meta @@ -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 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" diff --git a/packages/3rdparty/multimedia/tornado-ap/build b/packages/3rdparty/multimedia/tornado-ap/build new file mode 100755 index 0000000000..3d37a7f15b --- /dev/null +++ b/packages/3rdparty/multimedia/tornado-ap/build @@ -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 diff --git a/packages/3rdparty/multimedia/tornado-ap/meta b/packages/3rdparty/multimedia/tornado-ap/meta new file mode 100755 index 0000000000..cee56a1840 --- /dev/null +++ b/packages/3rdparty/multimedia/tornado-ap/meta @@ -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" diff --git a/packages/addons/service/multimedia/Airplayer-Suite/addon b/packages/addons/service/multimedia/Airplayer-Suite/addon new file mode 100755 index 0000000000..314e7f2cc0 --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/addon @@ -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/ diff --git a/packages/addons/service/multimedia/Airplayer-Suite/changelog.txt b/packages/addons/service/multimedia/Airplayer-Suite/changelog.txt new file mode 100755 index 0000000000..4bace83caf --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/changelog.txt @@ -0,0 +1,2 @@ +0.99.5 +- initial version airplayer-7776e54 and shairport-346db95 diff --git a/packages/addons/service/multimedia/Airplayer-Suite/config/settings.xml b/packages/addons/service/multimedia/Airplayer-Suite/config/settings.xml new file mode 100755 index 0000000000..4e9671b6d6 --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/config/settings.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/addons/service/multimedia/Airplayer-Suite/icon/icon.png b/packages/addons/service/multimedia/Airplayer-Suite/icon/icon.png new file mode 100755 index 0000000000..a0e56d5f54 Binary files /dev/null and b/packages/addons/service/multimedia/Airplayer-Suite/icon/icon.png differ diff --git a/packages/addons/service/multimedia/Airplayer-Suite/meta b/packages/addons/service/multimedia/Airplayer-Suite/meta new file mode 100755 index 0000000000..e1c51358ad --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/meta @@ -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" diff --git a/packages/addons/service/multimedia/Airplayer-Suite/source/asound.conf_ultra_stmlabs b/packages/addons/service/multimedia/Airplayer-Suite/source/asound.conf_ultra_stmlabs new file mode 100755 index 0000000000..d687429de0 --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/source/asound.conf_ultra_stmlabs @@ -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; +} diff --git a/packages/addons/service/multimedia/Airplayer-Suite/source/bin/Airplayer-Suite.service b/packages/addons/service/multimedia/Airplayer-Suite/source/bin/Airplayer-Suite.service new file mode 100755 index 0000000000..d68edb6311 --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/source/bin/Airplayer-Suite.service @@ -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,,," +} + + 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 diff --git a/packages/addons/service/multimedia/Airplayer-Suite/source/default.py b/packages/addons/service/multimedia/Airplayer-Suite/source/default.py new file mode 100755 index 0000000000..cca9fa4207 --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/source/default.py @@ -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") diff --git a/packages/addons/service/multimedia/Airplayer-Suite/source/resources/language/English/strings.xml b/packages/addons/service/multimedia/Airplayer-Suite/source/resources/language/English/strings.xml new file mode 100755 index 0000000000..966e7e8537 --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/source/resources/language/English/strings.xml @@ -0,0 +1,14 @@ + + + + Airplayer and ShairPort + Identification + Airplayer name + ShairPort name + ShairPort sound output + ao driver + ao device name + Log files + Log file + Enabled + diff --git a/packages/addons/service/multimedia/Airplayer-Suite/source/resources/settings.xml b/packages/addons/service/multimedia/Airplayer-Suite/source/resources/settings.xml new file mode 100755 index 0000000000..100421536b --- /dev/null +++ b/packages/addons/service/multimedia/Airplayer-Suite/source/resources/settings.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tools/mkpkg/mkpkg_airplayer b/tools/mkpkg/mkpkg_airplayer new file mode 100755 index 0000000000..15a0d71a1e --- /dev/null +++ b/tools/mkpkg/mkpkg_airplayer @@ -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 diff --git a/tools/mkpkg/mkpkg_shairport b/tools/mkpkg/mkpkg_shairport new file mode 100755 index 0000000000..161f13e2a2 --- /dev/null +++ b/tools/mkpkg/mkpkg_shairport @@ -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 diff --git a/tools/mkpkg/mkpkg_simplejson-ap b/tools/mkpkg/mkpkg_simplejson-ap new file mode 100755 index 0000000000..16ef14a76c --- /dev/null +++ b/tools/mkpkg/mkpkg_simplejson-ap @@ -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 diff --git a/tools/mkpkg/mkpkg_tornado-ap b/tools/mkpkg/mkpkg_tornado-ap new file mode 100755 index 0000000000..bcb40ecb2f --- /dev/null +++ b/tools/mkpkg/mkpkg_tornado-ap @@ -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