aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/im/twinkle/Manifest24
-rw-r--r--net/im/twinkle/slack-required9
-rw-r--r--net/im/twinkle/twinkle.SlackBuild223
3 files changed, 256 insertions, 0 deletions
diff --git a/net/im/twinkle/Manifest b/net/im/twinkle/Manifest
new file mode 100644
index 00000000..f3c905ae
--- /dev/null
+++ b/net/im/twinkle/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST twinkle-1.4.2.tar.gz 1601100 MD5 d70c8972f296ffd998c7fb698774705b RMD160 75acf3caa4643108d2b2e8b639f476926a23e4f1 SHA1 3751ef1a69ae16072393f44c2888b0fb488089e9 SHA256 807686c7ac1b54bb0ea27ff4be362db6926d1d3d6f1802f6d359a353157e89a5 SHA512 3a100e5fc7a7fc39944e5c718e4ea7feac1d3561302ccae0079123c1d0b7f70ba65852eb63b8384958e43533e37138213412bdfc1d33297fb21557947d412cb0
+MKBUILD twinkle.mkbuild 5087 MD5 7f306c7924ea8ee91777efa56aa63c5c RMD160 461cb2bbb87bbc55620b6a97962b1750f47a5122 SHA1 f4217c740d7291485120569c7eeb060cd9eebd4f SHA256 1e90fd5c4a61d2545b80b82bd82cbffbcbd1b13f1d17b0103a1b031384fb5775 SHA512 c1475ad275e3384b89dce4d78ee0411c02fd69f1b088cec7ce9de9c85bb4ed0e78cb50a02b1dfd8377d9d708eff44e4914de8ad8793afe1fbd310c2d9064bb33
+SLACK-REQUIRED slack-required 142 MD5 64f3779f2bb04b3a7856728964f8488d RMD160 7392972e5e628fbb2e0990a14c2e500e8f273834 SHA1 ef1c8d082155fb6e152518bfb3cfebc947cd8fb0 SHA256 e1b0fd58a04c4eb3b88bc2dd27b46872ba07979c2ce632c1adff1e140cfb38ef SHA512 eca4c46428f95e6edb0f945186942908c7f387e5bce3f6a5adfd2a9bf0eaefba906845c8aa6adc17308d961fb69078b4f8174aeb787c42c608833a19f921e1c1
+SLACKBUILD twinkle.SlackBuild 7052 MD5 5c69f4f14077024fd96fe5b1c7f655b7 RMD160 f926a7805c34290d33bf50d797803a8156d1c5b7 SHA1 e333d0d0e48016998b0f66e40539070a27249d6c SHA256 ecfcb512039edbb90d68e5667d3eec97f43dc3e104a6a988290398a7a353acd2 SHA512 6ea7fae3b1fac07143738ef061d7b5895dd0f7cfb173801cf3c99c2c388c669f262108c6df7c3a209b6d6e5fd4bf38b761e6e11853b9f28d913017d28e5069b0
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJ29ClAAoJEEHL93ESzgeiU1MP/jijcSkML/t/g9bCQ6/0Ljsv
+ye7KQ7Tlshl0u0E+8K7BhR4vG2HtiYecJHibK4Hzb14LE23G8kHvG0eduSI7S8py
+d5Us9zY2RNlF5kJSnhS0dMD5b7pn0vQ+n3bWl9t/7s7TaJoMLxv7yqabguLUzErH
+XU2GGjW1KCGMhaLsxGMJsVVT6UbjwDTemeDQT+OUO6kVOrYchj4jOszeEQIgswXD
+igVGnMGBQr5zs8CPk0AFHsRpeg6lmA28vOcOYCBhmgr4s1r+HDZQGXPYs7nKs4pp
+m24336ykdMopkKnVrB6b/jC6fa/nB7jKUug0G6B3Jj8QYFFlSVphF+1QOtpXteHo
+P2cQRElsXlzPK+VX8KMYdU+78trqLnGKNNlcL1nJ912PkjFMTgaKQ0kAjjcHeGvE
+ylx1wiJ6/yY7C7IdqXkYDEbpW3m76GUmw6e+hAhtrzXY2OBv2mkhX5SwYoQ20b4U
+MWwozu36MthYeGT0xAuuVeah9rHKR3IrvtocgZV06FexX3BfWpdd6DNR9eIYF70X
+yo3c9FOjEcIBgBKL86Hkkqrf1yrVhMjvhAEa6xpSG3BnHpSTLQ5dVRrm4A5YqtUU
+nT/TtUFkfXRgx3X5EJIDHNIpFBtceB74qggoIkEpYY6zUtJfyK5+vhCfydzwDFin
+kQCxcJaMkrlDCMHzG6Sp
+=BopS
+-----END PGP SIGNATURE-----
diff --git a/net/im/twinkle/slack-required b/net/im/twinkle/slack-required
new file mode 100644
index 00000000..054836e1
--- /dev/null
+++ b/net/im/twinkle/slack-required
@@ -0,0 +1,9 @@
+# Dependency list to twinkle
+#
+# dependency [condition] [version]]
+commoncpp2
+ccrtp
+libzrtpcpp
+speex
+libsndfile
+boost
diff --git a/net/im/twinkle/twinkle.SlackBuild b/net/im/twinkle/twinkle.SlackBuild
new file mode 100644
index 00000000..0ef0858b
--- /dev/null
+++ b/net/im/twinkle/twinkle.SlackBuild
@@ -0,0 +1,223 @@
+#!/bin/bash
+#
+# twinkle.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# twinkle.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for twinkle, by Silvio Rhatto
+# requires: commoncpp2 ccrtp libzrtpcpp speex libsndfile boost
+# tested: twinkle-1.4.2
+# model: generic.mkSlackBuild $Rev: 805 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="twinkle"
+PKG_NAME="twinkle"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=1.4.2}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
+TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
+REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="net/im/twinkle"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
+
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
+
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://www.xs4all.nl/~mfnboer/twinkle/download/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
+
+ # Manifest signature checking
+ if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then
+ echo "Checking Manifest signature..."
+ gpg --verify $CWD/Manifest
+ if [ "$?" != "0" ]; then
+ exit $ERROR_MANIFEST
+ fi
+ fi
+
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`"
+ MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+ MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`"
+
+ if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
+ MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
+ else
+ MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
+ fi
+
+ if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
+ continue
+ fi
+
+ echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..."
+
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`"
+ SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
+
+ # Check source code size
+ if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then
+ echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "Size match."
+ fi
+
+ # Check source code integrity
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
+ if [ $ALGO = "rmd160" ]; then
+ ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
+ else
+ ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`"
+ fi
+ ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`"
+ ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }')
+ if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then
+ echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "$ALGO match."
+ fi
+ done
+
+ done
+
+else
+ exit $ERROR_MANIFEST
+fi
+
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( 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
+)
+
+# Install documentation
+DOCS="AUTHORS COPYING ChangeLog NEWS README THANKS"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# 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------------------------------------------------------|
+twinkle: twinkle
+twinkle:
+twinkle: Twinkle is a softphone for your voice over IP and instant
+twinkle: messaging communcations using the SIP protocol. You can
+twinkle: use it for direct IP phone to IP phone communication or
+twinkle: in a network using a SIP proxy to route your calls and
+twinkle: messages.
+twinkle:
+twinkle:
+twinkle:
+twinkle:
+EODESC
+
+# Build the package
+cd "$PKG"
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
+fi