summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author V'yacheslav Stetskevych2010-05-13 01:00:46 +0200
committer David Somero2010-05-13 01:00:46 +0200
commit763c34d0110b69703283458632a408c79a256b4e (patch)
tree6805a648161dd1138a410db74a2da2e2e29ff290
parentae29ef7f6e7169ad3bec940f6704c5096fe81e5d (diff)
downloadslackbuilds-763c34d0110b69703283458632a408c79a256b4e.tar.gz
system/eibd: Added to 13.0 repository
-rw-r--r--system/eibd/README16
-rw-r--r--system/eibd/doinst.sh21
-rw-r--r--system/eibd/eibd.SlackBuild82
-rw-r--r--system/eibd/eibd.info10
-rw-r--r--system/eibd/rc.eibd.new51
-rw-r--r--system/eibd/slack-desc19
6 files changed, 199 insertions, 0 deletions
diff --git a/system/eibd/README b/system/eibd/README
new file mode 100644
index 0000000000..14a660aa76
--- /dev/null
+++ b/system/eibd/README
@@ -0,0 +1,16 @@
+The BCU SDK is a free development environment for BCU1 and BCU2 devices for the
+KNX home automation bus (formerly known as the European Installation Bus, EIB).
+
+The eibd daemon is the key component of the BCU SDK. It provides an
+interface to the EIB/KNX bus. It supports the following backends:
+- FT1.2/BCU2
+- PEI16/BCU1 (using the BCU1 kernel driver)
+- TPUART
+- EIBnet/IP Routing and Tunneling
+- KNX over USB
+Eibd provides APIs for various programming languages and a number of
+example programs written in C.
+
+A sample startup script for Slackware is provided along with the SlackBuild.
+
+Requires: pthsem available at SlackBuilds.org.
diff --git a/system/eibd/doinst.sh b/system/eibd/doinst.sh
new file mode 100644
index 0000000000..7dfab3caae
--- /dev/null
+++ b/system/eibd/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.eibd.new:
+if [ -e etc/rc.d/rc.eibd ]; then
+ cp -a etc/rc.d/rc.eibd etc/rc.d/rc.eibd.new.incoming
+ cat etc/rc.d/rc.eibd.new > etc/rc.d/rc.eibd.new.incoming
+ mv etc/rc.d/rc.eibd.new.incoming etc/rc.d/rc.eibd.new
+fi
+
+config etc/rc.d/rc.eibd.new
diff --git a/system/eibd/eibd.SlackBuild b/system/eibd/eibd.SlackBuild
new file mode 100644
index 0000000000..2cc47276aa
--- /dev/null
+++ b/system/eibd/eibd.SlackBuild
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+# Slackware build script for eibd.
+
+# Written by V'yacheslav Stetskevych
+
+PRGNAM=eibd
+SRCNAM=bcusdk
+VERSION=${VERSION:-0.0.4}
+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"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/${SRCNAM}_$VERSION.tar.gz
+cd $SRCNAM-$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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --enable-onlyeibd \
+ --enable-ft12 \
+ --enable-pei16 \
+ --enable-tpuart \
+ --enable-eibnetip \
+ --enable-eibnetiptunnel \
+ --enable-usb \
+ --enable-eibnetipserver
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING INSTALL README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Install init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.eibd.new > $PKG/etc/rc.d/rc.eibd.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.${PKGTYPE:-tgz}
diff --git a/system/eibd/eibd.info b/system/eibd/eibd.info
new file mode 100644
index 0000000000..1b60c80569
--- /dev/null
+++ b/system/eibd/eibd.info
@@ -0,0 +1,10 @@
+PRGNAM="eibd"
+VERSION="0.0.4"
+HOMEPAGE="http://www.auto.tuwien.ac.at/~mkoegler/index.php/eibd"
+DOWNLOAD="http://www.auto.tuwien.ac.at/~mkoegler/eib/bcusdk_0.0.4.tar.gz"
+MD5SUM="14138f457d6530bf45cf6a966fde9d5f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="V'yacheslav Stetskevych"
+EMAIL="slava18@gmail.com"
+APPROVED="dsomero"
diff --git a/system/eibd/rc.eibd.new b/system/eibd/rc.eibd.new
new file mode 100644
index 0000000000..d1514c18b3
--- /dev/null
+++ b/system/eibd/rc.eibd.new
@@ -0,0 +1,51 @@
+#!/bin/sh
+# rc.eibd -- Slackware startup script for eibd
+# Start/stop/restart the eibd daemon.
+# Written by V'yacheslav Stetskevych
+
+# Run "eibd --help" to see all the various bus connection options.
+# This script shows how to set up an IP Tunneling and USB connectios.
+# Adapt to your needs.
+
+eib_start() {
+echo "Adding a multicast route for eibd..."
+/sbin/route add 224.0.23.12 dev eth0
+
+echo "Starting the eibd daemon..."
+echo "$0: Startup error: first uncomment one of the startup options and remove this line."
+
+## IP Tunnelling backend ================================================
+## Use "eibnetsearch -" to locate your IP-capable BCU devices
+#KNXIP="192.168.0.5"
+#/usr/bin/eibd -DTS --daemon=/var/log/eibd.log --listen-tcp ipt:$KNXIP
+
+## USB backend ==========================================================
+#KNXUSB="$(findknxusb | awk '{print $2}' | grep -v addr)"
+#/usr/bin/eibd -DTS --daemon=/var/log/eibd.log --listen-tcp usb:$KNXUSB
+
+}
+
+eib_stop() {
+ echo "Deleting the eibd multicast route..."
+ /sbin/route del 224.0.23.12
+ echo "Stopping the eibd daemon..."
+ killall eibd >/dev/null 2>&1
+}
+
+case $1 in
+ start)
+ eib_start
+ ;;
+ stop)
+ eib_stop
+ ;;
+ restart)
+ eib_stop
+ sleep 2
+ eib_start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
diff --git a/system/eibd/slack-desc b/system/eibd/slack-desc
new file mode 100644
index 0000000000..1cd43791bf
--- /dev/null
+++ b/system/eibd/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------------------------------------------------------|
+eibd: eibd (interface to the EIB/KNX bus)
+eibd:
+eibd: The eibd daemon is the key component of the BCU SDK. It provides an
+eibd: interface to the EIB/KNX bus. It supports the following backends:
+eibd: - FT1. 2/BCU2,PEI16/BCU1 (using the BCU1 kernel driver)
+eibd: - TPUART, EIBnet/IP Routing and Tunneling, KNX over USB
+eibd:
+eibd: Eibd provides APIs for various programming languages and a number of
+eibd: example programs written in C.
+eibd:
+eibd: Homepage: http://www.auto.tuwien.ac.at/~mkoegler/index.php/eibd