network/irda-utils: Initial import

This commit is contained in:
Michael Wagner 2010-05-11 15:01:29 +02:00 committed by Robby Workman
parent c6d33cd2e1
commit 18025e4903
8 changed files with 240 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- irnetd/Makefile~ 2007-06-11 14:22:52.000000000 +0200
+++ irnetd/Makefile 2007-06-11 14:23:14.000000000 +0200
@@ -55,7 +55,7 @@
install: irnetd
$(prn_install)
- $(ECMD) install irnetd /usr/sbin/
+ $(ECMD) install irnetd $(ROOT)/usr/sbin/
clean:

View file

@ -0,0 +1,23 @@
--- smcinit/Makefile~ 2007-06-11 21:06:06.000000000 +0200
+++ smcinit/Makefile 2007-06-11 21:06:39.000000000 +0200
@@ -26,17 +26,17 @@
smcinit: smcinit.o
$(prn_cc_o)
- $(ECMD)$(CC) -o $@ $^ $(LIBS) -lpci
+ $(ECMD)$(CC) -o $@ $^ $(LIBS) -lpci -lz
tosh1800-smcinit: tosh1800-smcinit.o
$(prn_cc_o)
- $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
+ $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci -lz
tosh2450-smcinit: tosh2450-smcinit.o
$(prn_cc_o)
- $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
+ $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci -lz
%o: %c

19
network/irda-utils/README Normal file
View file

@ -0,0 +1,19 @@
IrDA-Utils (manage and control infrared devices)
This package contains various user space utilities which control
IrDA stack and a bunch of little programs serving as examples and
tools for IrDA applications.
If you want to enable SIR mode connections at startup, adjust the
serial port of you IrDA in /etc/rc.d/rc.irda, make it executable
with 'chmod +x rc.irda' and add the following lines to your rc.local:
if [ -x /etc/rc.d/rc.irda ]; then
/etc/rc.d/rc.irda start
fi
If you are unsure which serial port to choose, 'dmesg | grep tty' may
point you to the right direction.
For detailed instructions on how to enable FIR mode, see 'man 8 irattach'
and README.irattach in the doc directory.

View file

@ -0,0 +1,21 @@
config() {
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
# Keep same perms on rc.irda.new:
if [ -e etc/rc.d/rc.irda ]; then
cp -a etc/rc.d/rc.irda etc/rc.d/rc.irda.new.incoming
cat etc/rc.d/rc.irda.new > etc/rc.d/rc.irda.new.incoming
mv etc/rc.d/rc.irda.new.incoming etc/rc.d/rc.irda.new
fi
config etc/rc.d/rc.irda.new

View file

@ -0,0 +1,93 @@
#!/bin/sh
#
# Slackware build script for irda-utils
# (C) 2007 Michael Wagner <lapinours@web.de>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=irda-utils
VERSION=0.9.18
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
# Omit -O2 as it is already included in almost all Makefiles and
# those who haven't included it, would require additional CFLAGS
# like -fno-strict-aliasing
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-march=i686 -mtune=i686"
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
# Patch irnetd's Makefile to recognize $ROOT
patch -p0 < $CWD/Makefile.irnetd.diff || exit 1
# Patch smcinit's Makefile to link libz
# Otherwise, it fails to build on -current (this still works under with 11.0)
patch -p0 < $CWD/Makefile.smcinit.diff || exit 1
# Now that we have declared $SLKCFLAGS, lets use it
find . -name Makefile | \
while read i; do
OLDCFLAGS="`grep -m 1 CFLAGS $i`"
if [ -n "$OLDCFLAGS" ]; then
sed -i "s#\($OLDCFLAGS\)#\1 $SLKCFLAGS#" $i
fi
done
mkdir -p $PKG/usr/bin $PKG/usr/sbin $PKG/usr/man
make || exit 1
make install ROOT=$PKG MANDIR=$PKG/usr/man || exit 1
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
# Documentation is spread all over the source package; just include the README files
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
find . -name README | \
while read i; do
install -m 0644 $i $PKG/usr/doc/$PRGNAM-$VERSION/`basename README.$(dirname $i | cut -f2 -d/ -s) .`
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.irda.new > $PKG/etc/rc.d/rc.irda.new
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

View file

@ -0,0 +1,8 @@
PRGNAM="irda-utils"
VERSION="0.9.18"
HOMEPAGE="http://irda.sourceforge.net"
DOWNLOAD="http://prdownloads.sourceforge.net/irda/irda-utils-0.9.18.tar.gz"
MD5SUM="84dc12aa4c3f61fccb8d8919bf4079bb"
MAINTAINER="Michael Wagner"
EMAIL="lapinours@web.de"
APPROVED="rworkman"

View file

@ -0,0 +1,46 @@
#!/bin/sh
# Start/stop/restart the irda daemon:
#
# This script is based on irda-utils' sysv-init script and
# only covers SIR mode. For detailed instructionis on how
# to enable FIR mode see 'man 8 irattach' and README.irattach
# in the doc directory.
# You probably have to choose a different serial port (/dev/ttyS?).
DEVICE=/dev/ttyS1
DISCOVERY=yes
#DONGLE=actisys+
[ -f /usr/sbin/irattach ] || exit 0
ARGS=
if [ $DONGLE ]; then
ARGS="$ARGS -d $DONGLE"
fi
if [ "$DISCOVERY" = "yes" ];then
ARGS="$ARGS -s"
fi
# See how we were called.
case "$1" in
start)
# Attach irda device
echo "Starting IrDA: /usr/sbin/irattach"
/usr/sbin/irattach ${DEVICE} ${ARGS}
;;
stop)
# Stop service.
echo "Stopping IrDA... "
killall irattach
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: irda {start|stop|restart}"
exit 1
esac
exit 0

View file

@ -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------------------------------------------------------|
irda-utils: IrDA-Utils (manage and control infrared devices)
irda-utils:
irda-utils: This package contains various user space utilities which control
irda-utils: IrDA stack and a bunch of little programs serving as examples and
irda-utils: tools for IrDA applications.
irda-utils:
irda-utils: Homepage: http://irda.sourceforge.net
irda-utils:
irda-utils:
irda-utils:
irda-utils: