From b3a773e20a5ef05df67292d1dd9b1ca42b70ebd3 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 11 Oct 2010 01:27:30 +0200 Subject: [PATCH] new package: add package 'siglaunchd' (thanks much Wintemrute) Signed-off-by: Stephan Raue --- packages/sysutils/siglaunchd/build | 15 ++++++++ .../siglaunchd/config/siglaunchd.conf | 4 +++ .../sysutils/siglaunchd/init.d/13_siglaunchd | 32 +++++++++++++++++ packages/sysutils/siglaunchd/install | 10 ++++++ packages/sysutils/siglaunchd/meta | 14 ++++++++ .../siglaunchd/scripts/startnetworkdaemons | 36 +++++++++++++++++++ 6 files changed, 111 insertions(+) create mode 100755 packages/sysutils/siglaunchd/build create mode 100644 packages/sysutils/siglaunchd/config/siglaunchd.conf create mode 100755 packages/sysutils/siglaunchd/init.d/13_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..d4ffcb370d --- /dev/null +++ b/packages/sysutils/siglaunchd/build @@ -0,0 +1,15 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD +$AUTORECONF +./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..9aa446b87b --- /dev/null +++ b/packages/sysutils/siglaunchd/config/siglaunchd.conf @@ -0,0 +1,4 @@ +#"/usr/sbin/startnetwork"=org.freedesktop.DBus;org.freedesktop.DBus;/org/freedesktop/DBus;NameOwnerChanged;arg[0]="org.moblin.connman" +"/usr/sbin/startnetworkdaemons"=org.moblin.connman.Service;org.moblin.connman.Service;/profile/default/*;PropertyChanged;arg[0]="State",arg[1]="online" + + diff --git a/packages/sysutils/siglaunchd/init.d/13_siglaunchd b/packages/sysutils/siglaunchd/init.d/13_siglaunchd new file mode 100755 index 0000000000..0f585a6726 --- /dev/null +++ b/packages/sysutils/siglaunchd/init.d/13_siglaunchd @@ -0,0 +1,32 @@ +#!/bin/sh + +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.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 + +. /etc/profile + +progress "Starting siglaunchd" + + /usr/sbin/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..6c71fc7397 --- /dev/null +++ b/packages/sysutils/siglaunchd/install @@ -0,0 +1,10 @@ +#!/bin/sh + +. 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..050b96b27d --- /dev/null +++ b/packages/sysutils/siglaunchd/meta @@ -0,0 +1,14 @@ +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="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +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" diff --git a/packages/sysutils/siglaunchd/scripts/startnetworkdaemons b/packages/sysutils/siglaunchd/scripts/startnetworkdaemons new file mode 100755 index 0000000000..3aec70a1f6 --- /dev/null +++ b/packages/sysutils/siglaunchd/scripts/startnetworkdaemons @@ -0,0 +1,36 @@ +#!/bin/sh + +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.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 + +touch /var/run/network + +progress "Starting Network Init Scripts" + + RET=0 + for script in /etc/init.d/network/*; do + if grep -q -e "^# runlevels:.*$RUNLEVEL" $script; then + /bin/sh $script + S_RET=$? + test $S_RET -ge $RET && RET=$S_RET + fi + done