From ba109d9095ed77acfc7c924f6543042c0a02674c Mon Sep 17 00:00:00 2001 From: Aidan O'Mahony Date: Sat, 26 Nov 2011 18:21:41 +1100 Subject: [PATCH 1/3] adding lsyncd addon --- .../addons/networking/backup/lsyncd/addon | 27 +++++++++++++ .../addons/networking/backup/lsyncd/build | 37 ++++++++++++++++++ packages/addons/networking/backup/lsyncd/meta | 38 +++++++++++++++++++ .../backup/lsyncd/source/default.py | 23 +++++++++++ 4 files changed, 125 insertions(+) create mode 100755 packages/addons/networking/backup/lsyncd/addon create mode 100755 packages/addons/networking/backup/lsyncd/build create mode 100644 packages/addons/networking/backup/lsyncd/meta create mode 100644 packages/addons/networking/backup/lsyncd/source/default.py diff --git a/packages/addons/networking/backup/lsyncd/addon b/packages/addons/networking/backup/lsyncd/addon new file mode 100755 index 0000000000..74f163fbae --- /dev/null +++ b/packages/addons/networking/backup/lsyncd/addon @@ -0,0 +1,27 @@ +#!/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 + cp $PKG_BUILD/lsyncd $ADDON_BUILD/$PKG_ADDON_ID/bin + chmod +x $ADDON_BUILD/$PKG_ADDON_ID/bin/lsyncd diff --git a/packages/addons/networking/backup/lsyncd/build b/packages/addons/networking/backup/lsyncd/build new file mode 100755 index 0000000000..58c4b8139d --- /dev/null +++ b/packages/addons/networking/backup/lsyncd/build @@ -0,0 +1,37 @@ +#!/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 LUA_LIBS="$SYSROOT_PREFIX/usr/lib/liblua.a" +export LUA_CFLAGS="-I$SYSROOT_PREFIX/usr/include" +export LDFLAGS="-lm" + +cd $PKG_BUILD +sed -i 's/\/usr\/bin\/rsync/\/storage\/.xbmc\/addons\/network.backup.rsync\/bin\/rsync/' lsyncd.lua +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + +make diff --git a/packages/addons/networking/backup/lsyncd/meta b/packages/addons/networking/backup/lsyncd/meta new file mode 100644 index 0000000000..df2df3fb91 --- /dev/null +++ b/packages/addons/networking/backup/lsyncd/meta @@ -0,0 +1,38 @@ +################################################################################ +# 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="lsyncd" +PKG_VERSION="2.0.5" +PKG_REV="0" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://code.google.com/p/lsyncd/" +PKG_URL="http://lsyncd.googlecode.com/files/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain libiconv lua" +PKG_PRIORITY="optional" +PKG_SECTION="network/backup" +PKG_SHORTDESC="Lsyncd (Live Syncing Daemon) synchronizes local directories with a remote targets" +PKG_LONGDESC="Lsyncd watches a local directory trees event monitor interface (inotify). It aggregates and combines events for a few seconds and then spawns one (or more) process(es) to synchronize the changes. By default this is rsync. Lsyncd is thus a light-weight live mirror solution that is comparatively easy to install not requiring new filesystems or blockdevices and does not hamper local filesystem performance." + +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.python.script" + +PKG_AUTORECONF="yes" diff --git a/packages/addons/networking/backup/lsyncd/source/default.py b/packages/addons/networking/backup/lsyncd/source/default.py new file mode 100644 index 0000000000..2085a1f96d --- /dev/null +++ b/packages/addons/networking/backup/lsyncd/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 os +import sys +import xbmcaddon From a9c1d5c1efee5c9c84bac9911aa8a143e494390b Mon Sep 17 00:00:00 2001 From: Aidan O'Mahony Date: Sat, 26 Nov 2011 18:23:31 +1100 Subject: [PATCH 2/3] change PKG_AUTORECONF to no --- packages/lang/lua/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lang/lua/meta b/packages/lang/lua/meta index a77ec37837..b90e86a428 100644 --- a/packages/lang/lua/meta +++ b/packages/lang/lua/meta @@ -33,4 +33,4 @@ PKG_SHORTDESC="lua: A lightweight, extensible programming language" PKG_LONGDESC="Lua is a powerful light-weight programming language designed for extending applications. Lua is also frequently used as a general-purpose, stand-alone language." PKG_IS_ADDON="no" -PKG_AUTORECONF="yes" +PKG_AUTORECONF="no" From 3d9a5fc30e45aed3742c93a7f7940d9ad417fc0c Mon Sep 17 00:00:00 2001 From: Aidan O'Mahony Date: Sat, 26 Nov 2011 19:42:03 +1100 Subject: [PATCH 3/3] changed license to GPL --- packages/addons/networking/backup/lsyncd/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/addons/networking/backup/lsyncd/meta b/packages/addons/networking/backup/lsyncd/meta index df2df3fb91..223a773370 100644 --- a/packages/addons/networking/backup/lsyncd/meta +++ b/packages/addons/networking/backup/lsyncd/meta @@ -22,7 +22,7 @@ PKG_NAME="lsyncd" PKG_VERSION="2.0.5" PKG_REV="0" PKG_ARCH="any" -PKG_LICENSE="OSS" +PKG_LICENSE="GPL" PKG_SITE="http://code.google.com/p/lsyncd/" PKG_URL="http://lsyncd.googlecode.com/files/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS=""