aboutsummaryrefslogtreecommitdiff
path: root/media/libs/libdvdread
diff options
context:
space:
mode:
Diffstat (limited to 'media/libs/libdvdread')
-rw-r--r--media/libs/libdvdread/Manifest24
-rwxr-xr-xmedia/libs/libdvdread/libdvdread.SlackBuild80
2 files changed, 99 insertions, 5 deletions
diff --git a/media/libs/libdvdread/Manifest b/media/libs/libdvdread/Manifest
new file mode 100644
index 00000000..61bdc8b1
--- /dev/null
+++ b/media/libs/libdvdread/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST libdvdread-0.9.7.tar.gz 389113 MD5 078788c9241ae16763529e1235502337 RMD160 7233064f35d86a27202ca1bef165f6972e20b3e8 SHA1 b2c2ede36cff9d56205747d3740c50fd32669e21 SHA256 e01f70cba5cfbc577b853ae69d73f00db7161e1704dc2359c4377aac4232a184 SHA512 7df91ec55957b8af8af87da71914661b1c332a0de90194e6315d4775aa588c4f0b349e55e947d09ff2db1423a1c524c2b885a054add8c56d5c758b28ce6beb28
+MKBUILD libdvdread.mkbuild 3933 MD5 3290401ca26b2b6d4eef7929ae312c04 RMD160 48ad4ddc23957f9e2f0016ca3c5b299ae9b10069 SHA1 88de14bc39bf9afc08ed36f953a340c566876666 SHA256 58b5838da799d2b233da11cb7e1d087ab897c47ae3dd7178a626cf7565350422 SHA512 0ad54417f09ceb2d29acdfd342599332bc2e30807dd8b4566afde076ef69d37c46321af33c5dfc38ca1d5e3c0d162c7bd90e87b32e3fbc5740a88748f5bb9060
+SLACK-REQUIRED slack-required 84 MD5 6cead2bf4a48fda0fb092196eaf11e0d RMD160 bf387b2d2e3c127f47bf6e3ad8198fe38b173916 SHA1 1dc3f922f0102dd85c0159625cc0d455749d2b38 SHA256 3c03ecec4c0e7762e4794c93df2683aff109449da48dec8b5c52ed6bd5bb8fe0 SHA512 3d360ba6f1789d493b5b72a7c69b0a91271b3b1d77d6b5bc914a18dafcaad301de5c4bc021a07e9485793a6a42450cb693bbcbd3aa8629637e3c9e03bfcceb77
+SLACKBUILD libdvdread.SlackBuild 7375 MD5 d5da4aa37faf146c7d68f8d3ff444282 RMD160 48dd21a663ec70ce9a17cc4a4b37a68b780c2ca5 SHA1 b85f0c6f5f78bd8feb7ee03a77e2b2342ba69f7a SHA256 61c97bb3b21e22f8a84e246b362ca090440d836f07a76dff12d832b8ea77d990 SHA512 606b5a1eedb33584d8624ec7597766cbd5c4b74aced8207be6475abf5aceaa2f4951a3e1b8990b4a3206c4c6ce324c584c7b05a540d1106d49cb928b3b006dbb
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJ/GnnAAoJEEHL93ESzgeiEnsP/2yH8d8pa7g8qKOXvn9xwf5G
+Wa+/rz+RxydSkLA7YVMaMG3KvC/z/Lu5y7D6CDKX9oKLlQF4TFNdI4jDQhgfnKPl
+ph/PQ0LhjIlnObk7iw1jFZsA3ly7Rh8dCHETVez3bG2qcXuBvdOmFb/nFG7PlzY1
+a7Wk/QegOU9MZZmlsH9q7xcEkAEME8ezZQwA8DPNQPZe6WzWxyoG4cCtqnF/Rbix
+KvOZnHCfIqezo2b2pwPEZVX65ldmAGAQl5fsgVUnKa71ETU2wbbkgGypa9nMSSWh
+/apPTOpdjVT6yN1/a14JTc8KrtSj4QAvv5SYHtrs9BZq/hQO/LbCYuAGIwLhqVcj
+iQxD72MlsuQYaha8/jsUtYXPef7CmOqa7r7yWB2iORBV3fv2RwS50IYOtsZTKewd
+hl+I5Spu2Sy2G8ZEZuNfdcrJTamfOSwMFs52ecKWoxBykyyGcgTxZoWZgKYsa3WF
+uya3UJEpU1pWVQVMP0aefbU4rU+P5FkMChdcn16GvLVprLfstuQu2gsFq+o+kkmw
+YXTZvmmXvOfa2e+iZIxnTwIvh4Hf5o78xeXW2xXi5baMMzWykM3jDAZ3IOecFuth
+dlQZ8HjFIgGEg2KEMvz/U5WRRILMaC3MhDszl1jODHV7zuPGJ0kU0gDh5AfDcpRA
+XFpU0g6Vju1H57b5ikl9
+=+mYx
+-----END PGP SIGNATURE-----
diff --git a/media/libs/libdvdread/libdvdread.SlackBuild b/media/libs/libdvdread/libdvdread.SlackBuild
index 2ae740cb..8e407bca 100755
--- a/media/libs/libdvdread/libdvdread.SlackBuild
+++ b/media/libs/libdvdread/libdvdread.SlackBuild
@@ -15,8 +15,9 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
# slackbuild for libdvdread, by Rudson R. Alves
-# requires: libdvdcss
+# requires:
# tested: libdvdread-0.9.7
+# model: generic.mkSlackBuild $Rev: 805 $
#
# Look for slackbuildrc
@@ -38,6 +39,7 @@ 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/libdvdread"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:="-j7"}
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
@@ -78,12 +81,78 @@ mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
# Dowload source if necessary
SRC="$SRC_NAME-$VERSION.tar.gz"
-URL="http://freshmeat.net/redir/libdvdread/17926/url_tgz/$SRC"
+URL="http://www.dtek.chalmers.se/groups/dvd/dist/$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
@@ -150,7 +219,8 @@ fi
# 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" ] || [ "$1" = "--cleanup" ]; then