summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorMichael Wagner <lapinours@web.de>2010-05-11 15:01:29 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 15:01:29 +0200
commit18025e4903d384578f2272e5dab27963228d25da (patch)
tree3866422c251bab643011c3f55b22b3724f819afc /network
parentc6d33cd2e16f2aa850e7d3bf48a990277e61e168 (diff)
downloadslackbuilds-18025e4903d384578f2272e5dab27963228d25da.tar.gz
network/irda-utils: Initial import
Diffstat (limited to 'network')
-rw-r--r--network/irda-utils/Makefile.irnetd.diff11
-rw-r--r--network/irda-utils/Makefile.smcinit.diff23
-rw-r--r--network/irda-utils/README19
-rw-r--r--network/irda-utils/doinst.sh21
-rw-r--r--network/irda-utils/irda-utils.SlackBuild93
-rw-r--r--network/irda-utils/irda-utils.info8
-rw-r--r--network/irda-utils/rc.irda.new46
-rw-r--r--network/irda-utils/slack-desc19
8 files changed, 240 insertions, 0 deletions
diff --git a/network/irda-utils/Makefile.irnetd.diff b/network/irda-utils/Makefile.irnetd.diff
new file mode 100644
index 0000000000..eca8c55428
--- /dev/null
+++ b/network/irda-utils/Makefile.irnetd.diff
@@ -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:
diff --git a/network/irda-utils/Makefile.smcinit.diff b/network/irda-utils/Makefile.smcinit.diff
new file mode 100644
index 0000000000..fc2e6182ee
--- /dev/null
+++ b/network/irda-utils/Makefile.smcinit.diff
@@ -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
diff --git a/network/irda-utils/README b/network/irda-utils/README
new file mode 100644
index 0000000000..83f7e9a287
--- /dev/null
+++ b/network/irda-utils/README
@@ -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.
diff --git a/network/irda-utils/doinst.sh b/network/irda-utils/doinst.sh
new file mode 100644
index 0000000000..871edf1d6f
--- /dev/null
+++ b/network/irda-utils/doinst.sh
@@ -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
+
diff --git a/network/irda-utils/irda-utils.SlackBuild b/network/irda-utils/irda-utils.SlackBuild
new file mode 100644
index 0000000000..d272bcc25d
--- /dev/null
+++ b/network/irda-utils/irda-utils.SlackBuild
@@ -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
diff --git a/network/irda-utils/irda-utils.info b/network/irda-utils/irda-utils.info
new file mode 100644
index 0000000000..d625182ad0
--- /dev/null
+++ b/network/irda-utils/irda-utils.info
@@ -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"
diff --git a/network/irda-utils/rc.irda.new b/network/irda-utils/rc.irda.new
new file mode 100644
index 0000000000..88b62eff0a
--- /dev/null
+++ b/network/irda-utils/rc.irda.new
@@ -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
diff --git a/network/irda-utils/slack-desc b/network/irda-utils/slack-desc
new file mode 100644
index 0000000000..1749aeba93
--- /dev/null
+++ b/network/irda-utils/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------------------------------------------------------|
+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: