diff options
Diffstat (limited to 'misc/mosquitto')
-rw-r--r-- | misc/mosquitto/01_config.mk.diff | 20 | ||||
-rw-r--r-- | misc/mosquitto/02_client_Makefile.diff | 11 | ||||
-rw-r--r-- | misc/mosquitto/README | 18 | ||||
-rw-r--r-- | misc/mosquitto/doinst.sh | 15 | ||||
-rw-r--r-- | misc/mosquitto/mosquitto.SlackBuild | 104 | ||||
-rw-r--r-- | misc/mosquitto/mosquitto.info | 10 | ||||
-rw-r--r-- | misc/mosquitto/slack-desc | 19 |
7 files changed, 197 insertions, 0 deletions
diff --git a/misc/mosquitto/01_config.mk.diff b/misc/mosquitto/01_config.mk.diff new file mode 100644 index 0000000000..0299aecbab --- /dev/null +++ b/misc/mosquitto/01_config.mk.diff @@ -0,0 +1,20 @@ +--- config.mk.orig 2010-12-03 20:58:19.000000000 +1000 ++++ config.mk 2011-01-29 22:12:00.937180408 +1000 +@@ -5,7 +5,7 @@ + #MANCOUNTRIES=en_GB + + CFLAGS=-I. -I.. -ggdb -Wall -O2 -I../lib +-LDFLAGS=-lsqlite3 ++LDFLAGS=-lsqlite3 -ldl + # Add -lwrap to LDFLAGS if compiling with tcp wrappers support. + + CC=gcc +@@ -15,6 +15,6 @@ + MSGFMT=msgfmt + DOCBOOK2MAN=docbook2man.pl + +-prefix=/usr/local +-mandir=${prefix}/share/man ++prefix=/usr ++mandir=${prefix}/man + localedir=${prefix}/share/locale diff --git a/misc/mosquitto/02_client_Makefile.diff b/misc/mosquitto/02_client_Makefile.diff new file mode 100644 index 0000000000..85a53a650e --- /dev/null +++ b/misc/mosquitto/02_client_Makefile.diff @@ -0,0 +1,11 @@ +--- client/Makefile.orig 2010-12-03 20:58:19.000000000 +1000 ++++ client/Makefile 2011-01-29 23:09:18.768655710 +1000 +@@ -2,7 +2,7 @@ + CFLAGS=-I../lib -Wall -ggdb + LDFLAGS=-L../lib ../lib/libmosquitto.so.0 + INSTALL=install +-prefix=/usr/local ++prefix=/usr + + .PHONY: all install uninstall clean + diff --git a/misc/mosquitto/README b/misc/mosquitto/README new file mode 100644 index 0000000000..fb9bd05dfa --- /dev/null +++ b/misc/mosquitto/README @@ -0,0 +1,18 @@ +Mosquitto is an open source implementation of a server for version 3 of the +mqtt protocol. IBM have a closed source version of this server, known as +Really Small Message Broker (rsmb). The plan is to make this a more or less +drop in replacement. + +See the following links for more information on mqtt: + +http://mqtt.org/ +http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ac10840_.htm + +Mosquitto project information is available at the following locations: + +http://mosquitto.org/ (main homepage) +http://launchpad.net/mosquitto (bug tracking, translations) +http://bitbucket.org/oojah/mosquitto (hg source code repository) + +Mosquitto was written by Roger Light <roger@atchoo.org> + diff --git a/misc/mosquitto/doinst.sh b/misc/mosquitto/doinst.sh new file mode 100644 index 0000000000..3ec38f52fa --- /dev/null +++ b/misc/mosquitto/doinst.sh @@ -0,0 +1,15 @@ +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... +} + +config etc/mosquitto/mosquitto.conf.new + diff --git a/misc/mosquitto/mosquitto.SlackBuild b/misc/mosquitto/mosquitto.SlackBuild new file mode 100644 index 0000000000..e7eca3e574 --- /dev/null +++ b/misc/mosquitto/mosquitto.SlackBuild @@ -0,0 +1,104 @@ +#!/bin/sh + +# Slackware build script for mosquitto + +# Copyright 2011 Christoph Willing <c.willing@uq.edu.au> +# 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=mosquitto +VERSION=${VERSION:-0.9.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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" +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 . \ + \( -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 {} \; + +# Patches for correct build/install on Slackware +cat $CWD/01_config.mk.diff | patch -p0 +cat $CWD/02_client_Makefile.diff | patch -p0 + +# patch config.mk to respect CFLAGS +sed -i "s/CFLAGS=/CFLAGS+=/" config.mk + +CFLAGS="$SLKCFLAGS" \ + make +LIB_SUFFIX=$LIBDIRSUFFIX make install DESTDIR=$PKG + +# Preserve existing mosquitto.conf during package installation +mv $PKG/etc/mosquitto/mosquitto.conf $PKG/etc/mosquitto/mosquitto.conf.new + +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 + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING ChangeLog.txt Makefile compiling.txt mosquitto.conf readme.txt \ + $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 +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/misc/mosquitto/mosquitto.info b/misc/mosquitto/mosquitto.info new file mode 100644 index 0000000000..b2ccd55339 --- /dev/null +++ b/misc/mosquitto/mosquitto.info @@ -0,0 +1,10 @@ +PRGNAM="mosquitto" +VERSION="0.9.1" +HOMEPAGE="http://mosquitto.org/" +DOWNLOAD="http://mosquitto.org/files/source/mosquitto-0.9.1.tar.gz" +MD5SUM="8923b814441aa2c0646203920dcf3e1b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Christoph Willing" +EMAIL="c.willing@uq.edu.au" +APPROVED="Niels Horn" diff --git a/misc/mosquitto/slack-desc b/misc/mosquitto/slack-desc new file mode 100644 index 0000000000..fff0d566d0 --- /dev/null +++ b/misc/mosquitto/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------------------------------------------------------| +mosquitto: mosquitto (MQTT server) +mosquitto: +mosquitto: Mosquitto is an open source implementation of a server for version 3 +mosquitto: of the Message Queue Telemetry Transport (MQTT) protocol. IBM have a +mosquitto: closed source version of this server known as Really Small Message +mosquitto: Broker (RSMB). The plan is to make mosquitto a more or less drop in +mosquitto: replacement for RSMB. +mosquitto: +mosquitto: Mosquitto was written by Roger Light <roger@atchoo.org> +mosquitto: +mosquitto: |