diff options
-rw-r--r-- | media/sound/ardour/Manifest | 4 | ||||
-rwxr-xr-x | media/sound/ardour/ardour.SlackBuild | 79 |
2 files changed, 69 insertions, 14 deletions
diff --git a/media/sound/ardour/Manifest b/media/sound/ardour/Manifest new file mode 100644 index 00000000..ea7415d1 --- /dev/null +++ b/media/sound/ardour/Manifest @@ -0,0 +1,4 @@ +DIST ardour-2.7.1.tar.bz2 3313029 MD5 0fd4b1a600c75447d633b796bad321e1 SHA1 3e8a6425bcfe5efbba0cfba44f0f63799e735cdb SHA256 102b99716ea99bbe66ad57abd1a1bf39d904068e76cb222d68f7acb78c63c864 SHA512 03083dc70ea80b12684495fe60f50679df28539212b29045448c688912c0cddba3f7c0b46d06318d167ddeaa38f8eb15185506e235fd813d7f16700f2ca352b1 RMD160 7488169a28610550a93b700dd7949b8ffad2431e +MKBUILD ardour.mkbuild 6357 MD5 4a7b0cf97da09a68b59473d461fc0b19 SHA1 f47aafa42e516bd39a880b2d8bd6b01d9520c863 SHA256 65c80df2c03efa469e4447d592be4479ecabf7cbf4d7257330bca1f791d55e67 SHA512 e8e5575af070f8d07d1daa8c9e87c3a1a705b89c9fab069dd371cab505aa3fba31235c18018d275bd15df3b20afaacc35e1456a5e83d73b1e1f9ca3085c06899 RMD160 75bf63cf4360bd932c09f541c9fe183df4c2eb08 +SLACK-REQUIRED slack-required 210 MD5 ecfea09d963274ebf1e6e4e0537bba89 SHA1 14a50513521d9f94956e7bc9041003c8a480e660 SHA256 d2b615540bb32bcb7a0c8be8b8eccebb4810bc7ea07bc869b42ceb254851a6fb SHA512 2e5903eafc5b8260359b511573fc0b48db0322e61da7020787c0781f56e474c8c2863bba174dc14d1780986a6ff160cfb08d50115b7c40ca8838c4732c9276b8 RMD160 453633fca94b94d5f8cba7d6820ef276668b023b +SLACKBUILD ardour.SlackBuild 10976 MD5 570588f678ee42c04d882072d0a97a5d SHA1 8b4924aa6ab64e1e2b72ffa9e1f05312f3ab5a73 SHA256 8c8c47e2ba134d4a2bce37348e7f063c4ce14f1970f885a2dc6b94b4e01afa98 SHA512 aad6a64f9811acba78484d2c6b12226310f8ad7a37f108974e63ecfc7991d1077e490cdfa2ec3cf68d36cedc7d228a9477300078db3747abd27b8fcfc1f96d60 RMD160 fafa9458c39b0e459c75560c9caa1058278db233 diff --git a/media/sound/ardour/ardour.SlackBuild b/media/sound/ardour/ardour.SlackBuild index 5ff244ce..52f84c40 100755 --- a/media/sound/ardour/ardour.SlackBuild +++ b/media/sound/ardour/ardour.SlackBuild @@ -16,7 +16,7 @@ # # slackbuild for ardour, by Silvio Rhatto # requires: scons raptor liblrdf ladspa libsamplerate libsndfile jack libgnomecanvas liblo fftw boost aubio -# tested: ardour-2.5 +# tested: ardour-2.7.1 # # Look for slackbuildrc @@ -31,7 +31,7 @@ CWD="$(pwd)" SRC_NAME="ardour" PKG_NAME="ardour" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=2.5} +SRC_VERSION=${VERSION:=2.7.1} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME @@ -65,6 +65,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 +85,63 @@ 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_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 sha1 sha256 sha512 rmd160; 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 +149,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 +162,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 +170,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 # Compile |