diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-01-13 21:49:59 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-01-13 21:49:59 +0000 |
commit | 8ee204d36beb98436e708bf037c9225a432730c7 (patch) | |
tree | 629cc904b154582beac7b837b1a8272e7af4d3e0 /app | |
parent | acb1f2497ee2819f4dd881c828710b0861ce52a5 (diff) | |
download | slackbuilds-8ee204d36beb98436e708bf037c9225a432730c7.tar.gz slackbuilds-8ee204d36beb98436e708bf037c9225a432730c7.tar.bz2 |
cabextract: adding manifest
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2080 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'app')
-rw-r--r-- | app/arch/cabextract/Manifest | 3 | ||||
-rwxr-xr-x | app/arch/cabextract/cabextract.SlackBuild | 134 | ||||
-rw-r--r-- | app/emulation/wine/Manifest | 3 | ||||
-rwxr-xr-x | app/emulation/wine/wine.SlackBuild | 70 |
4 files changed, 176 insertions, 34 deletions
diff --git a/app/arch/cabextract/Manifest b/app/arch/cabextract/Manifest new file mode 100644 index 00000000..79424ee5 --- /dev/null +++ b/app/arch/cabextract/Manifest @@ -0,0 +1,3 @@ +DIST cabextract-1.2.tar.gz 194006 MD5 dc421a690648b503265c82ade84e143e RMD160 55292e287047b14945e69b0be8ab9ff1d4902f71 SHA1 871b3db4bc2629eb5726659c147aecea1af6a6d0 SHA256 ae9c860a74fcea109887b4cf5de8fce575ac14737571520b14b84816f17125eb SHA512 ff64cb744314422e17b8bdd0c9428682033f17af6ec10cad3a84725f861dee10a9a510109ee0f84a2e0f2c046cfd222f193b88c95055f023cbdb46d26e419f9a +MKBUILD cabextract.mkbuild 4370 MD5 21c2313cdbc9b2021ec1c2e2a8d23ba6 RMD160 da0b1bd08ead79096e7ce737c930998312f85eff SHA1 35fd720460327f96ab417b0dcad3f985ba5130b2 SHA256 2f7fa145e30cec376d8501415c90f79a0ef849a3530a7e7604bd93b718e3d7fc SHA512 9e7f199de85814da7a54329d2d45259e2ab2401d969144adf32992c8856e54018b4f81ed9658cc3dab6011b669240f94a23c7e1e1fdf480afd8e6ca8ff4075a3 +SLACKBUILD cabextract.SlackBuild 6723 MD5 db8b3bc36fd3df16db5545f80028404b RMD160 752abd00a87964740aadfecc7fc6e3730ec53a14 SHA1 1bd73375d80b8f38af711d46b6f3a97246b5863e SHA256 dbaef7fb49804750a147a65e526ac71acc56bbe773481e2e3497877a48330d3b SHA512 4c82e09246b797df4ff51e1dc2fb5ecfadb19cce9807a6c3d5d32b6d1fcd3b1d77e29b63313dedc1f8480b5598f6474da9912fe88a4bf14f2381130206147f22 diff --git a/app/arch/cabextract/cabextract.SlackBuild b/app/arch/cabextract/cabextract.SlackBuild index 2fc07f1b..ca8923db 100755 --- a/app/arch/cabextract/cabextract.SlackBuild +++ b/app/arch/cabextract/cabextract.SlackBuild @@ -1,9 +1,22 @@ #!/bin/bash # -# SlackBuild for cabextract -# http://www.kyz.uklinux.net/downloads/ +# cabextract.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. # -# Author: Rudson R. Alves +# cabextract.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 cabextract, by Alexandre Vieira de Souza +# requires: +# tested: cabextract-1.2 # # Look for slackbuildrc @@ -17,16 +30,16 @@ fi CWD="$(pwd)" SRC_NAME="cabextract" PKG_NAME="cabextract" -ARCH=${ARCH:=i468} +ARCH=${ARCH:=i486} SRC_VERSION=${VERSION:=1.2} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" -BUILD=${BUILD:=1rra} +BUILD=${BUILD:=1avs} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} PREFIX=${PREFIX:=/usr} -PKG_SRC="$TMP/$SRC_NAME-$SRC_VERSION" +PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:=""} NUMJOBS=${NUMJOBS:="-j4"} @@ -34,16 +47,17 @@ NUMJOBS=${NUMJOBS:="-j4"} 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 SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2" + SLKCFLAGS="-O2 -fPIC" LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi # Set error codes (used by createpkg) @@ -51,34 +65,94 @@ 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_SRC" 2> /dev/null +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-$SRC_VERSION.tar.gz" -URL="http://www.kyz.uklinux.net/downloads/$SRC" +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://www.cabextract.org.uk/$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_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 "$TMP" +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 + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF # Compile make $NUMJOBS || exit $ERROR_MAKE @@ -95,31 +169,36 @@ make install DESTDIR="$PKG" || exit $ERROR_INSTALL ) # Install documentation -DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog COPYING" +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR -cp -a $DOCS "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" +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 +# 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 +# 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--------------------------------------------------| -cabextract: cabextract.SlackBuild by Slack.Sarava -cabextract: -cabextract: cabextract - a program to extract Microsoft Cabinet files. + |-----handy-ruler---------------------------------------------------| +cabextract: cabextract by Slack.Sarava cabextract: -cabextract: Cabinet (.CAB) files are a form of archive, which Microsoft use +cabextract: cabextract - a program to extract Microsoft Cabinet files +cabextract: +cabextract: Cabinet (.CAB) files are a form of archive, which Microsoft use cabextract: to distribute their software, and things like Windows Font Packs. cabextract: The cabextract program unpacks these files. +cabextract: +cabextract: +cabextract: by avs cabextract: -cabextract: For more information, see -cabextract: http://www.kyz.uklinux.net/cabextract.php EODESC # Build the package @@ -127,7 +206,6 @@ cd "$PKG" makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ]; then - rm -rf "$PKG_SRC" "$PKG" +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/app/emulation/wine/Manifest b/app/emulation/wine/Manifest new file mode 100644 index 00000000..7169858c --- /dev/null +++ b/app/emulation/wine/Manifest @@ -0,0 +1,3 @@ +DIST wine-1.0.1.tar.bz2 13956805 MD5 b49540f4ed194c7e8da4cdc4b5bd3404 RMD160 fecd2bf970c51c80fc02ca39631034f066da145e SHA1 0550b03bf7b314514a87b6abb2198da96ef83b22 SHA256 c04bb376c6a2bd2be3bd8d5b73aa6db2dda3960791ea5d36579499fe72903479 SHA512 71ece5e13dec3c174a024b28eac802ab076207ce0b4c00b47998af167469c4d28571a02a5e2de23bd0a6f1a2c51875d15455aaa7c1140bd086068e0ae232d3a0 +MKBUILD wine.mkbuild 4471 MD5 fc3ddb4c2983fba36bac066b4731c994 RMD160 7d921e762097996d2062f0a0570784bec888cab8 SHA1 54dcd03f8e7aa6b2327cba3eafcefb2e27a85b93 SHA256 ed01911a384237a7f8fad4ceea3f48f67a33c3a218a6a64b19a4ede643e1da52 SHA512 fd83111dde2408bcf1891d3790567530ca5a495f0d74472eb174f0ecc8e4ac3fa0ed66c2ef5c7f1d5e6bde46f4de3f5cb09da2b488c3bec410535399966869e8 +SLACKBUILD wine.SlackBuild 6886 MD5 0ac0c13bbf5cf4216c1f430c58644caf RMD160 8d4d0ecebbcb44f97836d007484a63cfd9691564 SHA1 03dce0076142366cccb720e92d10a66c4287781e SHA256 f008f560d51eb08c0eb0be95142a0232cbeedbe979df6e098b3dc1beb4dcd9fc SHA512 4cabcf3f457eab31c54848c6e2968131e9ad5a3d399667ef06350bc58e5baf8ca335343093f4a8837e01fc28d5d566460a5f9882084cd387bd3360498fc2785e diff --git a/app/emulation/wine/wine.SlackBuild b/app/emulation/wine/wine.SlackBuild index e1cb2d7d..9473078b 100755 --- a/app/emulation/wine/wine.SlackBuild +++ b/app/emulation/wine/wine.SlackBuild @@ -16,7 +16,7 @@ # # slackbuild for wine, by Rudson R. Alves # requires: -# tested: wine-1.0 +# tested: wine-1.0.1 # # Look for slackbuildrc @@ -31,7 +31,7 @@ CWD="$(pwd)" SRC_NAME="wine" PKG_NAME="wine" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=1.1.0} +SRC_VERSION=${VERSION:=1.0.1} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rra} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME @@ -41,15 +41,15 @@ REPOS=${REPOS:=$TMP} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --localstatedir=/var"} -NUMJOBS=${NUMJOBS:="-j3"} +NUMJOBS=${NUMJOBS:="-j4"} # Set system libraries' path and optmization flags based on $ARCH 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 @@ -66,6 +66,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 @@ -85,6 +86,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 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 @@ -149,6 +207,6 @@ cd "$PKG" makepkg -l y -c n "$REPOS/$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 |