diff options
author | Dave Margell <dmargell@gmail.com> | 2010-05-13 01:01:08 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-13 01:01:08 +0200 |
commit | e61301bbbde3ca393017974636d72120efb97561 (patch) | |
tree | 51fa7e4e47b3768b8c8f288e083c2481cde350f2 | |
parent | 720ef9f1923db7e4151335b6bd1b27a8afd5f274 (diff) |
system/schedtool: Added to 13.0 repository
-rw-r--r-- | system/schedtool/README | 13 | ||||
-rw-r--r-- | system/schedtool/schedtool-Makefile.patch | 42 | ||||
-rw-r--r-- | system/schedtool/schedtool.SlackBuild | 65 | ||||
-rw-r--r-- | system/schedtool/schedtool.info | 10 | ||||
-rw-r--r-- | system/schedtool/slack-desc | 19 |
5 files changed, 149 insertions, 0 deletions
diff --git a/system/schedtool/README b/system/schedtool/README new file mode 100644 index 000000000000..f040c5dc53e8 --- /dev/null +++ b/system/schedtool/README @@ -0,0 +1,13 @@ +Schedtool interfaces with the Linux CPU scheduler. + +It allows the user to set and query the CPU-affinity and nice-levels of +processes, as well as all scheduling policies, like batch or real-time +(RR/FIFO) classes and their priorities. It can be used to avoid skipping +for A/V-applications, to lock processes onto certain CPUs on SMP/NUMA +systems, or to adjust nice-levels of lesser important jobs to maintain a +high amount of interactive responsiveness under high load. + +All special scheduling classes of the -ck kernel patchset are also supported. + +Certain modes (as of this writing: SCHED_IDLEPRIO and SCHED_ISO) need a +patched kernel; see the INSTALL file for details. diff --git a/system/schedtool/schedtool-Makefile.patch b/system/schedtool/schedtool-Makefile.patch new file mode 100644 index 000000000000..988bb361df6b --- /dev/null +++ b/system/schedtool/schedtool-Makefile.patch @@ -0,0 +1,42 @@ +diff -Nur schedtool-1.3.0.orig/Makefile schedtool-1.3.0/Makefile +--- schedtool-1.3.0.orig/Makefile 2008-09-15 08:46:35.000000000 -0500 ++++ schedtool-1.3.0/Makefile 2009-11-01 22:13:27.290962705 -0600 +@@ -1,11 +1,13 @@ + # go on and adjust here if you don't like those flags +-CFLAGS=-Os -fomit-frame-pointer -s -pipe +-#CFLAGS=-Wall -Os -fomit-frame-pointer -s -pipe -DDEBUG ++OPT=-Os ++CFLAGS=$(OPT) -fomit-frame-pointer -s -pipe ++#CFLAGS=-Wall $(OPT) -fomit-frame-pointer -s -pipe -DDEBUG + CC=gcc + # likewise, if you want to change the destination prefix + DESTDIR= +-DESTPREFIX=/usr/local +-MANDIR=$(DESTPREFIX)/share/man/man8 ++PREFIX=/usr/local ++MANDIR=$(PREFIX)/share/man ++DOCDIR=$(PREFIX)/share/doc/$(RELEASE) + GZIP=gzip -9 + TARGET=schedtool + DOCS=LICENSE README INSTALL SCHED_DESIGN +@@ -20,14 +22,14 @@ + rm -f *~ *.s + + install: all install-doc zipman +- install -d $(DESTDIR)$(DESTPREFIX)/bin +- install -p -c $(TARGET) $(DESTDIR)$(DESTPREFIX)/bin +- install -d $(DESTDIR)$(MANDIR) +- install -p -c schedtool.8.gz $(DESTDIR)$(MANDIR) ++ install -d $(DESTDIR)$(PREFIX)/bin ++ install -p -c $(TARGET) $(DESTDIR)$(PREFIX)/bin ++ install -d $(DESTDIR)$(MANDIR)/man8 ++ install -p -c -m 0644 schedtool.8.gz $(DESTDIR)$(MANDIR)/man8 + + install-doc: +- install -d $(DESTDIR)$(DESTPREFIX)/share/doc/$(RELEASE) +- install -p -c $(DOCS) $(DESTDIR)$(DESTPREFIX)/share/doc/$(RELEASE) ++ install -d $(DESTDIR)$(DOCDIR) ++ install -p -c -m 0644 $(DOCS) $(DESTDIR)$(DOCDIR) + + zipman: + test -f schedtool.8 && $(GZIP) schedtool.8 || exit 0 diff --git a/system/schedtool/schedtool.SlackBuild b/system/schedtool/schedtool.SlackBuild new file mode 100644 index 000000000000..b950af2ad447 --- /dev/null +++ b/system/schedtool/schedtool.SlackBuild @@ -0,0 +1,65 @@ +#!/bin/sh + +# Slackware build script for schedtool + +# Written by Dave Margell (dmargell@gmail.com) +# Thanks to Robby Workman for help with the Makefile patch. + +PRGNAM=schedtool +VERSION=${VERSION:-1.3.0} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +patch -p1 < $CWD/schedtool-Makefile.patch + +make install \ + OPT="$SLKCFLAGS" \ + PREFIX=/usr \ + MANDIR=/usr/man \ + DOCDIR=/usr/doc/$PRGNAM-$VERSION \ + DESTDIR=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +cp -a CHANGES PACKAGERS TODO TUNING $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/schedtool/schedtool.info b/system/schedtool/schedtool.info new file mode 100644 index 000000000000..05643147ec5c --- /dev/null +++ b/system/schedtool/schedtool.info @@ -0,0 +1,10 @@ +PRGNAM="schedtool" +VERSION="1.3.0" +HOMEPAGE="http://freequaos.host.sk/schedtool/" +DOWNLOAD="http://freequaos.host.sk/schedtool/schedtool-1.3.0.tar.bz2" +MD5SUM="0d968f05d3ad7675f1f33ef1f6d0a3fb" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Dave Margell" +EMAIL="dmargell@gmail.com" +APPROVED="rworkman" diff --git a/system/schedtool/slack-desc b/system/schedtool/slack-desc new file mode 100644 index 000000000000..ac883b92754f --- /dev/null +++ b/system/schedtool/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +schedtool: schedtool - query or alter a process' scheduling policy. +schedtool: +schedtool: schedtool interfaces with the Linux CPU scheduler. +schedtool: It allows the user to set and query the CPU-affinity and nice-levels +schedtool: of processes, as well as all scheduling policies, +schedtool: like batch or real-time (RR/FIFO) classes and their priorities. +schedtool: All special scheduling classes of the -ck kernel patchset +schedtool: are also supported. +schedtool: +schedtool: Homepage: http://freequaos.host.sk/schedtool/ +schedtool: |