aboutsummaryrefslogtreecommitdiff
path: root/dev/libs/ptlib
diff options
context:
space:
mode:
Diffstat (limited to 'dev/libs/ptlib')
-rw-r--r--dev/libs/ptlib/Manifest24
-rw-r--r--dev/libs/ptlib/ptlib.SlackBuild223
2 files changed, 247 insertions, 0 deletions
diff --git a/dev/libs/ptlib/Manifest b/dev/libs/ptlib/Manifest
new file mode 100644
index 00000000..5667947a
--- /dev/null
+++ b/dev/libs/ptlib/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST ptlib-2.4.4.tar.bz2 3009442 MD5 221ea2f96ff6bae9cf604d8766eae526 RMD160 9a84d463bf203b1619a9df5a67d0fed80b182acd SHA1 a6255cc6f2fb337518a9c49d8ce21f1790729ca7 SHA256 c9ef4267490507fc9699634551b50c0c1c225d48e0c095a81be6fa5a1fa96a3a SHA512 f9d6295025b999b1b21e60ae9f636bc21ff444a1f986bf79cdb4af21a7b36862062d0f44d2dd98a278bb96df1a5030997b082c294bc873f1720500b9a084369b
+DIST ptlib-2.6.1.tar.bz2 3296212 MD5 122ab96fcc44110ce05153f259b3285a RMD160 e7bd3f954c871725b269df0ab7561ab0fe6a23ba SHA1 b269a20f1bf98130e0088eea6ec5689197cf5521 SHA256 b8301389c1ee9968df8075942061665e33198d3865f92d8fb26e519068517305 SHA512 f074213ad00f7fbc60c8cd0c5008864acffbe45234bc267e6a152dccb9d6ea3c9d4ad090be149884aa0abfce2018e58ec3c27134c22edd11931c2ae623055cb6
+MKBUILD ptlib.mkbuild 5065 MD5 0c9587a722b4c295c41144a440ea2694 RMD160 9604fabe6b5785729d9cd367973f846997411e90 SHA1 22db177fd6ad32ae7dac061824adb1fe23997d25 SHA256 9b05ddcf3a636cd5584f7a34b9add2a02d955291bf0203c665bfd0f3b75f90d2 SHA512 44d537ac329833eae09a6678478fbb0b6b1376f98f308a2e53676efba9eb793bd0c97283006796e884d2660f8bbc3f1c9f55ea2c60193c9b2438f6085bb85126
+SLACKBUILD ptlib.SlackBuild 7115 MD5 76f3b88c695ff164f5df5c7c2740cfdf RMD160 d438bf405ff6f1dd4047606227370b6282c57d7e SHA1 4807bfe66fb071a4e20ffe8297e97a9fc7a5889e SHA256 273fc5aa8c9d5dc7fa3b07467e6aa969c287d6f9e42e29af10ce6bfa41ecef93 SHA512 a5bc98a0ec0e8591031667f256f73875bde964977ee710c3aee76ec5678a6e639b265fd1967c6082c1ad35042e814b5b91754b957f24e8e285489cf08e0f44bc
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJyjDgAAoJEEHL93ESzgeiTeoP/3AqYqQ49nwQxA5WSo57APxD
+SBEKJAXfB10TpNt8iYWzOxoQgkSX7xMS9C3d6Z4COzzoLnsSPdVbOBHDCbO6XsPU
+7+rfAwk2w9ItpDglY0WzDc7J/ggmpE1w+ixysOM0twnE7QmwJXorQtbzE63/KCxA
+AAeubvmGpMlTbzqGvrRP/m68b8ts1sJkaeHnA5ZsFUazNyn7TNSF27bhTq9ZMLLo
+GEHrmquJG27BvSEVJyFxgAJhVsSgo/5u+75WbTIr4x3DZXKdO8a9ucUIwomBn97k
+WAL7w3OeahKpfklS33pnIOtB7P9XWTrma7S6Z/J5Rra61Dm6ZBA0X8NfuNskYoUQ
+68+RXYRmnx/x9uI7FWs3kJwnQdTKp8cwnVTQWoMdQ5fquNRNCPoV/zj72AD5M3Ox
+TNgNebbfCqfKgBt1gytsZPlXbudOeugZ3/amfWhzMSoEAIDDE+f7ZpLmkArGPiRL
+7CUnn6A1SVvaphyySEzLR+jTmCqHjw0fBZUduU3xeVrT8EmLwtJwQyKf9P+F6tC+
+dVTJIwyHiuzk7uVO07echHbrNNx/AVBzYZsVWAzwC21J6X1xQCpmBLfK3Jdkjxue
+vqcSg3OKBel54bhBAJkOCMSUHJ1sO9LMMEV0pE0mlxui/vcpWIkatq/CrloJWidJ
+9sjTJCp7Ov5g1Ekz9RC2
+=GDN0
+-----END PGP SIGNATURE-----
diff --git a/dev/libs/ptlib/ptlib.SlackBuild b/dev/libs/ptlib/ptlib.SlackBuild
new file mode 100644
index 00000000..b687d2de
--- /dev/null
+++ b/dev/libs/ptlib/ptlib.SlackBuild
@@ -0,0 +1,223 @@
+#!/bin/bash
+#
+# ptlib.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.
+#
+# ptlib.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 ptlib, by Silvio Rhatto
+# requires:
+# tested: ptlib-2.4.4
+# model: generic.mkSlackBuild $Rev: 796 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="ptlib"
+PKG_NAME="ptlib"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=2.4.4}
+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:="dev/libs/ptlib"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:="-j4"}
+
+# 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.bz2"
+URL="http://www.ekiga.org/admin/downloads/latest/sources/ekiga_3.0.2/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -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="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"
+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--------------------------------------------------------|
+ptlib: ptlib
+ptlib:
+ptlib: PTLib (Portable Tools Library) is a moderately large class library
+ptlib: that has it's genesis many years ago as PWLib (portable Windows
+ptlib: Library), a method to product applications to run on both Microsoft
+ptlib: Windows and Unix systems. It has also been ported to other systems
+ptlib: such as Mac OSX, VxWorks and other embedded systems
+ptlib:
+ptlib:
+ptlib:
+ptlib:
+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