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/html5lib/Manifest | 23 +++ dev/python/html5lib/html5lib.SlackBuild | 214 +++++++++++++++++++ dev/python/imaging/Imaging.SlackBuild | 214 +++++++++++++++++++ dev/python/imaging/Manifest | 23 +++ dev/python/pisa/Manifest | 24 +++ dev/python/pisa/pisa.SlackBuild | 214 +++++++++++++++++++ dev/python/pisa/slack-required | 8 + dev/python/pypdf/Manifest | 23 +++ dev/python/pypdf/pyPdf.SlackBuild | 214 +++++++++++++++++++ dev/python/reportlab/Manifest | 23 +++ dev/python/reportlab/ReportLab.SlackBuild | 214 +++++++++++++++++++ www/apps/tracwikiprint/Manifest | 23 +++ www/apps/tracwikiprint/TracWikiPrint.SlackBuild | 160 ++++++++++++++ www/apps/tracwikiprint/slack-required | 5 + x11/libs/qt4/Manifest | 23 +++ x11/libs/qt4/qt4.SlackBuild | 263 +++++++++++++++++------- 16 files changed, 1591 insertions(+), 77 deletions(-) create mode 100644 dev/python/html5lib/Manifest create mode 100644 dev/python/html5lib/html5lib.SlackBuild create mode 100644 dev/python/imaging/Imaging.SlackBuild create mode 100644 dev/python/imaging/Manifest create mode 100644 dev/python/pisa/Manifest create mode 100644 dev/python/pisa/pisa.SlackBuild create mode 100644 dev/python/pisa/slack-required create mode 100644 dev/python/pypdf/Manifest create mode 100644 dev/python/pypdf/pyPdf.SlackBuild create mode 100644 dev/python/reportlab/Manifest create mode 100644 dev/python/reportlab/ReportLab.SlackBuild create mode 100644 www/apps/tracwikiprint/Manifest create mode 100644 www/apps/tracwikiprint/TracWikiPrint.SlackBuild create mode 100644 www/apps/tracwikiprint/slack-required create mode 100644 x11/libs/qt4/Manifest diff --git a/dev/python/html5lib/Manifest b/dev/python/html5lib/Manifest new file mode 100644 index 00000000..d4ff9af7 --- /dev/null +++ b/dev/python/html5lib/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST html5lib-0.11.1.zip 375892 MD5 f0981fcec3d69789f12f52779c55fa29 RMD160 ac00975e5ea8b20606531e631274c1a8985110c9 SHA1 157506319e40f5d973c128e5e2b826cd1bee471e SHA256 e5a26cb5eda1101871ea3a1199de47311f75e72921583d417b44bcff60f8746e SHA512 1c613a01f5cbf62e392aae3819fdfa36fdefc06812f1916534c82a4293cd03f202bc4b509818486df474954440ef7d0c5bca24144b332888483b0bc0d3a21d30 +MKBUILD html5lib.mkbuild 5041 MD5 ed86a2485167fb0ada14972aa381f416 RMD160 930e7e93c606fc8f8327332c9116206dc0e44a0e SHA1 f117d278534152a50751f46efc0f51ac62eaa91e SHA256 ef08f3daad8d2fd3cea4c57007f505a7e8ae1b658248c9f98fb327803963b063 SHA512 b2e88bf20b2e22ba8f9bfd85ba3cf374a37ced8c55a8b731e3edf8300513c4c1fadd49bf5864c141f1fd62422b8e8f425275974d2213139f84ba818f078e7a0b +SLACKBUILD html5lib.SlackBuild 6762 MD5 3e5ea7fefe02006e682df3def520684a RMD160 9da4dd9270cea73cc36de08f48d1d677f518fa6f SHA1 d01a1a9864dd51e1266c30d1ce507e1a70d6bed8 SHA256 2784ed05ec9795f6f37c3d7416c178a54620e0b1011efb18a90dcbfd7964c3bf SHA512 95014d33fc5ddaf470706223d3cbc3e10c70e703ff7f66452a61310b74c7d790bf2f81a91f2e3b70f7089de5c2dc20125d8b2273784e4d122c3bc9e27adb0579 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+e7iAAoJEEHL93ESzgeiW2QP/3LSOMds1XLlwjr1X8TXA1Z4 +26KR/mu1MVGcK0E1HQGGLfcw7OO+/+MZftov5gCBigNGfGW2T36a8qMnqTj0CGDM +JGP+Bvv3RhSkxqwJpDVGv6VDMgbEW4xp4wiBEiU4OcIM2P8pmOK3us5ZsQW62wyC +bZksSfJm8Y62q4jmjkzWLdAQECe2es6uVtjb/QdNMRtnz/Nf+vx/LylA4P4vTjkM +hneczGG7iwmv5UAoSmeZe1AOZJC+rbYXKv9b54opIYcno6lwlB4yy+yUkj5PoBIQ +EfS5fV6ZjjznfEf2RsH+24EG+TmJaEsxmkTPl2QDx3EbjQ8SQZ+yYUq6iGb1pTY4 +diRIKt7bVZ2jyLo477htkn+hGBt0YY0XsRope7+DX/HC26XeB8msRKFevKxxQC3c +OYy5Sk86SdQl1tHfjP/SdUlq5X+9N+kAnsYM84FS2revLeNY4bCZzcv58GLwnVgq +ILmpDveYrMwE3drOk90koNoCJVVZJuLHUutlYWEaevz4dlZ5HvCUz9mn91ybxhJH +XvTu6Ubpvavwwos3cheuc7P/X8Yq9nwomh3wnKjAACLBlAAvrIq9hF+ypWgL+FH8 +i8HiDlQGkwYMKPmm/zFR6Js80VCAX8dlhu2c2DI1IFMdW9vgi3mea+pEc0PDC3zU +hjIL1im7tQ2UePmxQKvX +=AvCE +-----END PGP SIGNATURE----- diff --git a/dev/python/html5lib/html5lib.SlackBuild b/dev/python/html5lib/html5lib.SlackBuild new file mode 100644 index 00000000..39651ee5 --- /dev/null +++ b/dev/python/html5lib/html5lib.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# html5lib.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. +# +# html5lib.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 html5lib, by Silvio Rhatto +# requires: +# tested: html5lib-0.11.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="html5lib" +PKG_NAME="html5lib" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.11.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/html5lib"} +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://html5lib.googlecode.com/files/$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 -u "$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-----------------------------------------------------| +html5lib: html5lib +html5lib: +html5lib: A ruby/python based HTML parser/tokenizer based on the +html5lib: WHATWG HTML5 specification for maximum compatibility +html5lib: with major desktop web browsers. +html5lib: +html5lib: +html5lib: +html5lib: +html5lib: +html5lib: +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/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----- diff --git a/dev/python/pisa/Manifest b/dev/python/pisa/Manifest new file mode 100644 index 00000000..e1efa95a --- /dev/null +++ b/dev/python/pisa/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST pisa-3.0.30.tar.gz 4513977 MD5 b7d7c364faba601ece12bc02ba93880c RMD160 f3186f0eee7d5d62436ca5e877049e1d5c933fe7 SHA1 6795bc80d76225bf2f7e81226427305147582558 SHA256 a258164647c705c025f18d8f2bfc7cfae3e46dc31d3e51f6e34a3510935d8451 SHA512 3d5428b925a44785f19d7946411374e9948e10848b86a97d0068eeb08b5e635122e6ce6cd109620eba54d009538d70ad314a551297620e31393c73de176057c1 +MKBUILD pisa.mkbuild 5296 MD5 d272404eec2552e7416eb78b6e2c2b7e RMD160 2e3539b2c581a654c0de545d54b1e83798f0d347 SHA1 a993e69dac582d765f7ac7d6454418e05549155b SHA256 834e113ce8c84307ae18de49b0a3ad320829bd1439011454c7e7f3ce193375c7 SHA512 39943522febf08cc2a386b9a23dda64381435014ae0d5bba23b8e73bf377001e2d6fddded62f0c8dea49edef65c066475eb60aa4dbbe5c02c0942147ae7c9332 +SLACK-REQUIRED slack-required 126 MD5 c7afb673a419fa571ae4aa120cfbc68e RMD160 5c6fe3fb3abcf78c9b1d419bacdac930343a5b89 SHA1 0f9346c3dcd2eb578cc51c8e9d8183bb1f8e6750 SHA256 ba2cf5eb00be953f5af975e63c0bfbbd60cb3d4de214665df7cd2659720ea4bb SHA512 b10dd1378a768ebbcb98892e91e5e89f8137628121d23fcb89d8ffae9ed795d525116429823f680dce02aa096bc2b29e4858a8f9a3b5aff384f4fd723c2794ac +SLACKBUILD pisa.SlackBuild 6932 MD5 0afef28f087df9d6846f141f29d1d2e4 RMD160 fb87c4ef9b045789242f8d8806a4a2efc8d9787f SHA1 9224c2b168d51ba91404beb11c4e9deb68731604 SHA256 3cd7c2df46ac40a4046adec66f8dded26b47bb0c24198c3591651b5529e44814 SHA512 16ad6381d16ca74a014ebd6a84a9f86f2637b68a6850a7a862ddedf3e1c3b86e5771ad3f50e79fca96062f64ce73629deed0780b618f0ecdfad0c8e3d99c3b38 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+fhhAAoJEEHL93ESzgeijSUQAI8tuu+pT8yjW0dKJYYkwAyd +j9rX0p1dY4vSm75YMa7dCAm4hTdK4YAPAKmH7zjCkiCjOg9yz/IYqAfDXQu0DxXQ +bVcZz0jM1SqrShnbTRhd20GdNbQnGsI8IYJqo1gZRyBcMDpJ01GFSmX9pDCPZXki +FjJ0LQfid8QjuGJXxj9Q+YFDRcRc5nGS7r9OwnL2yUnezjg5cipnHd1DaeGWOSZM +Ugn5hnZxJ10VlXRyh2jXu860SC2lo2CA+g5aDJv5H9w8YQv22MrOJ/OsVfGEHPC3 +bd5U22T05Bk4LOzYM3+UeRtdZ12cjnIYCKRpKy5XjZ09kClyKtCt9hADJt6KLHu0 +rregDu6Hj58v1ArFouuPllrtKpyBbts09z4d5JOy0PGhA54ix0kpNq7kRpyJVbWt +ypSgRms7vLdm7r9H8r0BwXUjwxWchw7wulKxAgmRed2C6UXeRxXeJFMtyUprncSh +kWDyoIaHFg7koLI1ORK2r1cluAtXKbQTbc0lGsujk/afvFHzTPVoUsb006PwKoVC +9bygKrDbPsOq0A3PL2RHmwlMAWnJg6c6eMdDw+kilaGeIs3H9QM+7OzKb5YI8xb4 +8tYEU7YMegTsj9dq6dcq0sdxeMAET1NTI39JOKM2yM/fOVzSG61wkCWxzmlUlxb1 +OmNoNAxzGlSwbzs5q2RC +=/bT5 +-----END PGP SIGNATURE----- diff --git a/dev/python/pisa/pisa.SlackBuild b/dev/python/pisa/pisa.SlackBuild new file mode 100644 index 00000000..7ad72d7f --- /dev/null +++ b/dev/python/pisa/pisa.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# pisa.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. +# +# pisa.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 pisa, by Silvio Rhatto +# requires: html5lib pyPdf +# tested: pisa-3.0.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="pisa" +PKG_NAME="pisa" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=3.0.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/pisa"} +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/pisa/$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="CHANGELOG.txt LICENSE.txt README.txt VERSION.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---------------------------------------------------------| +pisa: pisa +pisa: +pisa: pisa is a html2pdf converter using the ReportLab Toolkit, +pisa: the HTML5lib and pyPdf. It supports HTML 5 and CSS 2.1 +pisa: (and some of CSS 3). It is completely written in pure +pisa: Python so it is platform independent. The main benefit +pisa: of this tool that a user with Web skills like HTML and +pisa: CSS is able to generate PDF templates very quickly +pisa: without learning new technologies. +pisa: +pisa: +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/pisa/slack-required b/dev/python/pisa/slack-required new file mode 100644 index 00000000..ed956419 --- /dev/null +++ b/dev/python/pisa/slack-required @@ -0,0 +1,8 @@ +# Dependency list to pisa +# +# dependency [condition] [version]] +Pygments +ReportLab +html5lib +pyPdf +Imaging diff --git a/dev/python/pypdf/Manifest b/dev/python/pypdf/Manifest new file mode 100644 index 00000000..d161836a --- /dev/null +++ b/dev/python/pypdf/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST pyPdf-1.12.tar.gz 31979 MD5 7be5f7f4659f64fd194e9eb9a38ad425 RMD160 0528bdbfdbbdb8cf26dbe47b162f57f8d0c0984a SHA1 559f080fe47a0aeda9945acbcc52331b7e4d6213 SHA256 7477e9cdaf2c41b276f5e5517390325e2f80c4da98ff985c08eafe348d64c8a1 SHA512 0e7ffcd4b97e2dded7523631899ff22bae8bab0f97d74d93c092884e3c2f289f2beb346836b705de24f34d9a75559cac419ed9b977546a2b706299e4d1cbc85b +MKBUILD pyPdf.mkbuild 5147 MD5 cebba79d8867ff1f9e11cb0efc1335e8 RMD160 5cae5c0425fb4ad5e06880aeaa8bf6b86315eab2 SHA1 40aee86ae64cc2a2571a08dc45357e2c0e819d5e SHA256 2c15a6172ec1580e0fb971e6acb899f03ac7f689ae3e691a99d2212cfc7ffd0e SHA512 db2bf6068223a7774949ba0a73d318adb1307bb6679b0a7fc48dba06061a76f054c62f8120ee4ae79e3ec7373e5c2bcc66c603f39acb3324a580a9f720a54fde +SLACKBUILD pyPdf.SlackBuild 6905 MD5 d7ecac3d089b17c289fa8f38ce84ded4 RMD160 7569f4488b6a38ce672814efcd3bdb31c43d38a3 SHA1 27c22896b1e4aa67c1221be7e3446e06984557a6 SHA256 6412e59be459e09e7807c7dc0166f8da62e29f023ece62e199d23317ad3d117f SHA512 8abe4bc9e5f37d4783fe40709042007e78527a5b3ce3ef98c48d62a2a2625a6ff85b4c1f8741c9cb2cf88ae04eb14bb0495cfe13f8d8d295a4cf885e181cf8a7 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+ejEAAoJEEHL93ESzgeiPvgQAKiSLPusX/c8OhAQ0IG1A79T +JkfVsdjMhX/U5tc4XL3KXJruoMTU0U/FdNIM5VeixrFnZU/HOSODny8WR0cV+XUh +eabBYi3vRQi8M3LD/1u+XQRvWJb9oOVGtZ0MD7Glyldqu3DiTJzE9Rl3KB6pftnl +2SVy0GFoadPvuIUhtTv3/ACabHzfMO2Me0Ajqr4Hy7ChSFLIqZvhfaiVqsPAWThB +W6ay9UfyJuHoXGba8bdpAksbctlzDfmK0HoRznQX8HNKTWA8Z+16IWcEiYenks0h +y0+Fsj0R18VNFzVTwVDbkeJmE6dIhiv3hpJQseEAzCqE04RG5V+E0nYua/Qi3a9C +XAQeqoGA9BdCObeRYV/YSMEfpCqVHI/p9ZLak/aUUUCJijm1Hk69X3s+DHXC2KyX +NNXt6UxnSqBpolzv9AhrHX3ZzFFKPIsUwSVC99sCsHZ9S8aMr+sQhGhKor7jLnb6 +IoTTVrIGkiJZOZ6Zfb8OR0qnHEGIhJLVX01cUuBAmWr83laf3FZ9itRp9oxhGkmN +nPlpi1oPBBLbIaZSf2LVOsQ9qJuT8vTNK49Y6vJXVE8I2ROix4fzKTob4I4MDwIu +u6pinjQjBPK35SSRWBp+C81vJJoTeCWi7C0eKB0vIUxWMYDOhxpok2ZnXyPpAGsI +XhLsrc96gWY1DuosOb6b +=dDKn +-----END PGP SIGNATURE----- diff --git a/dev/python/pypdf/pyPdf.SlackBuild b/dev/python/pypdf/pyPdf.SlackBuild new file mode 100644 index 00000000..4cd66882 --- /dev/null +++ b/dev/python/pypdf/pyPdf.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# pyPdf.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. +# +# pyPdf.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 pyPdf, by Silvio Rhatto +# requires: +# tested: pyPdf-1.12 +# 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="pyPdf" +PKG_NAME="pyPdf" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=1.12} +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/pyPdf"} +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://pybrary.net/pyPdf/$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--------------------------------------------------------| +pyPdf: pyPdf +pyPdf: +pyPdf: A Pure-Python library built as a PDF toolkit. It is capable of: +pyPdf: +pyPdf: * extracting document information (title, author, ...), +pyPdf: * splitting documents page by page, +pyPdf: * merging documents page by page, +pyPdf: * cropping pages, +pyPdf: * merging multiple pages into a single page, +pyPdf: * encrypting and decrypting PDF files. +pyPdf: +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/reportlab/Manifest b/dev/python/reportlab/Manifest new file mode 100644 index 00000000..52f384df --- /dev/null +++ b/dev/python/reportlab/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST ReportLab_2_3.tar.gz 1857239 MD5 057b846bd3b7b2c3498bf14f6a523632 RMD160 ebb347765d516e74b965ec89c7909ec7592e3f54 SHA1 cb5e27fef02eceaab79236d5a074cdfb92bff179 SHA256 b63872c4b29063f0e0c2fe56223585175f03c7a6991e2a8bc9a221ae5ee2c092 SHA512 0cd3f105d2a1d6101d3c719252270387a4ef1574df43995d0b503d48c869dafb5945a3c3bb4e670f89036786f83cc5adc270b6f82220d89ce2c5d13713d71904 +MKBUILD ReportLab.mkbuild 5145 MD5 ea79027c28c02748e1327a5d9889a8c1 RMD160 5b6bc1eaa8ec11372ccef184b6d0dae06650b50a SHA1 51e3311537a249f424bed0a2e0ebb15830b83520 SHA256 93b9035a1a733858ed22873bdf00f7e1441a550e2d70153eb38edacc9c4d99fc SHA512 5dd636ce3b41a7d95afa22a8f61f7bd08419609db14bbe6f7aeedb7d26cad8afce5d387b1939ade37774cbc4cfde8baf950154a6f84c5da724cceee1d47bde06 +SLACKBUILD ReportLab.SlackBuild 6906 MD5 da21e765f01483a4ec8431e4eaa07d5f RMD160 65bdc1c50aaf36d611d92238e4cd8f4b7fa252c6 SHA1 b27fa8110c862d04c3abf5b7041f5da390bffca7 SHA256 ff2d24f2fa92ae45731dd3e55adeb9b6d419d1139273a4bd6ef7b23dac16bb57 SHA512 01f94e794f61cff09d435e1df7ecc273cb69b2308f47a3f9786bd5387cf1b0a375fdfd9abd871944f162b873069fd98ae41fb2d1cced5ace9ff4ec977f8562cd +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+fR8AAoJEEHL93ESzgeiK7cQAIZHdsLvvg4oc7ADbPRO2kIV +T2V37tIrRhQU2zy58ImrK6HAk0gEkfhIQHmUdXedbGGHbHNPkf9jkZk2Z6w+viN/ +peoWl9EdcjRxxk6vu6u8ce0+wF30EUg7T+aWtQArPc7phG7Edf4gDenZPKr63uZ6 +K5j9GQI2I4um7sUe2LfHOrVsVWuOa+TCfnk1eoJ01Ej+QyGTdhil0xfzlQ4NEKyu +tmzUixS1ECewyHiKHCNCJFfWmJYqZb04pBVofhEzgtgxaCOP5BC7xz1yp5uJo9YN +EfAT9jcD4J0O6p8k6vWpyW15HXrzth87qzFrxjO8iYL1bAhXMdkFa+pkxKBPWd1S +/6nWkjkRL6SaukhjYrdEMh8cQMJkv1+rXUBBkVHWgU1faUaCEhKgrlsygfaVJAwS +JQgVsYMgNeKZresVvGhny/A6ngwkxQwveF4G5/ADeSMysCG1b88NGPwuPC1PDByZ +kkffcT34ZK4YAvm3Fuit7wsJjqLt/Ffd9iUJTq2XgZ/A5l2+ycLoA+sDmNaREtYU +iqTnP3jWrOtJr597yu6wB2bFNvdCuWfen0Yd6vHFqb6lcN1FjvRHPx71LWh9bRbI +cZsjVw5nYJDhbaLb8iskOYrgxYN+0lyIlgGUGAfciwGA76OOV1Ny5wHMpy0MbVa+ +RLAh+A1DOePFw+2PCjUJ +=bCSf +-----END PGP SIGNATURE----- diff --git a/dev/python/reportlab/ReportLab.SlackBuild b/dev/python/reportlab/ReportLab.SlackBuild new file mode 100644 index 00000000..f70f76a1 --- /dev/null +++ b/dev/python/reportlab/ReportLab.SlackBuild @@ -0,0 +1,214 @@ +#!/bin/bash +# +# ReportLab.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. +# +# ReportLab.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 ReportLab, by Silvio Rhatto +# requires: +# tested: ReportLab-2.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="ReportLab" +PKG_NAME="ReportLab" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=2.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/ReportLab"} +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"_"2_3.tar.gz" +URL="http://www.reportlab.org/ftp/$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----------------------------------------------------| +ReportLab: ReportLab +ReportLab: +ReportLab: The ReportLab PDF Library is a Python package that +ReportLab: runs on all platforms. It can also make use of code +ReportLab: written in C, which needs to be compiled. However, +ReportLab: if a compiler is not available, it can perform +ReportLab: satisfactorily without the C component. +ReportLab: +ReportLab: +ReportLab: +ReportLab: +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/www/apps/tracwikiprint/Manifest b/www/apps/tracwikiprint/Manifest new file mode 100644 index 00000000..2132284a --- /dev/null +++ b/www/apps/tracwikiprint/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MKBUILD TracWikiPrint.mkbuild 2751 MD5 0edbbc3eff976509cc8051b115be1505 RMD160 f46081b9a881cbf56d6f00fa21b1d8646c5f31ef SHA1 c01b7f4b102d071e7441eb826033b63779bb83ec SHA256 6cc8d5e1db458fdf7ce3c69b4ca86c7760f5485d6b8f320d827802234c754952 SHA512 704a7e18067b1a73f3d4f24f43f563915249a4dd154d5af2dd74deaf981046074d68b0bc62ff506fb48e7cd9dea76223b302fd558d5927bba6022a00c986c747 +SLACK-REQUIRED slack-required 91 MD5 9d944aa1dbca6b807a154707efb48748 RMD160 93fe8eab397a78e438603fba9b5c20a20b7f3f76 SHA1 f840fec0df64cdebbbb141beb9cf847a14d98436 SHA256 c3ea7c263cba1fdd3709c6d4df48444659025ff625f2b6baa28357cdfbb65eca SHA512 c9f1367b4ea43dc493db10fe0baaef847ff3df1351d1a1af6c4bbdcf3eca67622a047bc9534300230a863a329fd712e56e34d5b452bf31f13ce2da3293a26877 +SLACKBUILD TracWikiPrint.SlackBuild 5095 MD5 aea4a6388f32b256ed0032a3a2583bb4 RMD160 cb29a667b20fad5a4b139b95497dbad7e751dcd5 SHA1 3ac0d1755d1e3bf13b07665252c8138d8ac23af1 SHA256 2080eba12ec2c6560070546a362ba38c84e389c56fc948c9e9ce9a18725ea6fa SHA512 2564e3028b7e3bb00caa5f17778158145ac75029293000ac26ede7afd1b482bc424787150ac400fee6b4d2859860e76fec1b0e96fc8cff3b8d41401aef831486 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+fu+AAoJEEHL93ESzgeiGKAP/1boR9nK3W3TjjmN3frSEqgd +WRnkN+L+zml4MkAJwNL36ZpMHTvsITl3bOCqRQWwuhrnm+kkLVLTwTTcxQxbrL05 +E5cRL8rtxGvsAd7p4zzsGTtdAOhpS+ijGREsJ6lMdJ7SwyOkn9d7Du/6TtvNUU7y +hpHujM08/9VdReblFwum6wokEID29+4L7O5+fv9JHXbXcKNSJt5fQzfVcPz4OdKp +9ho8dmdDoW7faWMVQKzGpW8LH2KT19KsbPuO3WJ+jBVgmJyqFF1bVWxFZ4rnAZtj +w7vjh2AT5fUWZg2HhJk+F5E1XkBaXgkC9Of5Jrt9rxi5/AiJfp75hgHG1MPPwy0d +w8SzECgt07YkxlZa4inWTmrwHYdXZvcEuJoZwhhJP3q1j/OW+kx8IXSC4sTYeaQw +FVM8ZPa0AUdj53kInZiNdptJPU/1vuJD27nChVKO1CuitbhdahdS7w3sW2bVn8pa +EqzQ4YVWQ+AI+K73WPy7FYB8ZVSsMzKd3I3Uk4Sbg44s7Qksum1sUnziVSihyPmr +R+t/aKSMrGIns0Mru721RoP9GFYBN1hjVylJEe8FjKUR3sRoJ33z79w0gEs9TpC8 +zZWX6lDevxi0oUdBAj6jGeXAx/lguiLKVx8fDbXgZLp9UWoEJWPKWzkh0zDc7Yu/ +L9VTTmbYnBorZ7QhRPHp +=7ZUx +-----END PGP SIGNATURE----- diff --git a/www/apps/tracwikiprint/TracWikiPrint.SlackBuild b/www/apps/tracwikiprint/TracWikiPrint.SlackBuild new file mode 100644 index 00000000..dfa574cd --- /dev/null +++ b/www/apps/tracwikiprint/TracWikiPrint.SlackBuild @@ -0,0 +1,160 @@ +#!/bin/bash +# +# TracWikiPrint.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. +# +# TracWikiPrint.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 TracWikiPrint, by Silvio Rhatto +# requires: pisa +# tested: TracWikiPrint-svn_version +# 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="TracWikiPrint" +PKG_NAME="TracWikiPrint" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=svn_version} +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:="www/apps/tracwikiprint"} +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 + +# Get svn source code +cd "$SRC_DIR" +SND_DIR="`basename http://trac-hacks.org/svn/tracwikiprintplugin/0.11`" + +if [ "`find "$SRC_DIR/" -name .svn`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then + cd $SND_DIR + svn update || exit $ERROR_VCS +else + svn checkout http://trac-hacks.org/svn/tracwikiprintplugin/0.11 $SND_DIR || exit $ERROR_VCS + cd $SND_DIR +fi + +PKG_VERSION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`_svn" + +# Copy svn source +cd "$PKG_WORK" +cp -a $SRC_DIR/* . +PKG_SRC="$PWD/$SND_DIR" +cd "$PKG_SRC" + +# Build and install package +python setup.py build install --root=$PKG + +# 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------------------------------------------------| +TracWikiPrint: TracWikiPrint +TracWikiPrint: +TracWikiPrint: Make wiki pages easily printable, exporting to PDF +TracWikiPrint: (book or article format) or printable HTML format +TracWikiPrint: (page contents without trac headers/footers). +TracWikiPrint: +TracWikiPrint: +TracWikiPrint: +TracWikiPrint: +TracWikiPrint: +TracWikiPrint: +EODESC + +# Copy slack-required +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +if [ -f "$CWD/slack-required" ]; then + cp $CWD/slack-required $PKG/install +fi + +# 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/www/apps/tracwikiprint/slack-required b/www/apps/tracwikiprint/slack-required new file mode 100644 index 00000000..4bb169e0 --- /dev/null +++ b/www/apps/tracwikiprint/slack-required @@ -0,0 +1,5 @@ +# Dependency list to TracWikiPrint +# +# dependency [condition] [version]] +Trac +pisa diff --git a/x11/libs/qt4/Manifest b/x11/libs/qt4/Manifest new file mode 100644 index 00000000..aa6a4f75 --- /dev/null +++ b/x11/libs/qt4/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST qt-x11-opensource-src-4.4.3.tar.gz 112939803 MD5 376c003317c4417326ba2116370227d0 RMD160 49de53663a86785f88236bdeca6db8ee96a37db8 SHA1 a883e913e69a418e3cfcfecefe4f82c4e091c4bd SHA256 79ea9fb46d75c3759e3e98ab0064a47eaa5bdbbc2a53d923d60bd8e9cd0bc5c6 SHA512 4c60008992476ece98f5ba69d30597f52b237840f6a300bba8d34b647b94016a057372e45c5afd38bcbfa6f5c3fb9e0e3eb351d601433b34e79851c3a75f8808 +MKBUILD qt4.mkbuild 6555 MD5 56b5adc95374a71d63558e210144dc40 RMD160 997a36cfb5fb0f6480d055d8e2d0c8c9109e5abe SHA1 088600b879df5ecddd7d0837a63827227c3e8b51 SHA256 bae8556ea0b9765fd6959b96e7300ed3cb7e79764506d15feefb86bd091bff18 SHA512 c2d587b1070a6c58ee278ffdddfb7fb501121f507b2ec9390d5e4a4b15ef3a0bab33dc2bdc1319c15c92420888bd9778dc9e25ab936c6227fdd1e8db4b1c183d +SLACKBUILD qt4.SlackBuild 8231 MD5 37fe4eeff5a2e298893f0ab5b5d7c714 RMD160 8be69c01faf83dca953155137a9a22e16993d562 SHA1 d6ff10421300b34a3a497edf68fac808cd37b61c SHA256 a07e562cefb1228bd1f8cd4a13d623606769c47b49a3e8b99c2b4bb5de375506 SHA512 6575ac0fd3614c6462b9b90a4e3289af6cf177953327067ca4d502acdc2a782ae5e2ab9d16953749ce7fbb4edbc5960dfd1e575c3ae89304815379a614eea314 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+daXAAoJEEHL93ESzgeiF5wP/iaFG9F4R82JShqL30I1oXcr +nOConhgwjm6cNDLz7iMTTuyGTnDQHzuXQSFOyIWb7ETr41T17mW98dBFDZNuP7Zi +Z/daf7x41fiQ+L8Nwn1G+hu/NixmK5BlUR5DITMelfO1oOzKOqnZIf7W+dkY2LYy +tQWSKogxzTzNATBCuF/wVsARBe93+B92jtsR1PaY445t0OtryMUtg0QnBiCJVFXZ +SDt33ZzurBURtv9EzXUhImaxxw+AuzZEwd+xltyI07LNuC/CP/VyTswrAizRS9/7 +bCnL3hKH0+ERgizv5LG9f7iT3nVzmLx9FTEkQnGCe1VldF6A4CnKn45V3agBnWfy +lQauEWR9w8BdKyzQW8L93EKlXYHG0PXhtnxCum4L6jRpgrRURNAeXzjDrNwxGr05 +R2whRkFmt6VE+FrG5GppSrE4zY8/ZqZRjopXcE5CbUK2wMovOHJ/tIyjwbpY9X7Q +5IXPDjPwbQfpAgi3oxbhRCCTTizM6kZgNHtmKQYs6d3FtNpokvhUSQptaBrIfot+ +V8V1sfQrwvFW2fPra3DPmMVuFcZTNoVFkHa8QLeISNt3UI0BUoaCDhJM6gh0VUxq +Lha0GqRibEAe6fL5mAeh7eTqob17YK+5TcI5ojRvONiK5Npu70AxmIcqDVVHY4QH +vjS4QuwmflLzBVbzo5Qk +=rrG5 +-----END PGP SIGNATURE----- diff --git a/x11/libs/qt4/qt4.SlackBuild b/x11/libs/qt4/qt4.SlackBuild index 2f4641d3..8c96b7d0 100644 --- a/x11/libs/qt4/qt4.SlackBuild +++ b/x11/libs/qt4/qt4.SlackBuild @@ -1,66 +1,170 @@ -#!/bin/sh - -# Slackware build script for Qt 4 -# Written by Aleksandar Samardzic -# Modified by Robby Workman -# Adaptation for slack.sarava.org standard by Rafael Diniz - -PRGNAM=qt4 -VERSION=${VERSION:-4.4.3} -ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} -TAG=${TAG:-rd} -SRC_DIR=${SRC_DIR:=$CWD}/$PRGNAM -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-$PRGNAM -REPOS=${REPOS:=$TMP} - -# Dowload source if necessary -SRC="qt-x11-opensource-src-$VERSION.tar.gz" -URL="ftp://ftp.trolltech.com/qt/source/$SRC" +#!/bin/bash +# +# qt4.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. +# +# qt4.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 qt4, by Silvio Rhatto +# requires: +# tested: qt4-4.4.3 +# model: generic.mkSlackBuild $Rev: 805 $ +# +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi -JOBS=${JOBS:-5} +# Set variables +CWD="$(pwd)" +SRC_NAME="qt-x11-opensource-src" +PKG_NAME="qt4" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=4.4.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:="x11/libs/qt4"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} -LIBDIR=/usr/lib +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" -if [ "$ARCH" = "i486" ]; then +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 -mtune=i686" + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIR=/usr/lib64 + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -set -e +# 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 +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null rm -rf "$PKG" 2> /dev/null -# create dirs +# 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="ftp://ftp.trolltech.com/qt/source/$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 [ ! -s "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" + 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 -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf qt-x11-opensource-src-$VERSION -tar xvf $SRC_DIR/qt-x11-opensource-src-$VERSION.tar.gz -cd qt-x11-opensource-src-$VERSION -chown -R root:root . -find . \ - \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; +# 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" +# Configure and install procedures with sections: +# Written by Aleksandar Samardzic +# Modified by Robby Workman +# Adapted Rafael Diniz + +# Configure export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS" export OPENSOURCE_CXXFLAGS="$SLKCFLAGS" @@ -68,22 +172,23 @@ echo "yes" | ./configure \ -prefix $LIBDIR/qt-$VERSION \ -libdir $LIBDIR \ -nomake examples \ - -nomake demos + -nomake demos || exit $ERROR_CONF -make -j $JOBS -make install INSTALL_ROOT=$PKG +# Compile +make $NUMJOBS || exit $ERROR_MAKE -( cd $PKG/$LIBDIR ; ln -sf qt-$VERSION qt4 ) +# Install +make install INSTALL_ROOT="$PKG" || exit $ERROR_INSTALL -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -) +( cd $PKG/$LIBDIR ; ln -sf qt-$VERSION qt4 ) mkdir -p $PKG/usr/bin ( cd $PKG/usr/bin - for file in assistant assistant_adp designer linguist lrelease lupdate moc pixeltool qcollectiongenerator qdbus qdbuscpp2xml qdbusviewer qdbusxml2cpp qhelpconverter qhelpgenerator qmake qt3to4 qtconfig rcc uic uic3 xmlpatterns; - do + for file in assistant assistant_adp designer linguist lrelease \ + lupdate moc pixeltool qcollectiongenerator qdbus \ + qdbuscpp2xml qdbusviewer qdbusxml2cpp qhelpconverter \ + qhelpgenerator qmake qt3to4 qtconfig rcc uic uic3 \ + xmlpatterns; do ln -sf $LIBDIR/qt-$VERSION/bin/$file ${file}-qt4 ; done ) @@ -98,25 +203,37 @@ mkdir -p $PKG/usr/bin # done # ) -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT INSTALL LICENSE.GPL* \ - LICENSE.QPL OPENSOURCE-NOTICE.TXT README changes-$VERSION \ - $PKG/usr/doc/$PRGNAM-$VERSION -( cd $PKG/usr/doc/$PRGNAM-$VERSION ; ln -sf $LIBDIR/qt-$VERSION/doc/html . ) +mkdir -p $PKG/usr/doc/$PKG_NAME-$VERSION +( cd $PKG/usr/doc/$PKG_NAME-$VERSION ; ln -sf $LIBDIR/qt-$VERSION/doc/html . ) -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# 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 +) -mkdir -p $PKG/install +# Install documentation +DOCS="GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT INSTALL LICENSE.GPL* LICENSE.QPL OPENSOURCE-NOTICE.TXT README changes*" +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 +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler------------------------------------------------------| + |-----handy-ruler----------------------------------------------------------| qt4: Qt 4 (Qt4 toolkit) qt4: qt4: Qt 4 sets the standard for high-performance, cross-platform @@ -130,20 +247,12 @@ qt4: qt4: EODESC -cat << EODESC > "$PKG/install/doinst.sh" -#!/bin/sh -# Add /opt/qt4/lib Qt4 library to /etc/ld.so.conf -# or not? - -#if [ -z "$(cat /etc/ld.so.conf | grep "/opt/qt4/lib")" ]; then -# echo "/opt/qt4/lib" >> /etc/ld.so.conf -#fi -EODESC - -cd $PKG -/sbin/makepkg -l y -c n $REPOS/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +# 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" ]; then - rm -rf "$PKG" +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then + rm -rf "$PKG_WORK" "$PKG" fi -- cgit v1.2.3