diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-05-01 15:27:08 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-05-01 15:27:08 +0000 |
commit | 5ee4c14efb7a55b41a7f3ebe14a9377f26bf2983 (patch) | |
tree | 957f8ccef008591fe291050abe85f54eee441b9b /dev/python | |
parent | 26461cccbd72db5ea4d2fde3438cfdb354ed21e9 (diff) | |
download | slackbuilds-5ee4c14efb7a55b41a7f3ebe14a9377f26bf2983.tar.gz slackbuilds-5ee4c14efb7a55b41a7f3ebe14a9377f26bf2983.tar.bz2 |
tahoe: updating tahoe and dependencies
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2179 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/python')
22 files changed, 1779 insertions, 31 deletions
diff --git a/dev/python/argparse/Manifest b/dev/python/argparse/Manifest new file mode 100644 index 00000000..039bfd22 --- /dev/null +++ b/dev/python/argparse/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST argparse-0.9.1.zip 114894 MD5 37675a2dd5822a2f5bd16f3fd4d8b4f1 RMD160 c9c03916aa6d87ff41998a8fe6446cbc94b9a321 SHA1 3f5ba68ac903e2c4f0af2b867a9c269a1218b615 SHA256 d560ebd2198643e787890ff19c923b7ca4950c9a927b95ab4eee32c6b9185c02 SHA512 552becb6643883f16583e714008f9d3d3ecaf69dc32e775464bb595e942455f75c698358b5a5e97afaff3baf717f1d5a1d43ea979db06cc3b6aa6fd6c7b56bff +MKBUILD argparse.mkbuild 5320 MD5 5cbff25ea2e719adab39ac283d80d47f RMD160 bf97d190919fde5f05e1cb6e5872413d4b0dad61 SHA1 0fcd37c13ac53f61b9c3fd5cbcc15ef4722e8427 SHA256 6e3bec92c9fa9b0693554708740b559127fd80720bf485832098e0b27ca22621 SHA512 4556aee8ee6904e2f10e2943e1d689403f7c21168c5d348a85cba5ee4bd03b03764a91716eca82b32f403551b7790493c697118686cd950bb20a6bfa11423f36 +SLACKBUILD argparse.SlackBuild 6955 MD5 93cb81b0b0a8f394c3f3699fb0362ff9 RMD160 b16637aeb30ee23b24e14821d852c9f85a39bb29 SHA1 a9ebe4c4944df754a9812713a675e87999e1d119 SHA256 305edec0930f73498cdbf5c6c53866b5b59ad3558ec6b11f0decd3d44cb44757 SHA512 85538ca9f78be3c49cc854af20ef37159402c2a846b076381542dbb06152723fee8f12bcdb1d63ded44007ee4da1421bf2d39c0792ef8586db03aa2b194543f3 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+xVJAAoJEEHL93ESzgeiFykP/20AhIpkdGWEZlI0qvST2xJ8 +0t2M0FExfNj4ZF/LfmeNwu1aeZDpeeoWLlSSoj2I1fAkRSyWqlFTgwae2o5g7hhv +4xVPYIWAsO6jQeupqyxPbZ5Ce5JAsyev5G1aeJGMEwBIE+L1rMVc/msYRs6xmxtH +FA9usk+fB/WNVLRl4zTlDNeHk84jOJONKzWelvmcgUYMczJu4/wi0Z+WuEI1CHGc +KKOZGSKiQP1mIoJVasCbWkax98ljbNy2R11lyGeQFN9ImuakH8P1piyOiOH1mnnx +xHZrcBn5mIgDN7mqDtKnt5WSKJMvnD7Cqq/WaIiFmKIm0r5xz11CwArF1luA/csR +I8+NUNrQwCbyoO+5lvFXp0yvJTMteu3cj6FfDHfp0iWWE4KtLxxRr+5CYfXZ5ca/ +1VJfDQgRJwy/4A5hMGIbv9hneT5wSoN3AsqNqyhzCMSrgUt9L1reJuiRpKQZ50AN +xZ6lv9qUzu9jwcu24oBkCnCc5W62DtMwX2jA75VGXSTJgA33m0l20awjLVigVFSC +Ttz5+kyjLxgnieuoSfbM8FckxbS8FD1cX9gQA6S9berZjIK2pxW9XiKYgmjsBvGM +A7DMZonhSBmPe47fpZtknwty46bP9tWNbkEi+UWFqudGD++n7VUrVpx5R8gfjWU4 +/mY7Q/YVk70u5385yuZM +=eszu +-----END PGP SIGNATURE----- diff --git a/dev/python/argparse/argparse.SlackBuild b/dev/python/argparse/argparse.SlackBuild new file mode 100644 index 00000000..72ffc6c2 --- /dev/null +++ b/dev/python/argparse/argparse.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# argparse.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. +# +# argparse.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 argparse, by Silvio Rhatto +# requires: +# tested: argparse-0.9.1 +# model: generic.mkSlackBuild $Rev: 805 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="argparse" +PKG_NAME="argparse" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.9.1} +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:="dev/python/argparse"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + 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 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +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 +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-$VERSION.zip" +URL="http://pypi.python.org/packages/source/a/argparse/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! unzip -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" +unzip "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Build and install package +python setup.py build install --root=$PKG || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="README.txt PKG-INFO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +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 +# 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 +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-----------------------------------------------------| +argparse: argparse: An optparse-inspired command-line parsing library +argparse: +argparse: Argparse takes the best of the optparse command-line parsing +argparse: module and brings it new life. Argparse adds positional as well +argparse: as optional arguments, the ability to create parsers for +argparse: sub-commands, more informative help and usage messages, and +argparse: much more. At the same time, it retains the ease and flexibility +argparse: of use that made optparse so popular. +argparse: +argparse: +argparse: +EODESC + +# Build the package +cd "$PKG" +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 + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/dev/python/foolscap/Manifest b/dev/python/foolscap/Manifest new file mode 100644 index 00000000..8a4a2118 --- /dev/null +++ b/dev/python/foolscap/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST foolscap-0.3.2.tar.gz 440853 MD5 635b9b6967504f3a03b8b05be4ca06a5 RMD160 62dd90dc62901f30d7cc10d63a5b6363e5ebc3e6 SHA1 0da3e394f2e1a0e774f9073793ac15de2ce93425 SHA256 800eebc2703e3ce37bb2652a486ba8b614810088f3746c1bfabb53ab4c7d78f2 SHA512 1e566ecb4deff2ccbdb77ea0b2a8b31e091609f0b5f440f0446823d31922f87799c5dcb0405768c51471e108077ccf172098ea9a2940e09b4f46cf7a5acf38f6 +MKBUILD foolscap.mkbuild 2775 MD5 ac0088a8c86e5e70beb0fe6c5ac14a14 RMD160 b0ccd32b10fc27a75cb4d987cfb2f176d9e2de6a SHA1 6d98b57776af53f08ceb56cd2b92674ba820396c SHA256 ce99241dcaeac535bd1e6f653f80b9b42a0da9ffebbba7baac4cac98efef76f0 SHA512 d8533bbdd8302c772e916937b40400aa7865b6b0546eb9fd942dfd9b74addb73ad558ac1b0291ac2aaf604fa0c5555854a109c0fd800032b0e674df8f9d746da +SLACKBUILD foolscap.SlackBuild 8278 MD5 3bbd199d1ca7a7016b0b847f7b88bc87 RMD160 51c9950a4da0cc3d55c60a64f090c950e8ec44f2 SHA1 de9c126eff9be0192086d65327cb38f9636169c2 SHA256 cfaa4a06613c4876f6665c71f320a183b0f951de2af0d354b53091bfcf9b771c SHA512 41d1fca329c2edfb5a20017dffd420f23e1543c40269c098973ff9825ea11385051b92a28df68f5aab624a268347e18184db7d4af9df503a83bcb3000cd2b3a5 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+wvZAAoJEEHL93ESzgei5i4P/0LOU51bw+KCrOCBM+/tzK0d +75jJRl/KaAV2RMAGf7rJWB0zl/LYVUWnWnpkYQsfMdiXFD0QRVH3E0LIaziZWmsB +u560KpZuZUX7NXwX4fDpMygEkwRIRKc2oWOk12HxBqcIokfy71WC+qM/JsKqw/yr +dgmBe+FPulK7L7Oo7hV9Ra36fcCzY7hnN5TEkuJcAicta8/wsNZjI6T8WMWkgRom +9wANDV+iMQDYIWZ5rXfj4se98d/f9hjCEq1KkTP5A3ekiDsi5M43NDrmyNmFcE41 +Ll8Hz7H9pFrkHgeg8vmQr9BZFqa6eUohtdJcWetRHlSBPSn+hNKOchvnXf3y3RYr +FwqAOyQxVrVD8c4phZLEf5g38wUmuxve0kLo7q6pYWwxAWcH4HXfqqfpAT1oW/hG +jjY0RgFUgb/LjBLFeTZgO4UvkBgNwnFtFraTollLd9PgHDn/3VmA+xqzaJh64XBr +K7GCbJI01VR9LDyUeu9i0IUJwmHx6NWqvuTg+SZJBJf9cY9F2AkpNE0rJb3HmJjF +IeQglI8nGXYr61AHVBqgEVYNjPeB+8KRwmkZBxWp8t6cMZzxhRnr7Yh4iWK8CCOX +dme5K6CtWYMd8G8LnCIYXr+PYOyLCKMaCJfNIaXIEyJDjNmFYTIIPnkNRGhNCHm6 +8YHQx3LacaptDtemKO0N +=UlZ8 +-----END PGP SIGNATURE----- diff --git a/dev/python/foolscap/foolscap.SlackBuild b/dev/python/foolscap/foolscap.SlackBuild index b8f9e821..1c944944 100755 --- a/dev/python/foolscap/foolscap.SlackBuild +++ b/dev/python/foolscap/foolscap.SlackBuild @@ -17,6 +17,7 @@ # slackbuild for foolscap, by Silvio Rhatto # requires: # tested: foolscap-0.3.2 +# 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:="dev/python/foolscap"} 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 @@ -128,6 +131,72 @@ 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 @@ -180,9 +249,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 diff --git a/dev/python/nevow/Manifest b/dev/python/nevow/Manifest new file mode 100644 index 00000000..dc0aca5e --- /dev/null +++ b/dev/python/nevow/Manifest @@ -0,0 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST Nevow-0.9.31.tar.gz?format=raw 505637 MD5 ca4c6196a71140122018a1334faa0f06 RMD160 4a178b4836628a394fe7fa4b648bcb0d2bfd4f98 SHA1 2e8fcd58a50108ebbbf365fdea93335191285fbd SHA256 b6377fe3727032c29182afc6d1e07e0b63262e989434513dc3c9385d1af072d7 SHA512 055c21ece307f2255c4a2bcd6cba055f70fd86af47543e7164a1b45177d97211c98d5f337a67c7195dd0cd3021ab285d4c2b8a6f8c82cdd2eae3adc993242315 +DIST Nevow-0.9.32.tar.gz?format=raw 530459 MD5 75828090af2b26f69fe4a7f148a400f6 RMD160 a86b3c6e122c1cddad0a4d07a17564ceb9cc19a0 SHA1 e3a96fcdbf2f3d0292ee6d170974cdb16a35788c SHA256 bc35ce187481db91f047055b3edbce49c14d291b1a2eb3e915e9c1c511620f9a SHA512 235ba0a18970dc74177e82416513546cc2299bff6bf61d422b69057e056efc03680988eb544e59f0929849facc161872b210938734cd36f8f22baf7e30153f46 +MKBUILD Nevow.mkbuild 3012 MD5 8972b2990e1142d94e4a1c605a00f31d RMD160 9c0496408fc0e36cc4c24d9cc8b3ee66f52ba454 SHA1 683c4089ec6b71d902c938ae383ec4282ec62042 SHA256 5658d8a30e46b98deb24bc62f48fb87c6d17ec4cf5ed56ccc6a47add85fdb80c SHA512 880462128b760c8e942001a95a6777e9df93e191caf0f540a3b0f96c1a8d1ecbac4a344a1940cbc44f394e2c4468740fe2b8e94270ed7ffe905e10f53ae49b65 +SLACK-REQUIRED slack-required 77 MD5 96fe657236330e7efb68b4b64e683d18 RMD160 007474a8c479a2e4bc3ff4330be9aeae63a7743c SHA1 460b1a0f7fc15e25908ca694ac4d09d55e674d59 SHA256 c801883906454754b2d8198d3f3e01b307c9b05e56b76062e5dbd494725358fc SHA512 af7543c88df9ad85188a93ebd2949fedc379f61622051ebe8fadb046507249b45e13f348ae9bae910c5d5af9cf1d7c5eec1d7e887d7c74c75b2f294e224045f5 +SLACKBUILD Nevow.SlackBuild 7030 MD5 3ef693110458eb19f3f7ba13e34bd412 RMD160 a0b9985e39c94307c3a718b01127cfa193d77dc9 SHA1 f9478f352a85af58fc349785428fffebb31004eb SHA256 975dad7c5a5bba21a333685d304a47825290b764ff69606bf6b53c38bb00c153 SHA512 09ca61f99ea83fca8e6e7e52667101ecd26cb9f3108f74e98ab073fd4d61f5eeee5c99fe77e34f1dea77d63c83ef438b349d8d89f698842da5bda4df69a78a2e +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+xCOAAoJEEHL93ESzgeiRK8QALVre+bsW8xYaRrtrbCiu40+ +kP7lQVzBh1Sr11ijzpYuG8b0XTE4ScbLWOc0ZSLojpJfUCotSBeCLZgkFZTQg4/l +/U5EQXZ4HmLIjJ4EWI4WPEFggzHeLsCN9+7ugIvo0xhxu3RpP/tNhE6py6wh/fOo +6LTQdZfAB1xYCOeTEqqP4NiAANuvoVRGwPEwOvPhqM5vLMW7P6ZW04WGy8L2V+Ry +PqrgjtzjJmtom7aLi6x6qrl/kbmpjGtMLAegAcEuaaXgdQKT+Xo2vB2wqrMXPe6R +LTQvXRnWA/J43/69HYLW2YQFyhi0mPIKedpTLMW6a6RYoj2roYOAsy1M1B1w4cen +BRseONhr87qzChoiOkjz/p48zL46hf+99u9TwOlmRtuv9zPx9BZnifgHxaqSEDkg +hS0ItFEJ2iNhILoFNz+ho00YS+OMhNmbGXypD11gTxltjk+kzG9Su1bfhY4OtOuj +/fLpFiCf3x5X80QvSf6CUU/VelveBoKefmPojxfhNeYPWwFXLMPR6i9uoDN9UsBh +xwlvPPvCUEB67IpDbcMWamz5IPXAnVj+qMCDIqZclgV1k4uhct/JzBFgkaqyhYF7 +96u+yoAlH0X2AafpSgDzUwa+EtX50EtzaT07RGAstVvnI+OZEN1v0lokELyzqf6r +10DPaiehHJ8EPt9N6TEJ +=mQQJ +-----END PGP SIGNATURE----- diff --git a/dev/python/nevow/Nevow.SlackBuild b/dev/python/nevow/Nevow.SlackBuild index f922522a..b13408ed 100755 --- a/dev/python/nevow/Nevow.SlackBuild +++ b/dev/python/nevow/Nevow.SlackBuild @@ -15,8 +15,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for Nevow, by Silvio Rhatto -# requires: -# tested: Nevow-0.9.31 +# requires: +# tested: Nevow-0.9.32 +# model: generic.mkSlackBuild $Rev: 805 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="Nevow" PKG_NAME="Nevow" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=0.9.31} +SRC_VERSION=${VERSION:=0.9.32} 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:="dev/python/Nevow"} 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 @@ -142,7 +211,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 diff --git a/dev/python/pycryptopp/Manifest b/dev/python/pycryptopp/Manifest new file mode 100644 index 00000000..7bc71627 --- /dev/null +++ b/dev/python/pycryptopp/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST pycryptopp-0.5.9.tar.gz 1381516 MD5 d2248ad28f4a6a0c902d638da0caa227 RMD160 df4c38b742ba9d99eab78f0a65ea56522707996a SHA1 077298cdd87b9dc33700242e937fa96a70cdb7a6 SHA256 4b3b092c9baab56304e1d0cb117fb0e8241dbe59102e8efd79346d2369d3fca8 SHA512 dabfe105892db2ef4e34d9edf9ef435cfbfa30b6ec8d14021e4b03224d9de37d0bf0568a25389e3e06a8e3929f123b0e1e45b54ed1cc142751ad74a34d7c81c2 +MKBUILD pycryptopp.mkbuild 2519 MD5 2d1a0e5013a3e4fe084aa8adf91b607a RMD160 35e220f98595f6d740d5b5d1e96f25a6689d7156 SHA1 c9985a9eff14206b37a52b2d2865e8065c68d2b8 SHA256 086b869b930cd70cdbce5c3208593d24878812e6df3ed154aa4ff38e738c5af8 SHA512 cddd38123dbfd3169d592e79c98a17266edf3b0d4175840d3b0bbd14bddd115d1ddd460e07a4702d3e8c3e22f9692d15199f036d79cc488a5df3c0a09fa280bb +SLACKBUILD pycryptopp.SlackBuild 6721 MD5 230e42f4e8f9863b7411f3171f130cb4 RMD160 668da847c7520724ab046ae0201b7237731ec60a SHA1 d9a276b62268698ae001c707c78f3ec6b59076aa SHA256 c34ecea099f884da0c71829f355cfc03320bc47623f4f41f34a8da6b24245b69 SHA512 d83d14aea02f67d72f538463fb7b2a9907aede5f235beb09e0fd2ffc648ff09b6084cc15dd356d163f759450f12ad6e9c2c21aeb988d30da9ce84be3d0be0bc4 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+w0aAAoJEEHL93ESzgeidqYP/jzad1/5PAm4RgIg2p8J74tw +jr2hi/onm8iqOW0K/URWQYKWeHz5U5+FJc+PjMKNI2QxWo/QI/vVpNdl/wWUbo2t +AQ8YPgCWRCiklyYoY/9C6R/ceHS8UF1X4InK212CEYHok8Yir7pXghDAPQGyjJY6 +MUilih4rHFCksfnUZIjdgqRxBoWJjXCmmYG3PFSE0gn9s5IdMgP5AP+0B3r9kQGy +z+xSnK3R+0FSpciWVLDMjE6Ciq/q2ktJJRGqe0cepj4s41/dzaKNT3QNbmW+Qqwc ++1u0uiBnZP+5BuZ296ybyLe2FqdOZUb4pBmx74kx2XyztvYb5YvrP9tmF2/a4mK/ +R8G9Th+aNvHuTORGiVXqYhyYOic0lNtgYjhpRUxOk2zS8WEFntqQ5t22+3naqjR4 +sUvJha07DEQ2+dkmUih/E5xSKMNjv8V7uGxX1rkisYtpLE4kxGJu0dZJKcjASUlP +rdTbGZLhqlcp2od2RMQ12qaUae/Fxtnq55iCGkQw/4Y+oF4pS7L6D5vDLE7tFyvT +V3DbHfGdF7fXzJZRS3KJIyMF6NBDWU8oWfBOv/PvyGJnUXTXKeex5a8QeerzihG7 +wz1JWhkRu6hdlPBzroACY7aZ8h6r7jo+xDnEMNw9BgLBgiu13XK3Y+G6zaAc0h6b +CztLdB6JbfS/2v3TTqd/ +=d1TU +-----END PGP SIGNATURE----- diff --git a/dev/python/pycryptopp/pycryptopp.SlackBuild b/dev/python/pycryptopp/pycryptopp.SlackBuild index e151b97d..60f0c6a4 100755 --- a/dev/python/pycryptopp/pycryptopp.SlackBuild +++ b/dev/python/pycryptopp/pycryptopp.SlackBuild @@ -17,6 +17,7 @@ # slackbuild for pycryptopp, by Silvio Rhatto # requires: # tested: pycryptopp-0.5.9 +# 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:="dev/python/pycryptopp"} 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 @@ -136,9 +205,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 diff --git a/dev/python/pyopenssl/Manifest b/dev/python/pyopenssl/Manifest new file mode 100644 index 00000000..14d6f492 --- /dev/null +++ b/dev/python/pyopenssl/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST pyOpenSSL-0.9.tar.gz 197981 MD5 5bf282b2d6a03af921920c34079580f2 RMD160 fec72e02a922ffb37a9c66ed809c573b778138db SHA1 d39eeb26c73e4b96804e1e403e2136062910b6c2 SHA256 7089f1d47ce74480325411d34a31e3747175980889d99d2e1180f16d123251ab SHA512 1ea04af24c766fab8c30983e8138a3cbb2bbab944782b6a895e22e19f49afac8b3a4e7fc796b6c876974c72eb4f572fc41525a16bdfdf22c6efdadfdecd556d8 +MKBUILD pyOpenSSL.mkbuild 5242 MD5 6fc3dd67552169e5dcaa8e3472e34e51 RMD160 828cd8d59ed019f984a3ab8bf5f88207413d1850 SHA1 2ca946a6885847ac9fddf5ff6693b708e72858d3 SHA256 923d2622a71d3ae83310d530443a76a6d9c49e8283fe75a58db2b6eb07de7cf2 SHA512 1f78f00bcf414ed4e4c85e429e38ffbf802c1fd34c9c8a3f27584cce69cd89425c5f4bed34b179d2eab1788a085a2e156a1bec9b536299754e940643031f046e +SLACKBUILD pyOpenSSL.SlackBuild 6926 MD5 f87e2e584397abec8465b349641b5b2e RMD160 eb58f6a061d87a1b7b5d19fa77803646ae07c7de SHA1 0a15645073a8264f81472af447ffa14f317bd877 SHA256 dca7f0a83edadc04a3bd520e20884cd5e580827d2326daddf5f8970ed91c2667 SHA512 0d2d3640f98eef2566d61f789d383d496103894bcc9927727cc3056246546c279fbcd805df0a8725f720ba274ce0225708fd4c95aefa15eb95a7d79ed1e9524d +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+xI3AAoJEEHL93ESzgeiTQgQAI00kR79J8hyMUjT+QivgAVY +3yay4JsaRQmc6ziLfEa7e9ynEtbQ2jl6GUFDd1VZNg5H2SuYcXHEn+s/Ys71kOPc +ULkGO3oq9VXVUOFP1ozgFfbS5X+kMVRYoJFoU5CSInDmv9pvESuryk+6hhOTlRk1 +6Mvfq6l9QTbhc6dy8yhP4mqlC5IN10sdebBgwwMTtStzza3SJd8H8n9AZDtnEo0R +JU/ekezbcBq8UCi7vr10MESCEK9Oxl7N/OIWx88vH2DfDS/zR61V4/d53mRwKCf2 +P7JLS5JpOGozqOk6JW/wlJJpMyk0m/7b/OZ3pnGb5bc6hx0+9fdqi9aEpr+vXQX2 +THLn8LLVHStHBDTg90XqcWdJjUaia4E9zItq4bAF8E90X5hbbwWvB12YaJe76EgD +NvblZy+AGOxZz6C0e1RbIdf4tjybdjdLdzd6Wz9I7GTHFhHbaoMiBGxSf56O2aEy +wYv90zm1cYTcZqmacGCetVuBBwVVzD0uJ1LUw7P8cG5DX55yAqTrwkLeht2qI+Rq +E0onLP0cjgPWjwTRe1uE4CIpASYN4k256QKB+8nqcwFX9J+ruAb8fqwDtl727GJZ +7u2Hh3S0rXGrBn2eqKFQEOBNqlZqQAToRNQrH4u1NNK72SeIyYBZ9KQxy/arDS0N +DmYyM01WXZlWbzyxXeDr +=A3zi +-----END PGP SIGNATURE----- diff --git a/dev/python/pyopenssl/pyOpenSSL.SlackBuild b/dev/python/pyopenssl/pyOpenSSL.SlackBuild new file mode 100644 index 00000000..a9a09dbf --- /dev/null +++ b/dev/python/pyopenssl/pyOpenSSL.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# pyOpenSSL.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. +# +# pyOpenSSL.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 pyOpenSSL, by Silvio Rhatto +# requires: +# tested: pyOpenSSL-0.9 +# model: generic.mkSlackBuild $Rev: 805 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="pyOpenSSL" +PKG_NAME="pyOpenSSL" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.9} +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:="dev/python/pyOpenSSL"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + 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 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +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 +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-$VERSION.tar.gz" +URL="http://downloads.sourceforge.net/pyopenssl/$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 +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Build and install package +python setup.py build install --root=$PKG || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="COPYING ChangeLog README TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +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 +# 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 +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler----------------------------------------------------| +pyOpenSSL: pyOpenSSL +pyOpenSSL: +pyOpenSSL: pyOpenSSL is a Python wrapper for a subset of OpenSSL's +pyOpenSSL: functionality, featuring an advanced error management +pyOpenSSL: system, connection objects that wrap socket methods, +pyOpenSSL: and flexible context objects. Also included is a +pyOpenSSL: rudimentary crypto module that can be used to create +pyOpenSSL: and verify certificates (X509 objects). +pyOpenSSL: +pyOpenSSL: +pyOpenSSL: +EODESC + +# Build the package +cd "$PKG" +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 + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/dev/python/pyutil/Manifest b/dev/python/pyutil/Manifest new file mode 100644 index 00000000..2eaa88d8 --- /dev/null +++ b/dev/python/pyutil/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST pyutil-1.3.30.tar.gz 71569 MD5 5b5314d79e24e86a9fdaa6a85aeccbbb RMD160 64fddf8101f1f408a5e89cecd2042674622d1e37 SHA1 fa9d17087c47702417d4335687439b0a8602be3c SHA256 2928fafb8968a005fdd7771ad65da512eecd90aa61cbda9a677c948eec234bcf SHA512 a140f7e84a1b4820c048ebc26c5d68b3b61b267c27ca3bcb3810f3c6811e208b9b995b5a234db139656c63f941fc172679dec1b44200cea3570a2f4389f5eef0 +MKBUILD pyutil.mkbuild 5385 MD5 362df1169798b05ff4ebdfa806c67405 RMD160 e063bcafb28ab791d795ff43f817e83f70e6db7f SHA1 ae8879c65412725a98cc441ff6ef3c6b8091a0d6 SHA256 b95422ccdba5a1a2064120ed5132d0738724c91534bd1e424e231ab7b089a9b2 SHA512 03303ad88893430df6194bcd67bf552cd9e52483c5e1b888d5273e4a63a6cd50994c9719fec81ae7725fb20567102d5d87622f1c37a106c511213848f04e7d91 +SLACKBUILD pyutil.SlackBuild 7060 MD5 f22d52367c34c4f33964c209bf0bbb9e RMD160 c2837bbf63a2da92d1928553d1943dad2004f11f SHA1 30548c285ab0b389e0deaa7152d0c3f662c3c645 SHA256 a4a74b4bdeb711f4fdf16ccfe90c286694f4ca37f52efcb0c3a13bdab30f57c5 SHA512 2bb414aebc4a16f4fa1306314005e8c2c2e79861b4e18c333a41d126cfdf674ee390555e20113f904638aeeb355223cb1453ff874dffc785365056841e206f74 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+xQ0AAoJEEHL93ESzgeiA+AP/1O7dlfQ7g2pgzSexokZ6jx9 +6efBxNyAVxR10e5VoN5UYxiFJdPghXrlzmbt//wHfH9Y5iv5pRRKOAkX86dI4Jrx +vNwqjgAEans3P+aZbQP12eXhiIZ+3lp8jghjs80PkoCJyyiea0OZQMeT1yK4e9FU +I6hhSM4aqpicET4ah2ZVAJts80RsB44MZ4UxmA+S1cmNCJlVq903ST4S2jSWcd1a +BMp/y0hhOFEMCRg4ATVPgimTq24MLqasi0GIEwhz66GGf0qIUNfnzcBAXdG70ehr +v31tvd5wMEFiB84or0OTPhe3zt2j/usthDCwuaGeyBWovlJabqu0Vwel9l+XWwYz +MmOTGHJxu/+Mv5dloBno9B8kygkxOf4rn+23YPZVH+s+FTmVKa2eRDa0Dpr5N59R +9pzB3jV2EbVyhH+Tpi+ORN/95iWKNVd+L8L5f+V+XBFGwzH2UEOaIHh8Is/9H1Q8 +w0QaQlC0QAtAMTMs+sb3HXakrMlFEd3X0djCFLiCO6cmBN3kqn9cuD+ynu77FLYW +fOOsASN4Xw6FnN0CLk8lxUG90z7NoI9eoSO/bCPpOKeSEvGTIATezgdx/umA1BaJ +CFRxQKpEGIipzpX9toNsTzLIm0cEe7MiVfHrX/kNT6V5Yf6bvVulGWnpVm+z1fNP +JiQoG05Dq1C7g8Lr7fts +=Pb/Z +-----END PGP SIGNATURE----- diff --git a/dev/python/pyutil/pyutil.SlackBuild b/dev/python/pyutil/pyutil.SlackBuild new file mode 100644 index 00000000..7e214386 --- /dev/null +++ b/dev/python/pyutil/pyutil.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# pyutil.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. +# +# pyutil.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 pyutil, by Silvio Rhatto +# requires: +# tested: pyutil-1.3.30 +# model: generic.mkSlackBuild $Rev: 805 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="pyutil" +PKG_NAME="pyutil" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=1.3.30} +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:="dev/python/pyutil"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + 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 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +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 +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-$VERSION.tar.gz" +URL="http://pypi.python.org/packages/source/p/pyutil/$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 +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Build and install package +python setup.py build install --root=$PKG || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="COPYING.GPL COPYING.TGPPL.html CREDITS README.txt" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +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 +# 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 +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-------------------------------------------------------| +pyutil: pyutil: a collection of mature utilities for Python programmers +pyutil: +pyutil: "These are a few data structures, classes and functions which +pyutil: we've needed over many years of Python programming and which +pyutil: seem to be of general use to other Python programmers. Many +pyutil: of the modules that have existed in pyutil over the years have +pyutil: subsequently been obsoleted by new features added to the Python +pyutil: language or its standard library, thus showing that we're not +pyutil: alone in wanting tools like these." +pyutil: +pyutil: +EODESC + +# Build the package +cd "$PKG" +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 + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/dev/python/pyutils/Manifest b/dev/python/pyutils/Manifest new file mode 100644 index 00000000..03e39c48 --- /dev/null +++ b/dev/python/pyutils/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST pyutils-0.3.tar.gz 6574 MD5 85f3fa7dbf6fe79d22d9ea90b0313deb RMD160 f6d61c0f48aab8efdac7660f34e1c718e49e33c8 SHA1 c7cc4ca8a3601ebb5a98e2bf2d2bd243fcad89ed SHA256 846a5d2f5cd10234a95001ba10778d21addc4a6edbbcaa8fed3eb0a40462f514 SHA512 705eeb83100d52307e36b8d03248ac1d5e490052edd14bc6c46b6152fd52782a6a6bfbe4b580c4beafad409fdffc4375b0b4b253c68625c64d5d11dd8f4a01cc +MKBUILD pyutils.mkbuild 4978 MD5 8cfd3c36e1444e69d68cd2bb2477fb8d RMD160 ad466e9638416158687f7cf9069ad4758e983597 SHA1 b95947e01be52e463bfb11f33e8607cf4a784402 SHA256 28b99fbba01b8f6bd2658d4899643c924c2821faaa82ffdd87949980916e9738 SHA512 1fdebf0a14011a554b1afd6e637ed29ce06783624b27ef6719dacabef2b6b7d18d1617b8ffedf85e8962311d1d6fe92e485f7ae4161796563190df662cb1147c +SLACKBUILD pyutils.SlackBuild 6742 MD5 d3c437a37dc57df8b1b17ef0e1ece3c1 RMD160 724b279f03cf5fafad86c277929c492b7be46750 SHA1 e2e382cde6effb4ac05a2ef225bc1b3ab713bfaf SHA256 c483a6eae76664c975b0492810b1871f7d63a5bb443ed28c3eed8b5da25e0a2f SHA512 612fed654ce8e08204c3981323adfe2e8c653b8982a85b00fbd99fb291d59b5c86aba67390168894c05df0b5cbad35f80f1185382998735535a10561d1c25551 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+xNOAAoJEEHL93ESzgei7GQP/jtRqN8/lHchM1L8xuxJaYwq +7v31p9D39HGi0RexpGqWKIbg24f5bVr7KeahRnwhhAE1xhPfhShnHjHGazBi58bW +4F54rFRmm21JUfqG+Dh5idPc8RmuPg7ppEdKpRIbZ4AyAxzWf0gqbZHLHDsQmczt +j+HRVdQf14zA2bX47Wp5BLVj/529Rl6i+8iCyW2mXs3rMoK4glOIaTQrNO8D/LXA +BnvLPLT+tk1moo4X4Cp/Dqu12Z1oaPcXepJ2XnGk9CeaKY8iW3uLy68tcfE14uvm +4ebGQYNw0oDRdT4cNX5y0mthA2eq88elyoyplPz1sOhbiUnuj+e5trm2oc5uqqWO +27KEnwDz3sb2tw678/mxmCvyw6wR1mpQimQc4RffMWTTAmZZC5jVQtr0gZk0hVBs +ORWdPzx2foYzAu2zmz0L87xmLT8fxDALek+aVxg0FVfk6kPt1fIribWLiF0GvakM +PUQbs8s7I5ZO+miP4QORzGwg12LjYbqgN+8yYQcTPOhnS/q6VonGaucSJ9VqGM7r +Lcz2t9exQtAp9ick9p+iM8hglnalyksWwXVR4KmC+bER6MmxU7eHOIYVU1CvuQaB +dW9OmRl9FoCZgyRKKq+vLM0kKjIdT+22uuWtLmscI0nVkEcCINWPFki5LedQUkx/ +v1ANArxp38QkSEORtz0E +=At/i +-----END PGP SIGNATURE----- diff --git a/dev/python/pyutils/pyutils.SlackBuild b/dev/python/pyutils/pyutils.SlackBuild new file mode 100644 index 00000000..4a3d0711 --- /dev/null +++ b/dev/python/pyutils/pyutils.SlackBuild @@ -0,0 +1,213 @@ +#!/bin/bash +# +# pyutils.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. +# +# pyutils.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 pyutils, by Silvio Rhatto +# requires: +# tested: pyutils-0.3 +# model: generic.mkSlackBuild $Rev: 805 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="pyutils" +PKG_NAME="pyutils" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.3} +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:="dev/python/pyutils"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + 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 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +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 +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-$VERSION.tar.gz" +URL="http://pypi.python.org/packages/source/p/pyutils/$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 +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Build and install package +python setup.py build install --root=$PKG || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +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 +# 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 +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +pyutils: pyutils +pyutils: +pyutils: pyutils provides utility functions for sorting, +pyutils: date manipulation, database access and google +pyutils: search. +pyutils: +pyutils: +pyutils: +pyutils: +pyutils: +EODESC + +# Build the package +cd "$PKG" +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 + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/dev/python/simplejson/Manifest b/dev/python/simplejson/Manifest new file mode 100644 index 00000000..7a2a507f --- /dev/null +++ b/dev/python/simplejson/Manifest @@ -0,0 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST simplejson-2.0.4.tar.gz 111781 MD5 9a888ea017ef2fcd42a2823454950b16 RMD160 c67dffc46b59b494530dd01447597e5b20a10e51 SHA1 bf339dd0e93df34b72f81702902cfd29d9b31a68 SHA256 1b6868ab49a15519eb54fbb0901272a612b2c2a3d8820844df6b1b7fc19754f9 SHA512 e4a01a1ba23c754836044cfbbaaf6c7fa0be6975d7e9465910ced48737b2fd9263913deb18002d502de1321b04bdcafd6f7eb5191d4cfe5cf3d96d9834ecb777 +DIST simplejson-2.0.9.tar.gz 115443 MD5 af5e67a39ca3408563411d357e6d5e47 RMD160 814a0b7aa11a361ba5eda0be93e30505c44409ad SHA1 b5b26059adbe677b06c299bed30557fcb0c7df8c SHA256 abcdf460778beff48ba13faf5b5810cf3803e5c8d872b5fc529226aa56ec93ee SHA512 31a63a05b6215412cfbc42256f376f20c762f99c40b72b184cc3ee4e50a047cdfd21e70f6cfff784fc3bb72352bb5f4115cb7e1f95f32b5aa6d5d363ae963f46 +MKBUILD simplejson.mkbuild 2750 MD5 034b6050b502a322ca19e473decf4fa2 RMD160 7d681698a245847ce674de3d9bab670880e7bc9b SHA1 5d59d5a15ff5f0fc5a3cb2371b4e0ea17f489e3f SHA256 febe3661a62eaa8607efba24aea91c4aa3c7d7e1eb2a82ee27e165b5d9eefb64 SHA512 97b7e732b8065dfbebd1527d0ae9983c757965c7b5b123e88ff0b25ac9c4b8bd9512aa0cc1c93a91757ffc30030e18c1b35144aea1bec99d4d877843e559b752 +SLACK-REQUIRED slack-required 85 MD5 3d41e03668e89867d50aec1fc5058b4d RMD160 6c7056e126ec640ca8d6f8e933ea94799557f9ce SHA1 0b9b8c1a0a47fcb65645877969207f47c8af2f9a SHA256 bb06841db9b4789a611310302e05ad0f18430075aa69290d9249a5f7aada6d0e SHA512 3f637f299b0d02a9b2b1aac39866f2c58c48c17d099b58790277a2efa47b65c3b5abb5343fb9723bc8b4ed79c1b2c91f4d131f1d7c8a59a01c8da37fefade405 +SLACKBUILD simplejson.SlackBuild 7028 MD5 80cb998ad4837a7e87818a1432e661cf RMD160 d9cca8fa0d37eeec0b2a847eda54ce7a3a8b7371 SHA1 5fa39e2bc298f206739fdb84be8abd1071642f0e SHA256 4713e5612828ea1100dec907b1c6af5121361239343fe720226b52646b72e7c0 SHA512 477df3946bd39415a82d56858acf7acf136fa6176b9df9ea0c33eb63ec023cbb3383060b8922b370125c526d1fcebff36ecc47c488d3f80c2f877b4d705cb3e4 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+wy7AAoJEEHL93ESzgeiCzMQAKSdq3MjLMMkygAECIyovs5x +0+FhK6yp758ET5wEol0iVxZ+wSFwloSCVJYKygAvhbfoPBAZZONQ+jgLhNsrcmlf +h3WlRLynLiUYHbjGTbCfYuANvgtJrC6X1Wk+epzIH+9XiZoWrX/U6JJXvR1dEN1/ +m/Fv7/RZbOMBzIrRkBZEGa7MaGwJi7JzJ5Bt2F7ox1JoeGUAAL3Tl/x6R7mObXGe +axAxee3SwdzL5KgrgkQSagZV8t8ZQffjrKhzoa0R+3tNZiDHZ1Z1Cxd0yg9zSKtk +GiGmbXgTC+X7m8h+u0LOBhi9MHf0r8gpY4GiGkDqbN6skphFgXlA7+ENjO6AxiFJ +GGvCEGhqRavFBij4JuJyp2xmImf+sPYk1GochbCZcG1JOCPLil6XoWTaPBRCYVw4 +GJrDheqCBnQnoYDfFNGsxYam+6/xryMOqZPEt3X8WNInxTRZzRtmGI9gpmMymQV5 +Xa6BCMgB8/hZ93at9JnbooJ5iG8OB5bzPt8v3qdI6BOu+B8pSFxtbjF6GOQNoAVZ +1nakdGOvOrrf2ecRL1HEehP2eHSWfDWiIxe/K8EKrHDSJJ9uukJZzSVJC+i9li97 +Pa+zYkM4UruY+VXCBnk5Kd3e1D31ICQB5ABkMji6N0T6zPDhQzjK9GJ/eSPgwSIu +4gyj5A1qK3k553znbhZl +=Vqkv +-----END PGP SIGNATURE----- diff --git a/dev/python/simplejson/simplejson.SlackBuild b/dev/python/simplejson/simplejson.SlackBuild index 3acb6b3b..2d6f1596 100755 --- a/dev/python/simplejson/simplejson.SlackBuild +++ b/dev/python/simplejson/simplejson.SlackBuild @@ -15,8 +15,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for simplejson, by Silvio Rhatto -# requires: setuptools -# tested: simplejson-2.0.4 +# requires: +# tested: simplejson-2.0.9 +# model: generic.mkSlackBuild $Rev: 805 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="simplejson" PKG_NAME="simplejson" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=2.0.4} +SRC_VERSION=${VERSION:=2.0.9} 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:="dev/python/simplejson"} 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 @@ -142,7 +211,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 diff --git a/dev/python/twisted/Manifest b/dev/python/twisted/Manifest new file mode 100644 index 00000000..f160255a --- /dev/null +++ b/dev/python/twisted/Manifest @@ -0,0 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST Twisted-8.1.0.tar.bz2 2371422 MD5 a575f29ead4cc02c54e9061d0e6ac7c3 RMD160 1348f5e384a7d9d8591bd67e6b1f0d54aa18700e SHA1 b10e523ab96032f5055ee02687b22bcd7cb02951 SHA256 344788c5894ea77a87b94f33e456e07814384fc1551c05e15376fe4ef2fa4560 SHA512 d8606c7aa0b5050d7fa184306241b01ca6b250511c93ebf8b9415c877a9b6bba11c7b36f72d91d1a2f7cad6612d2830b85c5af43306a57dabbd71ced5a279358 +DIST Twisted-8.2.0.tar.bz2 2453327 MD5 c85f151999df3ecf04c49a781b4438d2 RMD160 a942e6ee4c54d734111410b615754fbea0c9fb5e SHA1 ef5f475b8f38eafd9b83a325ce131fdf6af05255 SHA256 e0602bb05e31f6100b6f9ab35cfa93ab9f7a1c50a351a0ddfcd236a923bddfb0 SHA512 b32209765e528a64e17cbc3b9a972e48edde3ad29e9db69d796bd14340f1a55e86aa40635336a072121b70ee52ee0bd2bc8a757e31820c5e40492d3d04196f12 +MKBUILD Twisted.mkbuild 4139 MD5 f36e6942747dda16f77cc6f8cbfbc2df RMD160 fbfe5a03ec953c351834f7747e1de6790fdd41d2 SHA1 b4e35b7cb4652348400535da5057def2d5b28b73 SHA256 c6ed7ca1bd4f70f323511715f7ed96a717a2e63d90e68f62b8f35ccd0329e901 SHA512 772e1fa4afedbed4a0a9c69caced8864d05a22be4c0aae4b25df088395ace57de3e052275b0139d51778803747d200a542a92e3affc74f471cfcea45b4a7cf77 +SLACK-REQUIRED slack-required 114 MD5 8da91f7f53ff8dda6652329202acffed RMD160 c420edd926160f9bb0db42eb80a49e085107c612 SHA1 ddac3a38e86ea6915c7124fbaf8da179b3ae670d SHA256 b9e9eba3cfcb2f7e847966ae719cde550b9b794e24942044aa1291207ff1d1c3 SHA512 b97d4afbb2119a5465576f32364d3d30d8d8224209f900dcf771561a87a756ac3a32fc911d3fd058c48ed311fa8aeacee5ec1c7279bd572f662c5dd2ecbbc84c +SLACKBUILD Twisted.SlackBuild 7157 MD5 2c0aad8e585870ee64b6d16076cd163c RMD160 a0738a9570e89bef63f58f23a667ede564d30da7 SHA1 8bb29df7734ee28ae81bce9864158c4d02dd5cee SHA256 7cb513df4ab48c1aa36f3602f8935fd0a82dbc4223d432323f2c6f16834a24a4 SHA512 b6a902f51ed24f9a92af72967cb57771eaefeda2e5cc465f4c1ce96b294f69bc3ea5c95e97ca75cc1509b11b96493ceaafacf65b45f340cfb442f3003f126977 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+w+kAAoJEEHL93ESzgeij6oP/39TlfiNIBepFnAcwYDOhoV2 +tg7Wijd1OXTIfNVcfX+lXoJlugXJoAVd0zq6h4MwV8rtBSJwIvisVwRcY66BdODg +8vGIyl1HgQQ5/7Jh5Hg23XFgyh7isaS5mb5d9CZM5WVhwdWDlzfTLp7N9T+gChpz +1M4IH70f7OQJ5qsb3DZpKQFyCUCf7zeYNEUFI3DhYQ6iIP5d0GNV+Vn/pc0klqy9 +0VeG8hW5Zr74XtR/up94fsmvg6MB+sPDn03nxpfFfaXxQxR5ihW9C6bL6fsOYmp+ +m6rRBZ+5w9h0ZihRK5UH9Ikfur+IWKkgl2rDwG+Rt+0R3HhYzghUtM4MU6iEV1jL +uzUV7UQe1yjPHqyrKQLZg9KD0mdrVvA31nYqwfjQHO1bk4MYCyaOyXw+TXEtUx6H +5OJqrEaO2iO83ocvcka45UxzwcismcKcesxAnY+M72Yg6JUplc7YAHdv9+Lk1qEE +kStwGPqHozk5TgegDkiQfLjE7QlNPfHNuo/FjcJKBOXe9u1x9UUbdxYzgEF9CToO +A2T2tinhszg/BDVwDksv4Xkm/OIX9nDiVMrjfV1jUQQ4QkOLk3ytqqTtYGS3EpqV +5tze7jTIHpZp/L1CLTOX/CiDE5oSMDd4aR0zD97fL6k9W/rdFLs5PhYRyik1LvcR +od/uYzc8JOb0fIJKNvcn +=+z1n +-----END PGP SIGNATURE----- diff --git a/dev/python/twisted/Twisted.SlackBuild b/dev/python/twisted/Twisted.SlackBuild index 6c789b30..eab52877 100644 --- a/dev/python/twisted/Twisted.SlackBuild +++ b/dev/python/twisted/Twisted.SlackBuild @@ -15,8 +15,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for Twisted, by Rudson R. Alves -# requires: glibc-solibs python zope.interface -# tested: Twisted-8.1.0 +# requires: +# tested: Twisted-8.2.0 +# model: generic.mkSlackBuild $Rev: 805 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="Twisted" PKG_NAME="Twisted" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=8.1.0} +SRC_VERSION=${VERSION:=8.2.0} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rra} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="dev/python/twisted"} 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.bz2" -URL="http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/$SRC" +URL="http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/$SRC" 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 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 @@ -142,7 +211,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 diff --git a/dev/python/zbase32/Manifest b/dev/python/zbase32/Manifest new file mode 100644 index 00000000..3802e0f0 --- /dev/null +++ b/dev/python/zbase32/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST zbase32-1.1.1.tar.gz 21222 MD5 b46a97a869f4aa2932182cc555e2f7e1 RMD160 3b9381700d8fee4ad6b3698bdd140b39088036e4 SHA1 b7b41f08000a5073448d73b967dea73156d5f2ad SHA256 f5a10b27b0c5e3beacf46126e086900a991ca55c9e67a76f87791ba133a1a958 SHA512 814d70c9960afba9c7116597311d9503f1c67dd921c3571e4b51d74024c2e778e2bc552269cb66d38100363d0cd2c8fba0480a8be41d5d8b9df5022d191b38fb +MKBUILD zbase32.mkbuild 4967 MD5 11f74d9213d06e8167b3bd783c19ea22 RMD160 8472d6dd56810d692b87089263669c9c9d342567 SHA1 2f9fee229c94dc69e0e98f42c84a57236b48307a SHA256 01900f12c596bd993e80b8c6555683bda4e33b3b369aacd76e592ee95905af33 SHA512 90c34e7d6685704dbddee90ede83cc938ea8b37714b4395ac28b7608fc04b54e39d272ca996ee0cf60fe2310c7b566250092ccafa73e4e065910c4724cb041f3 +SLACKBUILD zbase32.SlackBuild 6645 MD5 51ff01ec356f1b3b078bf0d768feeee4 RMD160 696ea690387a809a9083715738939173994d8ebe SHA1 ae240d0e5a11303999d4dd93b7538e957bf25d2d SHA256 0f2747e38a20bcfe9623f7fbf3188d4d3e859ee3b12bdd92b57903edcba6d48d SHA512 4cbb1ac79598ea4513ed727f16113b434aaeecd8aa7a9c7f740bbe7598c9bcb07742d837265a46d1f2dcc823f65d82a2270920e8fb88783f1167069e2b74c163 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+xXoAAoJEEHL93ESzgeiQHwP/1U2XdR5L58t4gt1e4csyOIZ +zB9l86B9sn5jujafO+kbVQOjbTudDSwXtqIBexnQ2WquS65aParWndsy0sTbpUNJ +F+OAFqXEGE3OymZlfbN1TyBJvG3n4nv+7Ed9o8qAbmL41okrQgSiW01LMWTKU6mx +kNymdz1ir4YOnx9AaFX4wJsr3Yrpx2gt7YxIpp5q+wKv5GS7nxhWc3t5bNJXQsUF +NSfaijxjH/jFG1TwRwf/D8Wzr/3VCOMkkeBH69ctvDrlEz27gNi0XjhFV0hHjmY/ +MDRnafa6oxwQmJ9CgFGEEg2YEjwYo+c9/cwgXMsNDE7pMeOeTjgyDrLP7Uq35sXZ +Uwb9a/zu/eYZ8UnCWEBe8dFSoibpZscQM0HvmUPt8KJInU+KqkFX6fo1V9cAOvY3 +1Hti2bmGNbfUV36cmcsnRTJ8ydMFqGDyGpHA1LdnboZyIExvl1BQdbj0rOqAaXJQ +SH36hfnsRJU7U85Wd12rVAykAHGN5o7MqlTxK1P0AK/k2SIQ4e4761gDI+9+3Lks +npUIPju8eVTPK82ApXGStxwCLgz5bP5hruekvxPfpOxKerLpftib0ubxK/hATuSo +ieqeUX9tXtt3bedmxJjnsGsnQNuBM1ay0kWBKsEuojLehakodJcFqNCikqg03YYx +a5JxDPg7XmzhoC08G2Sp +=Zet0 +-----END PGP SIGNATURE----- diff --git a/dev/python/zbase32/zbase32.SlackBuild b/dev/python/zbase32/zbase32.SlackBuild new file mode 100644 index 00000000..71096c2d --- /dev/null +++ b/dev/python/zbase32/zbase32.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# zbase32.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. +# +# zbase32.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 zbase32, by Silvio Rhatto +# requires: +# tested: zbase32-1.1.1 +# model: generic.mkSlackBuild $Rev: 805 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="zbase32" +PKG_NAME="zbase32" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=1.1.1} +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:="dev/python/zbase32"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + 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 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +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 +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-$VERSION.tar.gz" +URL="http://pypi.python.org/packages/source/z/zbase32/$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 +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Build and install package +python setup.py build install --root=$PKG || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="DESIGN PKG-INFO README TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +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 +# 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 +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +zbase32: zbase32 +zbase32: +zbase32: An alternate base32 encoder (not RFC 3548 compliant). +zbase32: +zbase32: +zbase32: +zbase32: +zbase32: +zbase32: +zbase32: +zbase32: +EODESC + +# Build the package +cd "$PKG" +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 + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/dev/python/zfec/Manifest b/dev/python/zfec/Manifest new file mode 100644 index 00000000..e3e3963f --- /dev/null +++ b/dev/python/zfec/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST zfec-1.4.2.tar.gz 217578 MD5 8f70e1b183aca15e6d400252118ec4fe RMD160 64932270ff937e56f9a6461f824ad28a6295bc79 SHA1 89b07e58ec1fc0a627fcac1084c11874cb218da9 SHA256 8e232623d90e34483e2f4785ee1cb8d4cf07e1fe1a4b36e8edf560e9ea90eeed SHA512 a3914ccff75478bfaf608f4b524ee37db29fd9a7b9bdc439fb85979b6d73c0edec7be7e02b56494e60595a35ee42a129b73276e5ec45a77f55b07562c739c3b5 +MKBUILD zfec.mkbuild 2477 MD5 8f5f94e19dcc92ce9fd261a578a381c4 RMD160 c71eb739657334d40dc74317849b527c422c2523 SHA1 bb29c3d6c3403d74c2f3bfcee70cb1700368f5c8 SHA256 6c1a7ad5181f04fdd3c8625c586ecef44b7668153716e5098d50f7bd67ba8ad6 SHA512 c140b316cd765221cc82577b41055dacdb20490ec61577bcb1fc1fe3d7315aa2b5775d56640956a843cb4eddbc383da58065bade1e173de67d79f188d509854e +SLACKBUILD zfec.SlackBuild 6649 MD5 e06877747c89f3b34f4736f516aaf556 RMD160 8144dd7266db1c08f155293592fa96e003a54191 SHA1 ece4b73539b0474a9ec190f730e2e571055f9e47 SHA256 481748d5bc596c120b45cad8a74e27baca26649ae93c2fe3d9e39e80e02691ad SHA512 4d0402c57440cd5cccf23039c094818c978c2287d9b253f5df74c658ac50c3a64e35af93c303e5aa8c1e4b61aa3eb43519c992b51b4cf4648b00a17d053d062c +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+wptAAoJEEHL93ESzgeidLkQAIFvWcIDplA2Rvay1RiNWrEX +qQVvy5Us8r3ORDhUXpeTPEHhkY8y6JTv728gxS/MKxHABZzL2MKKAYjRspwZxHp3 +F5HJVxxLn2l2JChGnUc1YSJkSolmLo9/OUNE+dXhHTiBKfdrJ0ZSqwm/tGIMUi2+ +xQWjClabJ0vGXQ1+sPox4WBD2rler4QcAzcBglo/s5XgjJF7mXY7ZGTDjW7iVnhL +lsbAmmZEqGZNfI+nteAN6L/gBj9xEWnmBDsFWeC4Ip0mt0IipQEke6JSCt9qyr57 +0hJKEGWFo3bS/ss2I6BFXbU/wXyrevIr6C7HrHFFnAq40KXSz/dDq9XxXUbVCgvb +sSL/XUnVmLEGEsgFO8oBNsS4Mq1+R0K45IxBi7MpgwoH8KkkVykGIsckppMoonvi +2J61zq9iNWO2UyqGdpFxDtthzjZEBMUKLP5kvQpSSqNT7mW9LCZbCHBmLljQE1Dt +CmbzkANXkGzyuP5LTZqXumA9qJ+gK1BWNsURBK4z2s3n0xQcabxJ0iT8BJnNKRFV +TWOZENEMp9V+H3IzCicReY2wx6hMoPHl/Jzq6a8TYkUX4EE93t9uXHvBFG/Wyn/s +DpuR69gEUjrlaBhN7AgIMCwte5j1GpBThFj8kScEp/t33IYu1/NWHLWoHKXfhrD5 +ROqqrTKacSK8uxDpfhBQ +=0pbl +-----END PGP SIGNATURE----- diff --git a/dev/python/zfec/zfec.SlackBuild b/dev/python/zfec/zfec.SlackBuild index 49e86d9b..84128152 100755 --- a/dev/python/zfec/zfec.SlackBuild +++ b/dev/python/zfec/zfec.SlackBuild @@ -17,6 +17,7 @@ # slackbuild for zfec, by Silvio Rhatto # requires: # tested: zfec-1.4.2 +# 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:="dev/python/zfec"} 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 @@ -136,9 +205,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 |