From 26461cccbd72db5ea4d2fde3438cfdb354ed21e9 Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 30 Apr 2009 20:21:54 +0000 Subject: qt4: adding mkbuild ; adding tracwikiprint and dependencies git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2178 370017ae-e619-0410-ac65-c121f96126d4 --- dev/python/imaging/Imaging.SlackBuild | 214 ++++++++++++++++++++++++++++++++++ dev/python/imaging/Manifest | 23 ++++ 2 files changed, 237 insertions(+) create mode 100644 dev/python/imaging/Imaging.SlackBuild create mode 100644 dev/python/imaging/Manifest (limited to 'dev/python/imaging') diff --git a/dev/python/imaging/Imaging.SlackBuild b/dev/python/imaging/Imaging.SlackBuild new file mode 100644 index 00000000..fb221ce9 --- /dev/null +++ b/dev/python/imaging/Imaging.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# Imaging.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. +# +# Imaging.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 Imaging, by Silvio Rhatto +# requires: +# tested: Imaging-1.1.6 +# 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="Imaging" +PKG_NAME="Imaging" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=1.1.6} +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/Imaging"} +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://effbot.org/downloads/$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------------------------------------------------------| +Imaging: Imaging +Imaging: +Imaging: The Python Imaging Library (PIL) adds image processing +Imaging: capabilities to your Python interpreter. This library +Imaging: supports many file formats, and provides powerful image +Imaging: processing and graphics capabilities. +Imaging: +Imaging: +Imaging: +Imaging: +Imaging: +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/imaging/Manifest b/dev/python/imaging/Manifest new file mode 100644 index 00000000..baf844d4 --- /dev/null +++ b/dev/python/imaging/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST Imaging-1.1.6.tar.gz 435854 MD5 3a9b5c20ca52f0a9900512d2c7347622 RMD160 336bb92482eb833e5bb1c9e8c1e585c9bdc338d1 SHA1 952d241e4af8ba09f74e6926108b7c0c748d0f89 SHA256 7dd7358ab519161967c838df27465282d180a3206f693ba2db64273d688b3f90 SHA512 d786a11f9086ff63e830fe7538fcb0cdb192773ae709f5fd680bb2357d1071c5214f5e6f5f4ed9a91fa8bdad4af5e019bbc96e11b6e044268dbe0cd3239a986f +MKBUILD Imaging.mkbuild 5068 MD5 6e7c2e6d6a47659142cf2ad32902c406 RMD160 ca79293761a333ed42bb11bb854dfa3f3c07db18 SHA1 1e1f8ff0c67ecf0ee0192679666d5758f0293b68 SHA256 dcb6ba3e3d9874635cf6e35992c20cd9f5adb34c63cdcb025597a7aaeb11400a SHA512 8167cd18c489cbd245391f7819ea60a3743bcfc3647014258d53ed6edd6b0b4cae02a442f10ce340a7815d2371b62a814210a1bd416ca371f3cdad8e0628125d +SLACKBUILD Imaging.SlackBuild 6835 MD5 1ed5a155c58069fe38cc3507360c0ba8 RMD160 6ed11bfd4fc68f53ecd779b3fd713e25da408eb1 SHA1 fcf3f7bf898caa9527bbec55813b1931a205603f SHA256 b66b0cc073b306f2e225eb7ec4bf2cf8e2050d7e331ff246fef62b50b82548c1 SHA512 f37a13d7987a558b3b07f20138d89a980ef9cce2410be77055bd18d420ac44fc84186e499d33d90e6f75ddc863d5f2d9ffb0d2734e8046b56713fa851f1a7064 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+ehXAAoJEEHL93ESzgeiJ6oP/Rutt2VSzz3HEGBvKDNUww0i +aJxXjyBPoaMVOvTxl5sQSMJa2HIoUN8J1sxh9I8VPm7qr/qOFmpvaKtgC5+FzqNE +K6dC0YRpK0Q2W+0J27o2GhnoSSbzFqmre7HBDfBAQGRB0HZ/NOivmqpdlITpI3aR +8RG6MHs8BcjOMjAk/xu2G/LtGOJiCuV+eRiGFsytVxMwzYOGSA7x9g7lNwfQ1MZR +7/jzc8dZpSLrXX6ZYFt8+lkcoL+Ai9C1wPacGnL5J3jA32UbDlykfbxgr/piblr1 +A9XIkqGeDYjSXvSpAwhVm002klAnKc8g5a7KE6pkkfzBVWDEt+Zout5h1gen+GHf +LFcZ9eHH66MvYCJ1fAd/2lk2fAcLsuLnchMnRW3LKZE/JS8A75veGRZly2f8cdd9 +s8BywTHR9RGaCidAXw7fR+wF73yLqATinRuHUz6Sc+61PBPjvEuC5naKVOsRCo2I +eUjFE7c/+GKzJuc53v7iErHAcs4Ru/J5QBl8vXUA8EsItzp531zl+n+EccSXC0Xd +I0QkXGYrvjPD8qH2SFp7RWM/vtaGuMcYTkL3TYFSaKCkC30qhSUN90nnPOq2wM7u +Q+Mlbb4p5wyRFoDV3K6SWhLKq/mlr4SI5CprYc4m7JAkpgk4fWPKxQxu0ZS/dUVD +urKGiYtW1fhgsHrJl7oo +=3TFn +-----END PGP SIGNATURE----- -- cgit v1.2.3