From cdec677b9efb8d24a6e0f645e68195baa05011a6 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Thu, 13 Jan 2011 01:12:28 +0100 Subject: [PATCH] new package: readd package 'siglaunchd' Signed-off-by: Stephan Raue --- packages/sysutils/siglaunchd/build | 35 ++++++++++++++++++ .../siglaunchd/config/siglaunchd.conf | 23 ++++++++++++ .../sysutils/siglaunchd/init.d/22_siglaunchd | 29 +++++++++++++++ packages/sysutils/siglaunchd/install | 31 ++++++++++++++++ packages/sysutils/siglaunchd/meta | 37 +++++++++++++++++++ .../siglaunchd/scripts/startnetworkdaemons | 32 ++++++++++++++++ 6 files changed, 187 insertions(+) create mode 100755 packages/sysutils/siglaunchd/build create mode 100644 packages/sysutils/siglaunchd/config/siglaunchd.conf create mode 100644 packages/sysutils/siglaunchd/init.d/22_siglaunchd create mode 100755 packages/sysutils/siglaunchd/install create mode 100644 packages/sysutils/siglaunchd/meta create mode 100755 packages/sysutils/siglaunchd/scripts/startnetworkdaemons diff --git a/packages/sysutils/siglaunchd/build b/packages/sysutils/siglaunchd/build new file mode 100755 index 0000000000..1cff0f71b8 --- /dev/null +++ b/packages/sysutils/siglaunchd/build @@ -0,0 +1,35 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +#      Copyright (C) 2010-2011 Roman Weber (roman@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 \ + --sbindir=/usr/sbin \ + --exec-prefix=/usr \ + --localstatedir=/var \ + --sysconfdir=/etc \ + +make diff --git a/packages/sysutils/siglaunchd/config/siglaunchd.conf b/packages/sysutils/siglaunchd/config/siglaunchd.conf new file mode 100644 index 0000000000..4dc76121a8 --- /dev/null +++ b/packages/sysutils/siglaunchd/config/siglaunchd.conf @@ -0,0 +1,23 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +#      Copyright (C) 2010-2011 Roman Weber (roman@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 +################################################################################ + +#"/usr/sbin/startnetwork"=org.freedesktop.DBus;org.freedesktop.DBus;/org/freedesktop/DBus;NameOwnerChanged;arg[0]="org.moblin.connman" +"/usr/sbin/startnetworkdaemons"=net.connman.Service;net.connman.Service;/profile/default/*;PropertyChanged;arg[0]="State",arg[1]="online" diff --git a/packages/sysutils/siglaunchd/init.d/22_siglaunchd b/packages/sysutils/siglaunchd/init.d/22_siglaunchd new file mode 100644 index 0000000000..d0c7ac0e93 --- /dev/null +++ b/packages/sysutils/siglaunchd/init.d/22_siglaunchd @@ -0,0 +1,29 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +#      Copyright (C) 2010-2011 Roman Weber (roman@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 +################################################################################ +# +# starting siglaunchd +# +# runlevels: openelec, textmode + +( + progress "Starting siglaunchd" + siglaunchd -f /etc/siglaunchd.conf >/dev/null 2>&1 +)& \ No newline at end of file diff --git a/packages/sysutils/siglaunchd/install b/packages/sysutils/siglaunchd/install new file mode 100755 index 0000000000..80a31c12ec --- /dev/null +++ b/packages/sysutils/siglaunchd/install @@ -0,0 +1,31 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +#      Copyright (C) 2010-2011 Roman Weber (roman@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 $INSTALL/usr/sbin + cp $PKG_BUILD/src/siglaunchd $INSTALL/usr/sbin + cp $PKG_DIR/scripts/* $INSTALL/usr/sbin + +mkdir -p $INSTALL/etc + cp $PKG_DIR/config/siglaunchd.conf $INSTALL/etc/siglaunchd.conf diff --git a/packages/sysutils/siglaunchd/meta b/packages/sysutils/siglaunchd/meta new file mode 100644 index 0000000000..d20e423c03 --- /dev/null +++ b/packages/sysutils/siglaunchd/meta @@ -0,0 +1,37 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +#      Copyright (C) 2010-2011 Roman Weber (roman@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="siglaunchd" +PKG_VERSION="40" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://wiki.openmoko.org/wiki/Siglaunchd" +PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="dbus glib dbus-glib" +PKG_BUILD_DEPENDS="toolchain dbus glib dbus-glib" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="siglaunchd: This project is daemon which listens to dbus signals and runs applications accordingly." +PKG_LONGDESC="This project is daemon which listens to dbus signals and runs applications accordingly. The signals, application to run and some rules that will be evaluated against incoming dbus signals can be easily changed in the configuration file. " +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/siglaunchd/scripts/startnetworkdaemons b/packages/sysutils/siglaunchd/scripts/startnetworkdaemons new file mode 100755 index 0000000000..29e10d16d9 --- /dev/null +++ b/packages/sysutils/siglaunchd/scripts/startnetworkdaemons @@ -0,0 +1,32 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +#      Copyright (C) 2010-2011 Roman Weber (roman@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 +################################################################################ + +. /etc/profile + +progress "Starting Network Init Scripts" + + for script in /etc/init.d/network/*; do + if grep -q -e "^# runlevels:.*$RUNLEVEL" $script; then + . $script + fi + done