diff --git a/packages/sysutils/busybox/meta b/packages/sysutils/busybox/meta index fdad569d3f..2a8d554877 100644 --- a/packages/sysutils/busybox/meta +++ b/packages/sysutils/busybox/meta @@ -25,7 +25,7 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.busybox.net" PKG_URL="http://busybox.net/downloads/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="grep hdparm" +PKG_DEPENDS="grep hdparm speedcontrol" PKG_BUILD_DEPENDS="toolchain busybox-hosttools" PKG_PRIORITY="required" PKG_SECTION="system" diff --git a/packages/sysutils/speedcontrol/build b/packages/sysutils/speedcontrol/build new file mode 100755 index 0000000000..0e839063f4 --- /dev/null +++ b/packages/sysutils/speedcontrol/build @@ -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 + +cd $PKG_BUILD + +$CC -o $1 $1.c diff --git a/packages/sysutils/speedcontrol/init.d/10_cdrom b/packages/sysutils/speedcontrol/init.d/10_cdrom new file mode 100644 index 0000000000..767a6f44d1 --- /dev/null +++ b/packages/sysutils/speedcontrol/init.d/10_cdrom @@ -0,0 +1,27 @@ +################################################################################ +# 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 cdrom settings +# +# runlevels: openelec, installer, textmode + +progress "Deactivate CDROM lock" + sysctl -w dev.cdrom.lock=0 > /dev/null 2>&1 & diff --git a/packages/sysutils/speedcontrol/install b/packages/sysutils/speedcontrol/install new file mode 100755 index 0000000000..e12e24a089 --- /dev/null +++ b/packages/sysutils/speedcontrol/install @@ -0,0 +1,26 @@ +#!/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 $INSTALL/usr/bin + cp $PKG_BUILD/$1 $INSTALL/usr/bin diff --git a/packages/sysutils/speedcontrol/meta b/packages/sysutils/speedcontrol/meta new file mode 100644 index 0000000000..2bb928123b --- /dev/null +++ b/packages/sysutils/speedcontrol/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="speedcontrol" +PKG_VERSION="1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://noto.de" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="speedcontrol: a tool to setup cdrom drive speed" +PKG_LONGDESC="speedcontrol is a tool to setup cdrom drive speed" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/speedcontrol/udev.d/61-cdrom.rules b/packages/sysutils/speedcontrol/udev.d/61-cdrom.rules new file mode 100644 index 0000000000..b472ce0f40 --- /dev/null +++ b/packages/sysutils/speedcontrol/udev.d/61-cdrom.rules @@ -0,0 +1,27 @@ +################################################################################ +# 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 +################################################################################ + +# only do anything on block devices which are not removed +ACTION!="add|change", GOTO="cdrom_end" + +# set CDROM speed +KERNEL=="sr*", RUN+="/usr/bin/speedcontrol -x8 /dev/%k" + +LABEL="cdrom_end"