aboutsummaryrefslogtreecommitdiff
path: root/media/libs/libsndfile
diff options
context:
space:
mode:
Diffstat (limited to 'media/libs/libsndfile')
-rw-r--r--media/libs/libsndfile/Manifest23
-rwxr-xr-xmedia/libs/libsndfile/libsndfile.SlackBuild143
2 files changed, 148 insertions, 18 deletions
diff --git a/media/libs/libsndfile/Manifest b/media/libs/libsndfile/Manifest
new file mode 100644
index 00000000..94e18591
--- /dev/null
+++ b/media/libs/libsndfile/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST libsndfile-1.0.20.tar.gz 927422 MD5 e0553e12c7a467af44693e95e2eac668 RMD160 873802efaa3f1e3303167fe1b7302fe2ab4cbd59 SHA1 d4f88b919c644f54dd4038c4cf4fb2e7b0d32f7b SHA256 7517eb966579f8814b5efe307cb919c5b4e7b5c6729209ba1da95f31e8368dc7 SHA512 890485d1cd8181d0324e55f8b787cf4b7b7fea7c2f6d17959759c0e60c3c35a72288f86e9648f18879cffd5f15c80b18f21d8d3bdf6a909c888ee0fb5e83a4d7
+MKBUILD libsndfile.mkbuild 3094 MD5 0b81f468ed4d309f500dc5377749ab13 RMD160 378cbcc9e2e78249e42c88d482e31d6848e55ee3 SHA1 bdbbc145dd1689871932602828e53972185d6148 SHA256 0960c8a4741639072db5228fef4d411c51e81914bfc0f33fe351262b44244c09 SHA512 66239921fd40f88ce7f54db372e5607509af82ec0f67761847839e1901ea70ebbca3611f36bbbfe0abd373bfa970d8d699fd1edb5916b460b1969af585101120
+SLACKBUILD libsndfile.SlackBuild 9585 MD5 8762baa0b52903c19d8f7c5fee22f2b1 RMD160 006702b6fc6b52d50546cb4ad9f8386c54306b3e SHA1 a1ea9cddda43cf4131b986ad8c0f7d48203aba51 SHA256 659a248d359121e6621109f541fb7742277f21b322403a0a4ab92256c2115ba3 SHA512 a81f97abb17df7bb2e1548f46c1a60f4abf173f460c839597514c6bb3a39567ffa37f5ca7ebb733d6fca0d95800e78164d38a70546fab49cc040fd992bc73a96
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKE3V6AAoJEEHL93ESzgeiMe8P/3gGsGy9oanqqbwepp/RNDPI
+UJHsJAOU4/WiVzx4pC7trxEnKLjGsUJItLH2+qmu/ySLzt8oC/h2yTz1kOeECHgT
+C1rGJ0gJGJ2k5wj41ps6kjyx0cJJ9z7eeRyuCoamMBe0gZxng6+w7H0nVM1FOrUR
++Jd71yY3ed+f03hiSNH6pz30t0KAKwFACxN0jSjTBMaabpsibBZgFa0ivLA6Bv6F
+V2y0aaKP2y+L/Ww/4rJgj9tGx5NK3p8D3q08xW9+w4lZ6YoXe/ANt0M53IoRX6gC
+vdcazsujmOM14ti6TUzPyGTN0HiM97VkIYlNLyOQIYLd1GbQs5gyPy+U4cCEaon2
+j52E4IM4FzFgfvhGKP+69VT0QoIk+6vPAttcwumhJdw7OYr2nE8vsNO6la9HOYR9
+jtVBr8wmIJqrqkTVEjKQajkZNo+0HSuTmD5wO0mbUXs86AfN9hkQyXRLSMDMxghJ
+hQkFRKEHd37/MiwO9Sk2jB1GRYkAHtyCJ8zdi7fnGLJGdxEmnx2CDiWMGe4zgUH7
+uLz5PtPCj8BtF1MwpFUhDNz8sNRVIUtRKUMfE8JxKBp5cffM8SWbCTgmHlfMet/l
+JRI4NwJwcLAtu1sT+GZmGlG/yuZeK7LeWbx+3082mF9cM9MYnC5P1gIOGBEog5hu
+WVgBoUN5U+sEb3NqFxSW
+=4Tbv
+-----END PGP SIGNATURE-----
diff --git a/media/libs/libsndfile/libsndfile.SlackBuild b/media/libs/libsndfile/libsndfile.SlackBuild
index 80422164..91e1613c 100755
--- a/media/libs/libsndfile/libsndfile.SlackBuild
+++ b/media/libs/libsndfile/libsndfile.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for libsndfile, by Silvio Rhatto
# requires:
-# tested: libsndfile-1.0.17
+# tested: libsndfile-1.0.20
+# model: generic.mkSlackBuild $Rev: 805 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="libsndfile"
PKG_NAME="libsndfile"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=1.0.17}
+SRC_VERSION=${VERSION:=1.0.20}
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/libsndfile"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:="--disable-flac --sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$VERSION"}
@@ -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,116 @@ 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 43B8D6C8 | grep -q -v "SIGNING KEY ID"; then
+ gpg --recv-keys 43B8D6C8 || 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
@@ -91,10 +204,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 +217,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 +225,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 +283,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