aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-04-07 21:45:07 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-04-07 21:45:07 +0000
commit4de8117d533ee05879267bad17e4e27e31281f0f (patch)
tree5f2e81becfc8c605506a8f3b5ac7bff0a1a67a1a
parentd718445a097439ff43a1a19c1380d0c25506cb8a (diff)
downloadslackbuilds-4de8117d533ee05879267bad17e4e27e31281f0f.tar.gz
slackbuilds-4de8117d533ee05879267bad17e4e27e31281f0f.tar.bz2
ccrtp: adding ccrtp
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2143 370017ae-e619-0410-ac65-c121f96126d4
-rw-r--r--net/libs/ccrtp/Manifest24
-rw-r--r--net/libs/ccrtp/ccrtp.SlackBuild267
-rw-r--r--net/libs/ccrtp/slack-required4
3 files changed, 295 insertions, 0 deletions
diff --git a/net/libs/ccrtp/Manifest b/net/libs/ccrtp/Manifest
new file mode 100644
index 00000000..dd88c1a2
--- /dev/null
+++ b/net/libs/ccrtp/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST ccrtp-1.7.1.tar.gz 628801 MD5 9f5d34a18f2c1c779d2e5818cc4987f8 RMD160 06da293968b04adc4803abce5fe5615741b59d30 SHA1 8759174addb212aa0a49ee137a61e8894a9402de SHA256 56867c5e9fbe321cb3ab20be22627b0aa090273d384ad28bba5c3d077248515f SHA512 117dfbdd387c2d1ec755c75933967e2ee5d830fcdcc0fb9e324b5c2b19a6eec478dc112b99c4242e746d4cdb7fe9e40dce636105bec95d3b522aad5ee434aaf6
+MKBUILD ccrtp.mkbuild 5033 MD5 5b353dceb51c6498c40d0b3a0842531a RMD160 f4e624592bf7a6e3881ff34fa994a1cf7cdd6986 SHA1 a031fcddcb0a0b213b6b491b3108380f6bbc615f SHA256 c49a133fa7d3ce14c617309ee97522f9fe8f49751ad341a6cf69734ff905ff61 SHA512 77545aba4679f20114adde877db0af3c3eea296371f6c0a8614e9a6e3fcf1bd65aeecd40918bcb84f4399bc4647d015a7220c9ebc45c805d465dc151d025f03c
+SLACK-REQUIRED slack-required 80 MD5 e1b3a936d49e1c837e7346443f3ad7b1 RMD160 ae221d01499fc0f5815a3ba3019e34553c2bd233 SHA1 d5e279f15678fba226befcc1f9e9bcdcddec50c9 SHA256 3b425c82e39c771eaa73d9e2178b262799f34735f1421e2ca191e4a19d7c59df SHA512 00b38568d9a068ce4b76b08de0bfd729d1eeb6aa61c35d863cbfe2db0ec48f9376399566185ea410f70b09b57e1e3aebded07add63d527ef6647067e6a773b5e
+SLACKBUILD ccrtp.SlackBuild 8345 MD5 bc1e515c6460d0aa8ab2a073a7b68799 RMD160 653f42123334765da3b44702f4d8db733b57dee9 SHA1 0263c93dab2a909f1c666a7d21edbdfa20b214c5 SHA256 105082beffaf28663855d19220b81768904c05d624be426e1c13230b3dd81fcd SHA512 1b66dfe9d56153349509071cd0707e982fe6aac29b23e65776d9ad1c0df1140917193eb4dc655e4ef2b3c75dd33e80cbd778b3d94cde01ba2570d90754616bc4
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJ28ftAAoJEEHL93ESzgei6ZwQALuzkgKAAz1QlsTybMIw8kHK
+6O1Br1kUbREiMlnt7R3mTyGYlIRxHrYBUyFL6RiGIp6tAT9ulpMKXTTOWMK9fgtT
+xx5rpTiGl6g9TtcrQVYLWQEFlLtjyfBUOF7mxckESuCVscjpoNK0cExetuCB51kG
+aR9XyRlIADCKArC3dXHB5CI0lQ/Y8Vs5bLcUBskIkykYTFs5pRKWBY22XyvwAlDy
+tTe6ebali79vIPbxl1SQOSQ7+2fzYGCf1h0o0ZaDqBTKGixPmemPWIDf1cIuN+R/
+mbVxy161DKza8BwtrjWicbgVXAgHYT3bjDD5KCBjWKh+uDt4bUsz6NmjEx82EuHE
+NHlY0OAkUb9pK7zc8FYjeiwa6iIGv53pnrTZa5TGQ5wqku8nfXIIG7XYVwd7T5rZ
+s5r1YJEmUpEmmOUvccinYjOk3Bv9pwquVefd10HPvTkhZ8mP9CMAaebwEjBxfQaz
+D3/I+9Hc7QRsFW76sxuI9gR4wgLxqDAHw8uA1YD2wymFGKtSj3ipPUFvvId1x1qF
+eMixSxBdOKa74I4juwOojs8rBj1IXiDc7QHrAx4QdL/VPUqJCYTZqHw8TUWHf8kj
+CS/MU+srFX/AkveWiXQ8MCWUcO3FSxDxs0uYWyEk3gNdO3hYMKySGzRExQc6Yt47
+ygvZkZCANQ5zoU1t3fZS
+=CaVr
+-----END PGP SIGNATURE-----
diff --git a/net/libs/ccrtp/ccrtp.SlackBuild b/net/libs/ccrtp/ccrtp.SlackBuild
new file mode 100644
index 00000000..13901b4a
--- /dev/null
+++ b/net/libs/ccrtp/ccrtp.SlackBuild
@@ -0,0 +1,267 @@
+#!/bin/bash
+#
+# ccrtp.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.
+#
+# ccrtp.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 ccrtp, by Silvio Rhatto
+# requires: commoncpp2
+# tested: ccrtp-1.7.1
+# 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="ccrtp"
+PKG_NAME="ccrtp"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=1.7.1}
+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/libs/ccrtp"}
+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.gnutelephony.org/dist/tarballs/$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
+
+# Import minimized signing key from
+if echo [[SIGNING KEY URL]] | grep -q -v "SIGNING KEY URL"; then
+ lynx -dump [[SIGNING KEY URL]] | gpg --import || exit $ERROR_GPG
+elif echo 3903A6DD | grep -q -v "SIGNING KEY ID"; then
+ gpg --recv-keys 3903A6DD || exit $ERROR_GPG
+else
+ gpg --import << EOKEY || exit $ERROR_GPG
+[[SIGNING KEY]]
+EOKEY
+fi
+
+# Download source's signature if necessary and check it
+if echo [[SIGNING URL]] | grep -q -v "SIGNING URL"; then
+ SIGNATURE="`basename [[SIGNING URL]]`"
+ if [ ! -s "$SRC_DIR/$SIGNATURE" ]; then
+ wget "[[SIGNING URL]]" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET
+ fi
+else
+ if [ -s "$SRC_DIR/$SRC.sig" ]; then
+ SIGNATURE="$SRC.sig"
+ elif [ -s "$SRC_DIR/$SRC.asc" ]; then
+ SIGNATURE="$SRC.asc"
+ else
+ echo Trying to get signature file from $URL.sig...
+ if wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"; then
+ SIGNATURE="$SRC.sig"
+ else
+ rm $SRC_DIR/$SRC.sig
+ echo Trying to get signature file from $URL.asc...
+ if wget "$URL.asc" -O "$SRC_DIR/$SRC.asc"; then
+ SIGNATURE="$SRC.asc"
+ else
+ rm $SRC_DIR/$SRC.asc
+ echo "Error getting source's signature file"
+ exit $ERROR_GPG
+ fi
+ fi
+ fi
+fi
+
+echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE...
+gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG
+echo Success.
+
+# 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 COPYING.addendum ChangeLog INSTALL NEWS README THANKS TODO"
+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--------------------------------------------------------|
+ccrtp: ccrtp
+ccrtp:
+ccrtp: GNU ccRTP, the RTP protocol stack of GNU Common C++ and
+ccrtp: the GNU project. GNU ccRTP was created as a "generic"
+ccrtp: and high performance RTP stack and uses queued packet
+ccrtp: lists for both sending and receiving of realtime data.
+ccrtp:
+ccrtp:
+ccrtp:
+ccrtp:
+ccrtp:
+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
diff --git a/net/libs/ccrtp/slack-required b/net/libs/ccrtp/slack-required
new file mode 100644
index 00000000..d6edab91
--- /dev/null
+++ b/net/libs/ccrtp/slack-required
@@ -0,0 +1,4 @@
+# Dependency list to ccrtp
+#
+# dependency [condition] [version]]
+commoncpp2