diff options
author | Axel Bergerhoff <the.druid@arcor.de> | 2017-08-31 12:55:46 +0100 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-09-02 10:19:46 +0100 |
commit | 0202a7877febec8186405d3d0837a93b5f77c670 (patch) | |
tree | 8373cf294371cb64c8397a583f12de583195d60b /libraries | |
parent | cae95a71efdd8586432d4c35082aca1b32d6aaf2 (diff) |
libraries/libnodave: Added (Siemens S7 300/400 PLC library).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/libnodave/README | 3 | ||||
-rw-r--r-- | libraries/libnodave/libnodave.SlackBuild | 91 | ||||
-rw-r--r-- | libraries/libnodave/libnodave.info | 10 | ||||
-rw-r--r-- | libraries/libnodave/slack-desc | 19 |
4 files changed, 123 insertions, 0 deletions
diff --git a/libraries/libnodave/README b/libraries/libnodave/README new file mode 100644 index 000000000000..3d34cb9055fa --- /dev/null +++ b/libraries/libnodave/README @@ -0,0 +1,3 @@ +Libnodave is a library that provides the necessary functions to connect +to and exchange data with Siemens S7 300/400 PLCs (200 family and S5 +family now also supported). diff --git a/libraries/libnodave/libnodave.SlackBuild b/libraries/libnodave/libnodave.SlackBuild new file mode 100644 index 000000000000..edb8c641bf27 --- /dev/null +++ b/libraries/libnodave/libnodave.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Slackware build script for libnodave + +# Copyright (c) 2017, Axel Bergerhoff <the.druid@arcor.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=libnodave +VERSION=${VERSION:-0.8.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CC="${CC:-cc} $SLKCFLAGS" make + +# 'make install' doesn't understand DESTDIR and runs ldconfig, so don't use it +install -D -m755 libnodave.so $PKG/usr/lib$LIBDIRSUFFIX/libnodave.so +install -D -m644 nodave.h $PKG/usr/include/nodave.h + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.compiling FAQ.de.txt ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION +install -d $PKG/usr/doc/$PRGNAM-$VERSION/html +install -m 644 doc/* $PKG/usr/doc/$PRGNAM-$VERSION/html/ +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/libraries/libnodave/libnodave.info b/libraries/libnodave/libnodave.info new file mode 100644 index 000000000000..7838b521d60a --- /dev/null +++ b/libraries/libnodave/libnodave.info @@ -0,0 +1,10 @@ +PRGNAM="libnodave" +VERSION="0.8.5" +HOMEPAGE="http://libnodave.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/project/libnodave/libnodave/libnodave-0.8.5.tar.gz" +MD5SUM="6a29a40d550c38c4844c8cde773f904b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Axel Bergerhoff" +EMAIL="the.druid@arcor.de" diff --git a/libraries/libnodave/slack-desc b/libraries/libnodave/slack-desc new file mode 100644 index 000000000000..f855a12f39dc --- /dev/null +++ b/libraries/libnodave/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +libnodave: libnodave (Siemens S7 300/400 PLC library) +libnodave: +libnodave: libnodave is a library that provides the necessary functions to +libnodave: connect to and exchange data with Siemens S7 300/400 PLCs. +libnodave: +libnodave: 200 family and S5 family now also supported. +libnodave: +libnodave: +libnodave: +libnodave: +libnodave: |