aboutsummaryrefslogtreecommitdiff
path: root/media/libs
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-04-07 22:25:34 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-04-07 22:25:34 +0000
commit994af7e7a35d15ce55866d0a1562fe5cca211fc1 (patch)
tree089505b4fd6e5577b9cb46917c40f9e7722d36a5 /media/libs
parent12d5129ba19c376dbdf9b114b676f5fcd816570b (diff)
downloadslackbuilds-994af7e7a35d15ce55866d0a1562fe5cca211fc1.tar.gz
slackbuilds-994af7e7a35d15ce55866d0a1562fe5cca211fc1.tar.bz2
twinkle: adding twinkle
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2145 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'media/libs')
-rw-r--r--media/libs/speex/Manifest23
-rwxr-xr-xmedia/libs/speex/speex.SlackBuild99
2 files changed, 104 insertions, 18 deletions
diff --git a/media/libs/speex/Manifest b/media/libs/speex/Manifest
new file mode 100644
index 00000000..72b82957
--- /dev/null
+++ b/media/libs/speex/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST speex-1.2rc1.tar.gz 1061882 MD5 c4438b22c08e5811ff10e2b06ee9b9ae RMD160 6f4a11ef910b0db9b820826bcac3da1b79cad3a1 SHA1 52daa72572e844e5165315e208da539b2a55c5eb SHA256 342f30dc57bd4a6dad41398365baaa690429660b10d866b7d508e8f1179cb7a6 SHA512 bdf1ddb2d60496ab220b94c1bec7a43f267fc964fdbb5cc9f24b71b9b571f237f5ce98c1d74b02699d71a95281f4694ff464ebec25e3b135244e5b3099cb1813
+MKBUILD speex.mkbuild 2827 MD5 bfe6711a0c48082c7473e65ecbf9ea89 RMD160 50ca8a786732f9046941283553852f911e4f4ba9 SHA1 543b7d6eb33071dfd448331ab1d044fd0c1829fb SHA256 f5f5185e24252a2199d4b333765bc8d5e52bc9dc1270e3872ae8ebeedb1e4c15 SHA512 d0e82d7c86757830f525c0d8a633436c0a838deea86a8e85d2d5b248d35fbef600a9d920c4b1d33d50a474fdeb974806aba3f1a79c72d64ab9e3dcce0d716ec9
+SLACKBUILD speex.SlackBuild 8085 MD5 baf3b3094c6d45e09dd3d334c82c6c68 RMD160 5b79f36898bba0540a72d7825a1f0144d636cb16 SHA1 3765be43acf8c0fad8ce093b0043e5fdbedcca64 SHA256 f8456f58a243b4b630c9de12d2aef2ed18976abac1f32e956d519c1f9b7aa9d2 SHA512 f2e495f1111a0f7cc8134209f3b7e3c7f5a28535b7a782a278d8beb0d547f8ebf1e95e081be715f369cf8ea6c675b018e8201f046c357175a36ab33ae4e63a8c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJ28zdAAoJEEHL93ESzgeiDacP/1rnNxZ9541us/NlcWWUOSMz
+1qFO0/6PvlBSXmBSfe8AJVp0Cp1VJvTpPbA+hiY3hJq/PF5OLU7UiQ74or03/63q
+W8yoB+m+GYxlZd+qUZhBpIx85Fc5Z/dBvTRzOPbDJhdt5ava7uYi19AoOYPOcC6O
+XTxpzhSkIJC5j7TvIbv698HMqwFjNe0aAQTAK6SqIUJVlNyd6AJArKMGBLnI1bk7
+LAmpLTPa5qAAo8dhSS5b+Jtg07Ky8WlK9HZ3sYKI9tQeQZXcYdRSLuYMPvTbyzH8
+FB8DPTKyFtt1cKn5C0UzaCvqf3Xv2Ak0khlCaMRpTj0AUiCm889MeSf9zdW2zUKy
+abNWnZM73V4CnYc51dXxrcqlju1jnWgOWesXrUWt5bh3vZORpcL4B3T/CDEAZBKw
+n6gl68pneHwRdpGAPe5mb2Ez9wLmIH1h3ptI1mG5+yZ3oXOFO6sR1FrDjbcY62sx
+G2MO4hOBlFVLOIDE7dV1caXOXFv7twcIlp9RYYR/Q/oRG2MTMdwn6XfWStyGXKcc
+PrOWVRfK0P7aYpcuOHnt7WGju7vyGU/svOqycy5P8CSXkFqFiQmGGbk99O+JURQi
+LJt44d5T4Z2205qvv0OEnIWmUuq7KgCaJVo9nElrdCxUZ4MiRp4oTp59q7AotaRH
+7khG/LisPotGML3qyPur
+=5d02
+-----END PGP SIGNATURE-----
diff --git a/media/libs/speex/speex.SlackBuild b/media/libs/speex/speex.SlackBuild
index 6fc50b95..556b74e7 100755
--- a/media/libs/speex/speex.SlackBuild
+++ b/media/libs/speex/speex.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for speex, by Silvio Rhatto
# requires:
-# tested: speex-1.2beta3
+# tested: speex-1.2rc1
+# model: generic.mkSlackBuild $Rev: 805 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="speex"
PKG_NAME="speex"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=1.2beta3}
+SRC_VERSION=${VERSION:=1.2rc1}
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:="media/libs/speex"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:=""}
LIBDIR="$PREFIX/lib"
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -65,6 +67,7 @@ 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
@@ -84,6 +87,72 @@ 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
@@ -91,10 +160,11 @@ PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
# Patch source
-patches="
+patches=" [[PATCH URLS]]
$PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
$PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
for patch in $patches; do
+ patch="`basename $patch`"
if [ -f "$CWD/$patch" ]; then
patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
elif [ -f "$CWD/patches/$patch" ]; then
@@ -103,15 +173,7 @@ for patch in $patches; do
gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
elif [ -f "$CWD/patches/$patch.gz" ]; then
gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
- fi
-done
-
-if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
- for patch_url in [[PATCH URLS]]; do
- patch="`basename $patch_url`"
- if [ ! -s "$SRC_DIR/$patch" ]; then
- wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
- fi
+ elif [ -f "$SRC_DIR/$patch" ]; then
if [ "`basename $patch .gz`" != "$patch" ]; then
gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
elif [ "`basename $patch .bz2`" != "$patch" ]; then
@@ -119,8 +181,8 @@ if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
else
patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
fi
- done
-fi
+ fi
+done
# Configure
CFLAGS="$SLKCFLAGS" \
@@ -177,9 +239,10 @@ EODESC
# Build the package
cd "$PKG"
-makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+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" ]; then
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
rm -rf "$PKG_WORK" "$PKG"
fi